Skip to content

Commit cefe203

Browse files
committed
Add displayBaseSiv to resolve # 560
1 parent f9d628e commit cefe203

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

Firmware/RTK_Everywhere/Display.ino

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,15 @@ void displayUpdate()
327327
displayFullIPAddress(&iconPropertyList); // Bottom left - 128x64 only
328328
setRadioIcons(&iconPropertyList);
329329
paintBaseTempSurveyStarted(&iconPropertyList);
330-
displaySivVsOpenShort(&iconPropertyList);
330+
displayBaseSiv(&iconPropertyList); // 128x64 only
331331
break;
332332
case (STATE_BASE_TEMP_TRANSMITTING):
333333
paintLogging(&iconPropertyList);
334334
displayBatteryVsEthernet(&iconPropertyList); // Top right
335335
displayFullIPAddress(&iconPropertyList); // Bottom left - 128x64 only
336336
setRadioIcons(&iconPropertyList);
337337
paintRTCM(&iconPropertyList);
338-
displaySivVsOpenShort(&iconPropertyList);
338+
displayBaseSiv(&iconPropertyList); // 128x64 only
339339
break;
340340
case (STATE_BASE_FIXED_NOT_STARTED):
341341
displayBatteryVsEthernet(&iconPropertyList); // Top right
@@ -348,7 +348,7 @@ void displayUpdate()
348348
displayFullIPAddress(&iconPropertyList); // Bottom left - 128x64 only
349349
setRadioIcons(&iconPropertyList);
350350
paintRTCM(&iconPropertyList);
351-
displaySivVsOpenShort(&iconPropertyList);
351+
displayBaseSiv(&iconPropertyList); // 128x64 only
352352
break;
353353

354354
case (STATE_NTPSERVER_NOT_STARTED):
@@ -1664,6 +1664,17 @@ void displaySivVsOpenShort(std::vector<iconPropertyBlinking> *iconList)
16641664
}
16651665
}
16661666

1667+
void displayBaseSiv(std::vector<iconPropertyBlinking> *iconList)
1668+
{
1669+
// Display SIV during Base - but only on 128x64 displays. 64x48 has no room.
1670+
// No support for short / open.
1671+
if (present.display_type == DISPLAY_128x64)
1672+
{
1673+
displayCoords textCoords = paintSIVIcon(iconList, &BaseSIVIconProperties, 0b11111111);
1674+
paintSIVText(textCoords);
1675+
}
1676+
}
1677+
16671678
void displayHorizontalAccuracy(std::vector<iconPropertyBlinking> *iconList, const iconProperties *icon, uint8_t duty)
16681679
{
16691680
iconPropertyBlinking prop;
@@ -1724,26 +1735,14 @@ displayCoords paintSIVIcon(std::vector<iconPropertyBlinking> *iconList, const ic
17241735
if (lbandCorrectionsReceived || spartnCorrectionsReceived)
17251736
icon = &LBandIconProperties;
17261737
else
1727-
{
1728-
// If in Rover mode, always use SIVIconProperties
1729-
if (inBaseMode() == false)
1730-
icon = &SIVIconProperties;
1731-
// Else if in Base mode and during base settle, use SIVIconProperties
1732-
else if (systemState == STATE_BASE_TEMP_SETTLE)
1733-
icon = &SIVIconProperties; //During base settle, SIV inline with HPA
1734-
// Else use BaseSIVIconProperties.
1735-
// On 128x64 displays, SIV will be moved down to avoid collision with 'Xmitting RTCM' text
1736-
else
1737-
icon = &BaseSIVIconProperties;
1738-
}
1738+
icon = &SIVIconProperties;
17391739

17401740
// if in base mode, don't blink
17411741
if (inBaseMode() == true)
17421742
{
17431743
// override duty - solid satellite dish icon regardless of fix state
17441744
duty = 0b11111111;
17451745
}
1746-
17471746
// Determine if there is a fix
17481747
else if (gnss->isFixed() == false)
17491748
{

Firmware/RTK_Everywhere/icons.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1937,7 +1937,7 @@ const uint8_t SIVIconYPos64x48 = 35;
19371937
const uint8_t SIVIconXPos128x64 = 74; // Just because we can, move SIV to the right on 128x64
19381938
const uint8_t SIVIconYPos128x64 = 26;
19391939
const uint8_t BaseSIVIconXPos128x64 = 74; // Move SIV info below the 'Xmitting RTCM' text on 128x64
1940-
const uint8_t BaseSIVIconYPos128x64 = (26 + 15); // Assume font size 1;
1940+
const uint8_t BaseSIVIconYPos128x64 = (26 + 14); // Assume font size 1;
19411941

19421942
const int SIVTextStartXPosOffset[DISPLAY_MAX_NONE] = { -2, -2 }; // This is a bodge to allow the paintBaseTempSurveyStarted text to be printed in the correct place
19431943

0 commit comments

Comments
 (0)