From 4aaa0703b082d00d3fda4546665e445701be4150 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Oct 2023 16:32:21 -0400 Subject: [PATCH] Update main.c don't shutdown if HAB mode --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 87433bed..da169608 100644 --- a/main.c +++ b/main.c @@ -805,6 +805,7 @@ int main(int argc, char * argv[]) { // if ((batteryVoltage > 1.0) && (batteryVoltage < batteryThreshold)) // no battery INA219 will give 0V, no battery plugged into INA219 will read < 1V /**/ +#ifndef HAB if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power. { fprintf(stderr, "Battery voltage too low: %f V - shutting down!\n", batteryVoltage); @@ -827,7 +828,7 @@ int main(int argc, char * argv[]) { pclose(file6); sleep(10); } - +#endif FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w"); printf("Writing telem_string.txt\n"); fprintf(fp, "Vbatt = %4.2f\n", batteryVoltage);