Skip to content

Commit 25b7b8f

Browse files
committed
Blink base icons during wait
1 parent 99392ad commit 25b7b8f

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ uint32_t setWiFiIcon()
10801080
uint32_t setModeIcon()
10811081
{
10821082
uint32_t icons = 0;
1083+
10831084
switch (systemState)
10841085
{
10851086
case (STATE_ROVER_NOT_STARTED):
@@ -1100,17 +1101,17 @@ uint32_t setModeIcon()
11001101
case (STATE_BASE_NOT_STARTED):
11011102
//Do nothing. Static display shown during state change.
11021103
break;
1103-
11041104
case (STATE_BASE_TEMP_SETTLE):
1105+
icons |= blinkBaseIcon(ICON_BASE_TEMPORARY);
11051106
break;
11061107
case (STATE_BASE_TEMP_SURVEY_STARTED):
1107-
//TODO need blinking
1108-
icons |= ICON_BASE_TEMPORARY;
1108+
icons |= blinkBaseIcon(ICON_BASE_TEMPORARY);
11091109
break;
11101110
case (STATE_BASE_TEMP_TRANSMITTING):
11111111
icons |= ICON_BASE_TEMPORARY;
11121112
break;
11131113
case (STATE_BASE_FIXED_NOT_STARTED):
1114+
//Do nothing. Static display shown during state change.
11141115
break;
11151116
case (STATE_BASE_FIXED_TRANSMITTING):
11161117
icons |= ICON_BASE_FIXED;
@@ -1122,6 +1123,25 @@ uint32_t setModeIcon()
11221123
return (icons);
11231124
}
11241125

1126+
uint32_t blinkBaseIcon(uint32_t iconType)
1127+
{
1128+
uint32_t icons = 0;
1129+
1130+
//Limit how often we update this spot
1131+
if (millis() - thirdRadioSpotTimer > 1000)
1132+
{
1133+
thirdRadioSpotTimer = millis();
1134+
thirdRadioSpotBlink ^= 1; //Share the spot
1135+
}
1136+
1137+
if (thirdRadioSpotBlink == false)
1138+
icons |= iconType;
1139+
else
1140+
icons |= ICON_BLANK_RIGHT;
1141+
1142+
return icons;
1143+
}
1144+
11251145
/*
11261146
111111111122222222223333333333444444444455555555556666
11271147
0123456789012345678901234567890123456789012345678901234567890123

0 commit comments

Comments
 (0)