Open mliberty1 opened 1 year ago
Some additional thoughts. Representing time is particularly challenging because the UI blends several similar but different things:
Live sample streaming
Buffered data (paused sample streaming)
JLS recordings
The following notions of time can make sense:
Wall-clock time (UTC)
Time relative to start
Time relative to the first possible sample time in the buffer, even if not yet available
Time relative to now
Time relative to some event, like a trigger (upcoming feature). Note that (2) is a subset where "start" is the event.
Oscilloscopes only do (3) or (5), which makes it much simpler.
Joulescope model
JS220, JS110
UI version
1.0.29
Your idea
The Joulescope UI 1.0 uses UTC time throughout. UTC is great for comparing events across a larger system.
With the 1.0 UI, the actual wall-clock time for an x-axis location is the base time plus the offset. Let's take an example:
https://github.com/jetperch/pyjoulescope_ui/assets/5393422/69afa2fd-b636-4d0d-ba1b-6590e9a7dc25
In the case where you zoom in, the base time adjusts so that the x-axis offset maintains sufficient display precision without taking up far too many characters.
This "jumping around" as streaming starts can be disconcerting for some users. Also, some users want to measure a known process. For this case, UTC time is much less meaningful than elapsed time. The Joulescope UI 0.10 supported elapsed time when viewing JLS views. It also supported relative time, relative to the oldest possible sample, while in sample streaming mode. The Joulescope UI 1.0 no longer supports these modes.
I propose the following improvements:
A new Waveform widget setting, x_time_mode. with the following options: a. utc - Use a UTC time base with offset, like done currently b. relative - Use the first available sample as zero. The time base text should omit the data and time zone offset.
A sample streaming option that completely fills the buffer with empty data at the start. This allows for the same right-to-left growth at startup that the Joulescope UI 0.10 had. It also will keep the base time and time offsets from "jumping around" as the initial data grows.
Does your idea concern a specific OS?
No - applies to all