mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-11-19 22:42:32 -05:00
Fixed device name offset in display
This commit is contained in:
parent
6d4a48af1f
commit
aa852f4aed
2 changed files with 9 additions and 6 deletions
11
Display.h
11
Display.h
|
|
@ -838,11 +838,12 @@ void draw_disp_area() {
|
|||
else { disp_area.drawBitmap(0, 0, bm_def, disp_area.width(), 23, SSD1306_WHITE, SSD1306_BLACK); }
|
||||
|
||||
disp_area.setFont(SMALL_FONT); disp_area.setTextWrap(false); disp_area.setTextColor(SSD1306_WHITE); disp_area.setTextSize(2);
|
||||
disp_area.fillRect(0, 20, disp_area.width(), 17, SSD1306_BLACK);
|
||||
if ((bt_dh[15] & 0b00001111) == 0x01) { disp_area.setCursor(25, 32); }
|
||||
else { disp_area.setCursor(16, 32); }
|
||||
disp_area.printf("%02X%02X", bt_dh[14], bt_dh[15]);
|
||||
|
||||
disp_area.fillRect(0, 20, disp_area.width(), 17, SSD1306_BLACK); uint8_t ofsc = 0;
|
||||
if ((bt_dh[14] & 0b00001111) == 0x01) { ofsc += 8; }
|
||||
if ((bt_dh[14] >> 4) == 0x01) { ofsc += 8; }
|
||||
if ((bt_dh[15] & 0b00001111) == 0x01) { ofsc += 8; }
|
||||
if ((bt_dh[15] >> 4) == 0x01) { ofsc += 8; }
|
||||
disp_area.setCursor(17+ofsc, 32); disp_area.printf("%02X%02X", bt_dh[14], bt_dh[15]);
|
||||
}
|
||||
|
||||
if (!hw_ready || radio_error || !device_firmware_ok()) {
|
||||
|
|
|
|||
4
Power.h
4
Power.h
|
|
@ -196,7 +196,9 @@ void kiss_indicate_battery();
|
|||
void kiss_indicate_temperature();
|
||||
|
||||
void measure_temperature() {
|
||||
if (pmu_temp_sensor_ready) { pmu_temperature = temperatureRead(); } else { pmu_temperature = PMU_TEMP_MIN-1; }
|
||||
#if PLATFORM == PLATFORM_ESP32
|
||||
if (pmu_temp_sensor_ready) { pmu_temperature = temperatureRead(); } else { pmu_temperature = PMU_TEMP_MIN-1; }
|
||||
#endif
|
||||
}
|
||||
|
||||
void measure_battery() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue