commit 20bdd0d4d9490cbed75edfe1cb244259239cdbfa
parent 220dc3797db5798e722e761c8bdf47f8ae8050b2
Author: Lukas F. Hartmann <lukas@mntre.com>
Date: Sat, 25 Sep 2021 15:44:32 +0200
lpc: report som power state; 15 mins powersave holdoff time
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/reform2-lpc-fw/src/boards/reform2/board_reform2.c b/reform2-lpc-fw/src/boards/reform2/board_reform2.c
@@ -39,10 +39,10 @@
// don't forget to set this to the correct rev for your motherboard!
#define REFORM_MOTHERBOARD_REV REFORM_MBREV_R3
//#define REF2_DEBUG 1
-#define FW_REV "MREF2LPC R3 20210924"
+#define FW_REV "MREF2LPC R3 20210925"
#define POWERSAVE_SLEEP_SECONDS 1
-#define POWERSAVE_HOLDOFF_CYCLES 30
+#define POWERSAVE_HOLDOFF_CYCLES (60*15)
#define INA260_ADDRESS 0x4e
#define LTC4162F_ADDRESS 0x68
@@ -724,7 +724,7 @@ void handle_commands() {
}
int mV = (int)(volts*1000.0);
- sprintf(uartBuffer,"%02d%c%02d%c%02d%c%02d%c%02d%c%02d%c%02d%c%02d%cmA%c%04dmV%05d %s\r\n",
+ sprintf(uartBuffer,"%02d%c%02d%c%02d%c%02d%c%02d%c%02d%c%02d%c%02d%cmA%c%04dmV%05d %s P%d\r\n",
(int)(cells_v[0]*10),
(discharge_bits &(1<<0))?'!':' ',
(int)(cells_v[1]*10),
@@ -744,7 +744,8 @@ void handle_commands() {
mA_sign,
mA,
mV,
- gauge);
+ gauge,
+ som_is_powered);
uartSend((uint8_t*)uartBuffer, strlen(uartBuffer));
}
else if (remote_cmd == 'S') {