Reduce stack usage: Make logo stored in flash, fix oled (#33)

This way the OLED display does not overwrite useful data since
the stack on the F072RB in mbed is just 1k and the logog is also 1k.
Also fixed minor issue in OLED display code (refactoring not done).
This commit is contained in:
hogthrob
2019-06-22 07:29:40 +02:00
committed by Martin Jäger
parent b3aada7d4e
commit 32005a5642
2 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -130,11 +130,11 @@ void uext_process_1s()
oled.printf("%5.1fV", ls_bus.voltage);
// load data
tmp = ls_bus.voltage * load.current;
tmp = ls_bus.voltage * load.bus->current;
oled.setTextCursor(90, 18);
oled.printf("%5.1fW", (abs(tmp) < 0.1) ? 0 : tmp); // remove negative zeros
oled.setTextCursor(90, 26);
oled.printf("%5.1fA\n", (abs(load.current) < 0.1) ? 0 : load.current);
oled.printf("%5.1fA\n", (abs(load.bus->current) < 0.1) ? 0 : load.bus->current);
oled.setTextCursor(0, 36);
oled.printf("Day +%5.0fWh -%5.0fWh", hs_bus.dis_energy_Wh, fabs(load_bus.chg_energy_Wh));