Skip to content

Commit 46b3745

Browse files
committed
Better Bias display
1 parent 3ef10f1 commit 46b3745

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Firmware/GNSSDO_Firmware/Display.ino

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,21 @@ void updateDisplay()
169169
oled->print(textLine);
170170
yPos += 8;
171171

172-
if ((tcxoClockBias_ms >= 1.0) || (tcxoClockBias_ms <= -1.0))
172+
if (tcxoClockBias_ms >= 1.0)
173+
snprintf(textLine, sizeof(textLine), "Bias +%.3fms",
174+
(float)tcxoClockBias_ms);
175+
else if (tcxoClockBias_ms <= -1.0)
173176
snprintf(textLine, sizeof(textLine), "Bias %.3fms",
174177
(float)tcxoClockBias_ms);
175-
else if ((tcxoClockBias_ms >= 0.001) || (tcxoClockBias_ms <= -0.001))
178+
else if (tcxoClockBias_ms >= 0.001)
179+
snprintf(textLine, sizeof(textLine), "Bias +%.3fus",
180+
(float)(tcxoClockBias_ms * 1000.0));
181+
else if (tcxoClockBias_ms <= -0.001)
176182
snprintf(textLine, sizeof(textLine), "Bias %.3fus",
177183
(float)(tcxoClockBias_ms * 1000.0));
184+
else if (tcxoClockBias_ms >= 0.0)
185+
snprintf(textLine, sizeof(textLine), "Bias +%.3fns",
186+
(float)(tcxoClockBias_ms * 1000000.0));
178187
else
179188
snprintf(textLine, sizeof(textLine), "Bias %.3fns",
180189
(float)(tcxoClockBias_ms * 1000000.0));

0 commit comments

Comments
 (0)