Skip to content

Commit

Permalink
Display the CPU serial
Browse files Browse the repository at this point in the history
  • Loading branch information
pjalocha committed May 23, 2023
1 parent b99cf5b commit 4a2fc76
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions main/disp_oled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,25 +812,34 @@ void OLED_DrawSystem(u8g2_t *OLED, GPS_Position *GPS)
void OLED_DrawID(u8g2_t *OLED, GPS_Position *GPS)
{ u8g2_SetFont(OLED, u8g2_font_9x15_tr);
Parameters.Print(Line); Line[10]=0;
u8g2_DrawStr(OLED, 26, 28, Line);
u8g2_DrawStr(OLED, 26, 25, Line);
// u8g2_SetFont(OLED, u8g2_font_10x20_tr);
u8g2_SetFont(OLED, u8g2_font_7x13_tf);
u8g2_DrawStr(OLED, 0, 27, "ID:");
u8g2_DrawStr(OLED, 0, 24, "ID:");
if(Parameters.Pilot[0] || Parameters.Reg[0])
{ strcpy(Line, "Reg: "); strcat(Line, Parameters.Reg);
u8g2_DrawStr(OLED, 0, 54, Line);
strcpy(Line, "Pilot: "); strcat(Line, Parameters.Pilot);
u8g2_DrawStr(OLED, 0, 42, Line); }
{ strcpy(Line, "Pilot: "); strcat(Line, Parameters.Pilot);
u8g2_DrawStr(OLED, 0, 37, Line);
strcpy(Line, "Reg: "); strcat(Line, Parameters.Reg);
u8g2_DrawStr(OLED, 0, 49, Line); }
else
{
#ifdef WITH_FollowMe
u8g2_DrawStr(OLED, 15, 44, "FollowMe868");
u8g2_DrawStr(OLED, 20, 56, "by AVIONIX");
#endif
}
u8g2_SetFont(OLED, u8g2_font_5x8_tr);
u8g2_DrawStr(OLED, 96, 62, "v" STR(VERSION));
}
// u8g2_SetFont(OLED, u8g2_font_5x8_tr);
u8g2_SetFont(OLED, u8g2_font_6x12_tr);
// u8g2_DrawStr(OLED, 96, 62, "v" STR(VERSION));
uint64_t ID=getUniqueID();
uint8_t Len=Format_String(Line, "#");
Len+=Format_Hex(Line+Len, (uint16_t)(ID>>32));
Len+=Format_Hex(Line+Len, (uint32_t)ID);
// Line[Len++]=' ';
// Line[Len++]='v';
Len+=Format_String(Line+Len, " v"STR(VERSION));
Line[Len]=0;
u8g2_DrawStr(OLED, 0, 62, Line); }

void OLED_DrawAltitudeAndSpeed(u8g2_t *OLED, GPS_Position *GPS)
{ uint8_t Len;
Expand Down

0 comments on commit 4a2fc76

Please sign in to comment.