Skip to content

Commit d999ea4

Browse files
authored
Merge pull request #210 from LeeLeahy2/sparkfun-logo
Display SparkFun LOGO on power up
2 parents a7ea619 + 3c308d7 commit d999ea4

File tree

3 files changed

+113
-2
lines changed

3 files changed

+113
-2
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ void beginDisplay()
6262
online.display = true;
6363

6464
Serial.println(F("Display started"));
65-
displaySplash();
65+
66+
//Display the SparkFun LOGO
67+
oled.erase();
68+
displayBitmap(0, 0, logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
69+
oled.display();
6670
splashStart = millis();
6771
}
6872
else
@@ -397,6 +401,10 @@ void displaySplash()
397401
{
398402
if (online.display == true)
399403
{
404+
//Display SparkFun Logo for at least 1/10 of a second
405+
while ((millis() - splashStart) < 100)
406+
delay(10);
407+
400408
oled.erase();
401409

402410
int yPos = 0;
@@ -440,6 +448,9 @@ void displaySplash()
440448
printTextCenter(unitFirmware, yPos, QW_FONT_5X7, 1, false);
441449

442450
oled.display();
451+
452+
//Start the timer for the splash screen display
453+
splashStart = millis();
443454
}
444455
}
445456

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,15 @@ void setup()
426426
Wire.begin(); //Start I2C on core 1
427427
//Wire.setClock(400000);
428428

429+
beginDisplay(); //Start display first to be able to display any errors
430+
429431
beginGNSS(); //Connect to GNSS to get module type
430432

431433
beginFS(); //Start file system for settings
432434

433435
beginBoard(); //Determine what hardware platform we are running on and check on button
434436

435-
beginDisplay(); //Start display first to be able to display any errors
437+
displaySplash(); //Display the RTK product name and firmware version
436438

437439
beginLEDs(); //LED and PWM setup
438440

Firmware/RTK_Surveyor/icons.h

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,3 +700,101 @@ uint8_t UploadArrow [] = {
700700
};
701701
int UploadArrow_Height = 9;
702702
int UploadArrow_Width = 8;
703+
704+
/*
705+
logoSparkFun [64, 48]
706+
707+
1 2 3 4 5 6
708+
1234567890123456789012345678901234567890123456789012345678901234
709+
.----------------------------------------------------------------.
710+
0x01| ********** |
711+
0x02| ************* |
712+
0x04| ************** |
713+
0x08| *********** |
714+
0x10| ********** |
715+
0x20| *********** |
716+
0x40| *********** |
717+
0x80| *********** ** |
718+
0x01| ************ *** |
719+
0x02| ************* **** |
720+
0x04| ********************* |
721+
0x08| ********************* |
722+
0x10| ******************** |
723+
0x20| ********************* |
724+
0x40| ******************* |
725+
0x80| ******* ******************* |
726+
0x01| ******* ****************** |
727+
0x02| ******* ***************** |
728+
0x04| ******** ****************** |
729+
0x08| ******** ****************** |
730+
0x10| ********* ******************* |
731+
0x20| ********************************* |
732+
0x40| ********************************* |
733+
0x80| ********************************* |
734+
0x01| ********************************* |
735+
0x02| ******************************** |
736+
0x04| ******************************** |
737+
0x08| ******************************* |
738+
0x10| ******************************* |
739+
0x20| ****************************** |
740+
0x40| ***************************** |
741+
0x80| **************************** |
742+
0x01| *************************** |
743+
0x02| ************************** |
744+
0x04| ************************ |
745+
0x08| ********************* |
746+
0x10| ************* |
747+
0x20| *********** |
748+
0x40| ********** |
749+
0x80| ********* |
750+
0x01| ******** |
751+
0x02| ******* |
752+
0x04| ****** |
753+
0x08| ***** |
754+
0x10| **** |
755+
0x20| *** |
756+
0x40| ** |
757+
0x80| * |
758+
'----------------------------------------------------------------'
759+
*/
760+
761+
//SparkFun Electronics LOGO
762+
uint8_t logoSparkFun [] = {
763+
// ROW0, BYTE0 to BYTE63
764+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
765+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
766+
0xFF, 0xFF, 0xFF, 0x0F, 0x07, 0x07, 0x06, 0x06, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
767+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
768+
769+
// ROW1, BYTE64 to BYTE127
770+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
771+
0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x07, 0x0F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF,
772+
0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xE0,
773+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
774+
775+
// ROW2, BYTE128 to BYTE191
776+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC,
777+
0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xF0, 0xFD, 0xFF,
778+
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
779+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
780+
781+
// ROW3, BYTE192 to BYTE255
782+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
783+
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
784+
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x07, 0x01,
785+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
786+
787+
// ROW4, BYTE256 to BYTE319
788+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
789+
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x1F, 0x0F, 0x0F, 0x0F, 0x0F,
790+
0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
791+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
792+
793+
// ROW5, BYTE320 to BYTE383
794+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
795+
0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
796+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
797+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
798+
};
799+
int logoSparkFun_Height = 48;
800+
int logoSparkFun_Width = 64;

0 commit comments

Comments
 (0)