Repository navigation
Conversation
|
Thanks for adding the DMM trace and longer timebases. Both board builds passed. The DMM trace has a freshness issue when switching modes. Switch from the DMM screen to Scope with the DMM trace enabled, then query There is also overlap with the CH1/CH2 display-order work in the channel selectors, cursor labels and footer. When integrating the two changes, the DMM trace needs to retain its own label and colour in either analog channel order. |
|
Fixed.
Merged one after the other, #148 and this PR conflict in |
|
Thanks for expiring the previous meter reading at trace startup and integrating the DMM label with Swap CH1/CH2. The four build targets pass against 0.21.19. This still needs integration with the published v0.22.0 pre-release. The trial merge has 13 file conflicts, including gzip waveform export, frequency readouts and rendering. With both sets of fields retained, the ARM Please preserve the v0.22.0 export and counter behavior in the rebase and rerun the target memory and settings-size checks. |
|
Rebased onto 0.22.2. The compressed export, the counter (CNT, Trace f, Timed edges), the Math label, the DMM prefixes, wake on measurement, AWG and the waveform list are kept.
Merging: with #148, |
|
Rebased onto 436d4f0. Trace index 2 is now both your MATH and the DMM, so With 3be6afb, the DMM screen's HOLD now locks the function from the Scope too (the channel menu, Budget 339/3424, MaxBytes 4552 (the longest file is 4545 bytes). The longest valid theme still parses, with 826 bytes of ThemeDocument to spare (1092 on main). |
|
Rebased onto f33ec27 (0.22.7). The conflicts were with the localized texts in the Scope screen, its status, footer, channel editor and AutoSetup. Our texts are catalog entries in all four languages, and DMM as a trace name stays literal, like MATH. engine.cpp tries the Scope's own commands, your upload and decoder commands included, before the DMM's. Budget 340/3408, MaxBytes 4568, display.language included (see #115). Free ITCM goes from 504 to 1016 bytes, free DTCM drops by 104. Every commit builds, and the six CI checks pass. |
77d0e5e to
21cc5e4
Compare
Glow's 12800-byte scratch had an ITCM section of its own (.scope_glow). It is used only inside the synchronous software draw callback and is cleared per channel before use. The spectrum's real and imaginary arrays (16384 bytes in DTCM) are refilled by every calculation, and a spectrum is computed only from Model::project, never during a draw. SpectrumStorage now holds those arrays as raw work bytes. The FFT begins its arrays there with placement new at each calculation, and Glow begins its scratch there at each draw, reached through the Model. The .scope_glow section, its zeroing at reset and its term in the ITCM check are gone; DTCM use is unchanged.
rollAuto, longerRecord and interleave hold 0..2 and took a 32-bit word each. As bytes, Preferences shrinks from 624 to 616 bytes on both boards: room for new Scope choices under the stack check in preferences.hpp. Their order, defaults, file keys and accepted values are unchanged (an interleave_mode above 255, rejected by valid() before, is now rejected by the parse; both refuse the file).
Analyze > Display > View > DMM keeps the multimeter chip powered while the scope runs (latch bit 13 on top of every scope word) and draws its readings as a third trace beside CH1/CH2. DMM function picks what it measures and is shared with the DMM mode. The trace draws in Roll (200 ms/div and slower); every timebase shows its value. A second F1/F2 press steps CH1, CH2 and DMM among those shown; with DMM selected the arrows set its units/div (1-2-5) and position. The DMM UART receives through its own DMA stream beside the capture; the link watchdog power-cycles the chip by the bit alone. While SCPI's parallel mode serves the DMM, the trace leaves the chip to it and does not run. The readings ring (1024 entries) lives in arena bank 3, which Roll leaves idle; any other capture invalidates it.
The multimeter trace becomes a channel beside CH1/CH2: its own colour role (DMM) in every scheme, a "D" zero tag in the left margin, the line on every timebase placed by time on the record's axis (the last reading held to the record's end), level cursors on it with the delta in its units, and Mean/Min/Max/P-P/RMS over the visible window in the footer: its own REL page while both channels show, a hidden channel's panel otherwise. The readouts it shows are stored as dmm_measurements. The readings ring moves from the Roll spare bank to its own ITCM section (768 entries), so captures no longer invalidate it; builds with the USB trace keep it out. The settings budget grows with it: dmm_measurements and the DMM colour role take six slots, and display.language from 7781a38, which main's numbers do not count yet, one more, so 340 slots and 3408 string bytes (8848 bytes of tree, as before), and MaxBytes rises from 4480 to 4568 for the longest valid file, 4562 bytes on the ZT706S, 19 of them for display.language.
Timebases continue past 20 s/div to 1 h/div (10 hours on screen). Past 20 s/div the capture runs in Roll with the trigger in Auto, sampling as at 20 s/div, and each point shown is the mean of the samples it spans. The DMM line follows the same rule: at slow timebases each point is the mean of the readings within its span, and the line starts where the record starts. The DMM gets a channel menu like CH1/CH2 (MENU on its scale/position: Enabled and Function), its zero tag becomes "M", and the reading overlay over the plot is gone. With the DMM on, CH1 and CH2 can both be off: the DMM takes the plot and the footer, the trigger shows AUTO without a channel, and FFT, reference capture and SCPI single/normal sweeps refuse a hidden channel. AUTO also fits the DMM's units/div to its readings; readings off screen are marked at the plot edge. A scope CSV.gz carries the DMM readings in a dmm column. A HOLD on the DMM screen keeps its function in the scope too: the DMM channel menu refuses another until it is released in the DMM. A timebase of 1000 s/div and up takes two digits more than 20 s/div in the settings file: the longest valid file grows to 4564 bytes on the ZT706S, within MaxBytes (4568).
DISPlay:TEXT[:DATA] "<text>" shows a message over any screen until a key, DISPlay:TEXT:CLEar or a new text; DISPlay:TEXT? returns it. The message wakes a dark screen and the key that dismisses it does nothing else, except REL/Power held, which still powers off. The scope's DMM line starts again whenever another function is selected, also within one quantity (DC to AC amps) and when the function was selected while the capture was stopped.
Switching from the DMM screen to the Scope with the DMM trace on kept the last reading Ok while the meter chip was still powered off. The trace start now expires it, as entering the DMM screen does: the reading is stale until a new packet arrives, and the charge counter starts a new run.
With the DMM as a third channel, the selection stepped by input number, so with the channels swapped it went CH2, CH1, DMM on screen. It now goes left slot, right slot, then the DMM.
The DMM channel's timebases past 20 s/div always roll in Auto; a pulse width, runt or rise/fall trigger is kept and applies again at 20 s/div or faster.
The DMM line, its zero, the dDMM level cursor readout, AUTO's scale fit and the Up/Down reach of its zero counted 8 divisions, so on the square grid a units/div did not match a square. They now take the grid's own divisions, as the channels do: 5 on the square grid, 8 otherwise. The plot rows per division are Painter::meterDivision() for all three drawings; test_meter_scale checks AUTO's fit on both grids.
|
Thanks for the work on this. I'm deferring this change for now. I kept finding regressions in my oscilloscope tests while integrating it with the current firmware. The change touches enough of the scope that I expect further regressions without more test coverage. I'm closing this PR for now. I may revisit it when I have more time to work through the integration and expand the regression tests. |
What this changes
Implements #120.
measured at the multimeter's own inputs. The chip stays powered while the scope runs (latch bit 13
on top of the scope word); its readings draw as a line on every timebase in their own colour, with
an "M" zero tag, units/div and position on the arrows, level cursors in its units, and
Mean/Min/Max/P-P/RMS in the footer. With the DMM on, CH1 and CH2 can both be off.
each point the mean of the samples it spans; the DMM line follows the same rule.
dmmcolumn while the DMM channel is on. Its copy of the readings (768 × 8 bytes)sits in ITCM beside their ring, since zlib takes the whole Trial area. While the DMM channel is on, the multimeter's SCPI commands work in
the scope (readings, FUNCtion, CONFigure, AUTO?/AUTO , RANGe);
:DMM:FUNCtionpicks thefunction.
DISPlay:TEXT "<text>"shows a message over any screen until a key.is drawn only in the draw callback, the spectrum is computed only in Model::project), and three
Scope choices in Preferences become bytes. The DMM readings ring takes 768 entries of ITCM and the
dmmcolumn copy another 768: free ITCM goes from 504 to 1016 bytes.dmm_measurementsand the DMM colour role take six slots anddisplay.languageone more(DocumentSlots 340, StringBytes 3408), and
MaxBytesis 4568 for the longest file, 4564 bytes on theZT706S.
Preferences::valid()checks a timebase past 20 s/div against the plan Roll runs with, so such settings are saved.
:DMM:FUNCtion,CONFigure), as the DMM screen does.FETC?reportsno value until the meter chip's first new packet.
either order, and the channel selection steps in screen order (left, right, DMM).
or faster (docs/SCOPE_TRIGGERS.md).
Testing
pio runbuilds all four environments without new warningsOn ZT703S: every multimeter function as the DMM line with CH1, switched over SCPI; the hidden-channel
cases; 60 s, 10 min and 1 h per division; Glow together with Y-T+FFT for 30 s without a reset.
From the DMM screen to the Scope with the DMM trace on,
FETC?answers NAN and -230 until the firstnew packet about 2 s later, then fresh values. Swap CH1/CH2: labels, colours, zero tags, the footer and
the selectors checked with a host test against main, not on screen. On 0.22.5: a CSV.gz saved with the
DMM channel on carries the
dmmcolumn, filled from the start of the DMM line; 60 s/div survives arestart; with the DMM screen held,
:DMM:FUNCandCONF:VOLT:ACin the Scope get -221 and pass onceHOLD is released.
Checklist
0x08000000–0x0801FFFF)vendor/is unchanged, or a third-party component is updated as a whole