Skip to content

Commit 9bfb2a7

Browse files
authored
Merge pull request #627 from LeeLeahy2/halt-display
Display: Add displayHalt routine, call from reportFatalError
2 parents 75aedf4 + 233beff commit 9bfb2a7

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

Firmware/RTK_Everywhere/Display.ino

+15
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static QwiicCustomOLED *oled = nullptr;
9999
// Fonts
100100
#include <res/qw_fnt_5x7.h>
101101
#include <res/qw_fnt_8x16.h>
102+
#include <res/qw_fnt_31x48.h>
102103
#include <res/qw_fnt_largenum.h>
103104

104105
// Icons
@@ -2270,6 +2271,20 @@ void displayEventMarked(uint16_t displayTime)
22702271
displayMessage("Event Marked", displayTime);
22712272
}
22722273

2274+
// Print the error message every 15 seconds
2275+
void displayHalt()
2276+
{
2277+
if (online.display)
2278+
{
2279+
oled->erase(); // Clear the display's internal buffer
2280+
int yPos = (oled->getHeight() - 16) / 2;
2281+
QwiicFont * font = (oled->getWidth() > 64) ? (QwiicFont *)&QW_FONT_31X48
2282+
: (QwiicFont *)&QW_FONT_8X16;
2283+
printTextCenter("Halt", yPos, *font, 1, false); // text, y, font type, kerning, inverted
2284+
oled->display(); // Push internal buffer to display
2285+
}
2286+
}
2287+
22732288
void displayNoLogging(uint16_t displayTime)
22742289
{
22752290
displayMessage("No Logging", displayTime);

Firmware/RTK_Everywhere/RTK_Everywhere.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,6 @@ void setup()
10731073
systemPrintln();
10741074
systemPrintln();
10751075

1076-
DMW_b("verifyTables");
1077-
verifyTables(); // Verify the consistency of the internal tables
1078-
10791076
DMW_b("findSpiffsPartition");
10801077
if (!findSpiffsPartition())
10811078
{
@@ -1130,6 +1127,9 @@ void setup()
11301127
DMW_b("beginDisplay");
11311128
beginDisplay(i2cDisplay); // Start display to be able to display any errors
11321129

1130+
DMW_b("verifyTables");
1131+
verifyTables(); // Verify the consistency of the internal tables
1132+
11331133
beginVersion(); // Assemble platform name. Requires settings/LFS.
11341134

11351135
DMW_b("beginGnssUart");

Firmware/RTK_Everywhere/System.ino

+1
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ const char *coordinatePrintableInputType(CoordinateInputType coordinateInputType
765765
// Print the error message every 15 seconds
766766
void reportFatalError(const char *errorMsg)
767767
{
768+
displayHalt();
768769
while (1)
769770
{
770771
systemPrint("HALTED: ");

0 commit comments

Comments
 (0)