Commit graph

120 commits

Author SHA1 Message Date
Allan Bazinet
137a949909 Use std::array for sum and points 2024-09-15 13:32:54 -07:00
Allan Bazinet
9042748a8f Various plotter fixes
Integration of a few upstream fixes, mostly ensuring consistent state after mutation.
2024-09-15 13:24:27 -07:00
Allan Bazinet
66736c5acb Clean up WSPR sub-band warning display
If we’re in the 30m band, ensure that the 200Hz WSPR portion of the band is clearly indicated, in a manner that looks consistent with the JS8 sub-band indicators.
2024-09-15 08:20:24 -07:00
Allan Bazinet
5a0b950609 Increase linear average plot gain
Doubles gain of the linear average spectrum; matches WSJTX gain setting for this spectrum type.
2024-09-15 06:22:45 -07:00
Allan Bazinet
237d44ff51 Strip dead modeTx code
Removes old code related to setting modeTx in the waterfall; no longer does anything, and has been removed in the upstream WSJTX code as well.
2024-09-15 05:12:15 -07:00
Allan Bazinet
6d8a56d2c6 Eliminate unitialized warning 2024-09-14 22:26:48 -07:00
Allan Bazinet
00de4bcd73 WF namespace
Move WFPallete into WF::Pallete and add WF:Spectrum; greatly simplifies plotter preference handling, and contributes to go-fast in the plotter drawing function.
2024-09-14 06:53:12 -07:00
Allan Bazinet
d98f49a14f Remove JT4 message drawing from draw function
We’ll never be in a mode that would cause this code to be executed; it’s just taking up time in the draw method for nothing.
2024-09-13 21:41:22 -07:00
Allan Bazinet
c1a3fe3a04 Introduce Spectrum enum
The plotter has 4 mutually-exclusive options for spectrum display, but they’re at present being represented by a large number of booleans, which makes for confusing draw loop. Start introduction of an enum to represent these.
2024-09-13 21:36:28 -07:00
Allan Bazinet
8b827f97b0 Extract common summary code 2024-09-13 14:08:06 -07:00
Allan Bazinet
c91fdc1260 Ongoing draw loop tuning 2024-09-13 13:03:50 -07:00
Allan Bazinet
2c1f9d5e2b Use retrieved value 2024-09-13 10:49:58 -07:00
Allan Bazinet
261e1c6335 Extract last point check from loop
Checking to see if the loop is about to end, while you’re in the loop, on every loop iteration, is not ideal.
2024-09-13 10:33:25 -07:00
Allan Bazinet
96c8570c8f Eliminate aliasing
In this loop, j is just an alias for i; we don’t need both of them.
2024-09-13 10:29:46 -07:00
Allan Bazinet
4c4078e289 Eliminate magic static in drawing loop 2024-09-13 08:30:52 -07:00
Allan Bazinet
9af785bc82 Elminate dead stores in drawing loop
y2min and y2max are never read; pointess to compute them.
2024-09-13 07:55:30 -07:00
Allan Bazinet
ef57ed5a24 Simplify font usage 2024-09-13 06:16:09 -07:00
Allan Bazinet
640dae0e62 Correct minor tick placements 2024-09-12 19:00:35 -07:00
Allan Bazinet
effb255114 Constant frequency offset base value 2024-09-12 14:09:43 -07:00
Allan Bazinet
0c08379198 Avoid float to double conversion 2024-09-12 13:16:05 -07:00
Allan Bazinet
3925440507 Ensure bins per pixel sanity in manipulator
Clamp the low bound of the bins per pixel value to 1 in the manipulator, not later on, by which time it’s already too late.
2024-09-12 13:12:44 -07:00
Allan Bazinet
91cf199083 Consolidate paint code 2024-09-12 13:04:50 -07:00
Allan Bazinet
b6ca511090 Fill pixmap before allocating painter
The Qt docs indicate that filling a pixmap is UB while a painter is active; do the fill before attaching the painter.
2024-09-12 12:40:59 -07:00
Allan Bazinet
5fc481d719 Draw major ticks and labels in same pass 2024-09-12 12:37:10 -07:00
Allan Bazinet
bfc3e07789 Use general form of round up equation 2024-09-12 11:55:13 -07:00
Allan Bazinet
17b1809d02 Eliminate unused static ktop variable 2024-09-10 23:25:45 -07:00
Allan Bazinet
3becd07fdc Eliminate LineBuf2 static array
Never written do, and read only for a mode we don’t ever use. Buh-bye.
2024-09-10 06:55:06 -07:00
Allan Bazinet
e18b48597d Lint 2024-09-10 06:36:41 -07:00
Allan Bazinet
121e380220 Simplify scale drawing 2024-09-10 06:26:15 -07:00
Allan Bazinet
f54ff437ec Lose unused pen color 2024-09-09 21:40:57 -07:00
Allan Bazinet
0f577a572f Simplify band plan color drawing 2024-09-09 21:40:04 -07:00
Allan Bazinet
ffe02563cc Add dial bottom 2024-09-09 14:29:22 -07:00
Allan Bazinet
66d7487b59 Further simplify dial overlay drawing 2024-09-09 11:58:06 -07:00
Allan Bazinet
19b443bce9 Set grid drawing pen only once 2024-09-09 11:40:50 -07:00
Allan Bazinet
e35f43a39e Simplify dial overlay drawing 2024-09-09 11:34:32 -07:00
Allan Bazinet
a90c70f881 Dont create strings that we’re not going to use 2024-09-09 10:43:49 -07:00
Allan Bazinet
5222916bb8 Lose m_xOffset
This is only used as a scratch value in scale drawing, and should not be an instance variable.
2024-09-09 10:34:34 -07:00
Allan Bazinet
37d6afcb6d Lose m_HDivText
This was pretty much just utter madness, and I think that losing 483 default-constructed strings is just a heck of a good idea. Kinda dying to know where ‘483’ came from….
2024-09-09 10:29:04 -07:00
Allan Bazinet
61dab15843 Remove m_hdivs usage; it was weird, just weird 2024-09-09 10:11:31 -07:00
Allan Bazinet
69980a3885 Extract overlay scale drawing function 2024-09-09 07:50:19 -07:00
Allan Bazinet
53f2f544ea Extract dial and hover overlay drawing functions 2024-09-09 07:35:27 -07:00
Allan Bazinet
0998f831f9 Extract filter overlay drawing function 2024-09-09 07:10:00 -07:00
Allan Bazinet
14c2c2378d Make DrawOverlay() private
Drawing the overlay is an implementation detail of the plotter; remove access and move manipulator logic from wide graph. Remove write-only instance variables in wide graph class.
2024-09-09 06:12:37 -07:00
Allan Bazinet
c94b3c2118 Add TODO 2024-09-09 05:43:55 -07:00
Allan Bazinet
39e8d1ccbf Convert translators to switch tables 2024-09-09 05:34:41 -07:00
Allan Bazinet
7aa33ae066 Revert premature commit of waterfall high-dpi fix 2024-09-08 22:53:41 -07:00
Allan Bazinet
1b53b41ff3 Eliminate unused pens 2024-09-08 21:45:55 -07:00
Allan Bazinet
a21b8919a7 Use string view for WSPR check 2024-09-08 21:37:27 -07:00
Allan Bazinet
95fd843cb4 Extract bw function 2024-09-08 21:28:23 -07:00
Allan Bazinet
224276697b Lint 2024-09-08 20:13:33 -07:00