Skip to content

Commit 29936c4

Browse files
committed
Add system pulse when not logging.
1 parent 2ffa3c2 commit 29936c4

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,41 @@ void paintLogging()
475475
else if (loggingIconDisplayed == 3)
476476
oled.drawIcon(64 - Logging_3_Width, 48 - Logging_3_Height, Logging_3_Width, Logging_3_Height, Logging_3, sizeof(Logging_3), true); //Draw the icon
477477
}
478+
else
479+
{ //Paint pulse to show system activity
480+
//Animate icon to show system running
481+
if (millis() - lastLoggingIconUpdate > 500)
482+
{
483+
lastLoggingIconUpdate = millis();
484+
485+
loggingIconDisplayed++; //Goto next icon
486+
loggingIconDisplayed %= 4; //Wrap
487+
488+
const int pulseX = 64 - 4;
489+
const int pulseY = oled.getLCDHeight();
490+
491+
if (loggingIconDisplayed == 0)
492+
{
493+
//Paint no line
494+
}
495+
else if (loggingIconDisplayed == 1)
496+
{
497+
oled.line(pulseX, pulseY, pulseX, pulseY - 4);
498+
oled.line(pulseX - 1, pulseY, pulseX - 1, pulseY - 4);
499+
}
500+
else if (loggingIconDisplayed == 2)
501+
{
502+
oled.line(pulseX, pulseY, pulseX, pulseY - 8);
503+
oled.line(pulseX - 1, pulseY, pulseX - 1, pulseY - 8);
504+
}
505+
else if (loggingIconDisplayed == 3)
506+
{
507+
oled.line(pulseX, pulseY, pulseX, pulseY - 12);
508+
oled.line(pulseX - 1, pulseY, pulseX - 1, pulseY - 12);
509+
}
510+
}
511+
512+
}
478513
}
479514
}
480515

0 commit comments

Comments
 (0)