Fixed missing free in display handler

This commit is contained in:
Mark Qvist 2023-01-10 14:27:03 +01:00
parent 18c0f65295
commit b93e321d39
2 changed files with 4 additions and 5 deletions

View File

@ -346,7 +346,7 @@ void draw_disp_area() {
disp_area.drawBitmap(0, 37, bm_hwfail, disp_area.width(), 27, SSD1306_WHITE, SSD1306_BLACK);
}
}
} else if (bt_state == BT_STATE_PAIRING and bt_ssp_pin != 0) {
} else if (bt_state == BT_STATE_PAIRING and bt_ssp_pin != 0) {
char *pin_str = (char*)malloc(DISP_PIN_SIZE+1);
sprintf(pin_str, "%06d", bt_ssp_pin);
@ -356,7 +356,7 @@ void draw_disp_area() {
uint8_t offset = numeric*5;
disp_area.drawBitmap(7+9*i, 37+16, bm_n_uh+offset, 8, 5, SSD1306_WHITE, SSD1306_BLACK);
}
free(pin_str);
} else {
if (millis()-last_page_flip >= page_interval) {
disp_page = (++disp_page%pages);
@ -398,6 +398,7 @@ void draw_disp_area() {
if (i == 2) dxp += 9*2+4;
disp_area.drawBitmap(dxp, 37+16, bm_n_uh+bm_offset, 8, 5, SSD1306_WHITE, SSD1306_BLACK);
}
free(v_str);
disp_area.drawLine(27, 37+19, 28, 37+19, SSD1306_BLACK);
disp_area.drawLine(27, 37+20, 28, 37+20, SSD1306_BLACK);
}

View File

@ -989,7 +989,7 @@ void loop() {
if (console_active) {
console_loop();
} else {
//led_indicate_standby();
led_indicate_standby();
}
} else {
@ -999,10 +999,8 @@ void loop() {
}
#if MCU_VARIANT == MCU_ESP32
// if (!console_active) {
buffer_serial();
if (!fifo_isempty(&serialFIFO)) serial_poll();
// }
#else
if (!fifo_isempty_locked(&serialFIFO)) serial_poll();
#endif