Cell voltages fork (SoC)

Dependencies:   CUER_CAN CUER_DS1820 LTC2943 LTC6804 mbed PowerControl

Revision:
60:ba1f45b46f97
Parent:
59:e8ac52b71d8d
Child:
62:c7bc95aa818a
--- a/main.cpp	Fri Aug 25 18:06:20 2017 +0000
+++ b/main.cpp	Sat Aug 26 09:31:19 2017 +0000
@@ -12,7 +12,7 @@
 #include "PowerControl/PowerControl.h"
 #include "PowerControl/EthernetPowerControl.h"
 
-#define DEBUG 1
+#define DEBUG 0
 #define IVTA_DEBUG 0
 #define TEMPERATURE_DEBUG 0
 #define TRANSMIT_MODE 1 //Useful to allow testing CAN read on BCU. Leave as 1 for BMS (and CAN write) 0 for BCU read-mode
@@ -502,7 +502,7 @@
     }
     if (measurements.min_cell_voltage.voltage < MIN_CELL_VOLTAGE) {
         status = status | CELL_UNDER_VOLTAGE;
-        printf(" \r\n \r\n \r\n Min cell in check MEASUREMENTS is voltage is %d \r\n", measurements.min_cell_voltage.voltage);
+        //printf(" \r\n \r\n \r\n Min cell in check MEASUREMENTS is voltage is %d \r\n", measurements.min_cell_voltage.voltage);
     }
     if (maxTemp.temperature > MAX_CELL_CHARGE_TEMPERATURE && (temp_measurements_timer.read() > initial_temperature_delay || temperature_measurements_received)) {
         status = status | CELL_OVER_CHARGE_TEMPERATURE;
@@ -601,7 +601,7 @@
     float temp_Ah;
     
     if (ivta_get_current(temp_current)) measurements.battery_current = temp_current;
-    wait(0.01);
+    wait(0.1);
     if (ivta_read_Ah_meter(temp_Ah)) { //&& (abs(measurements.SOC - (initial_pack_SOC + temp_Ah)) < 0.1)) {
         measurements.SOC = initial_pack_SOC + temp_Ah;
         measurements.percentage_SOC = (measurements.SOC/BATTERY_CAPACITY) * 100;