Skip to content

Commit

Permalink
Add BLE name to display
Browse files Browse the repository at this point in the history
  • Loading branch information
atc1441 committed Feb 23, 2022
1 parent ff19c0a commit 4c2f621
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Binary file modified Firmware/ATC_Paper.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion Firmware/src/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RAM uint8_t advertising_data[] = {
/*BatM*/ 0xdd, 0xdd,
/*Counter*/ 0x00};

uint8_t mac_public[6];
RAM uint8_t mac_public[6];

_attribute_ram_code_ void app_switch_to_indirect_adv(uint8_t e, uint8_t *p, int n)
{
Expand Down
7 changes: 5 additions & 2 deletions Firmware/src/epd.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,19 @@ _attribute_ram_code_ void epd_display_tiff(uint8_t *pData, int iSize)
EPD_Display(epd_buffer, epd_buffer_size, 1);
} /* epd_display_tiff() */

extern uint8_t mac_public[6];
_attribute_ram_code_ void epd_display(uint32_t time_is, uint16_t battery_mv, int16_t temperature, uint8_t full_or_partial)
{
if (epd_update_state)
return;
obdCreateVirtualDisplay(&obd, 250, 122, epd_temp);
obdFill(&obd, 0, 0); // fill with white

char buff[25];
char buff[100];
sprintf(buff, "ESL_%02X%02X%02X", mac_public[2],mac_public[1],mac_public[0]);
obdWriteStringCustom(&obd, (GFXfont *)&Dialog_plain_16, 1, 17, (char *)buff, 1);
sprintf(buff, "%02d:%02d", ((time_is / 60) / 60) % 24, (time_is / 60) % 60);
obdWriteStringCustom(&obd, (GFXfont *)&DSEG14_Classic_Mini_Regular_40, 50, 60, (char *)buff, 1);
obdWriteStringCustom(&obd, (GFXfont *)&DSEG14_Classic_Mini_Regular_40, 50, 65, (char *)buff, 1);
sprintf(buff, "%d'C", EPD_read_temp());
obdWriteStringCustom(&obd, (GFXfont *)&Special_Elite_Regular_30, 10, 95, (char *)buff, 1);
sprintf(buff, "Battery %dmV", battery_mv);
Expand Down

0 comments on commit 4c2f621

Please sign in to comment.