Display just the first two bytes of the AppKey

pull/30/head
Pawel Jalocha 2020-10-21 00:46:47 +01:00
rodzic f8f7060dd6
commit bb5013724b
1 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -835,10 +835,12 @@ void OLED_DrawLoRaWAN(u8g2_t *OLED, GPS_Position *GPS) // draw LoRaWAN status pa
else Len+=Format_Hex(Line+Len, WANdev.State);
Line[Len]=0; u8g2_DrawStr(OLED, 0, 24, Line);
if(WANdev.State<2)
{ Len =Format_HexBytes(Line, WANdev.AppKey , 8); Line[Len]=0; u8g2_DrawStr(OLED, 0, 36, Line);
Len =Format_HexBytes(Line, WANdev.AppKey+8, 8); Line[Len]=0; u8g2_DrawStr(OLED, 0, 48, Line); }
else
// if(WANdev.State<2)
// { Len =Format_HexBytes(Line, WANdev.AppKey , 8); Line[Len]=0; u8g2_DrawStr(OLED, 12, 36, Line);
// Len =Format_HexBytes(Line, WANdev.AppKey+8, 8); Line[Len]=0; u8g2_DrawStr(OLED, 12, 48, Line);
// u8g2_SetFont(OLED, u8g2_font_open_iconic_all_1x_t); u8g2_DrawGlyph(OLED, 1, 36, 0xC1); u8g2_DrawGlyph(OLED, 1, 48, 0xC1); }
// else
if(WANdev.State>=2)
{ Len =Format_String(Line , "Up: "); Len+=Format_Hex(Line+Len, (uint16_t)WANdev.UpCount);
Len+=Format_String(Line+Len, " Dn: "); Len+=Format_Hex(Line+Len, (uint16_t)WANdev.DnCount);
Line[Len]=0; u8g2_DrawStr(OLED, 0, 36, Line);
@ -849,6 +851,8 @@ void OLED_DrawLoRaWAN(u8g2_t *OLED, GPS_Position *GPS) // draw LoRaWAN status pa
Len+=Format_SignDec(Line+Len, ((int16_t)WANdev.RxSNR*10+2)>>2, 2, 1);
Len+=Format_String(Line+Len, "dB");
Line[Len]=0; u8g2_DrawStr(OLED, 0, 48, Line); }
Len=Format_HexBytes(Line, WANdev.AppKey, 2); Line[Len++]='.'; Line[Len++]='.'; Line[Len]=0; u8g2_DrawStr(OLED, 12, 60, Line);
u8g2_SetFont(OLED, u8g2_font_open_iconic_all_1x_t); u8g2_DrawGlyph(OLED, 1, 60, 0xC1);
// if(WANdev.State>=2) { }
/*