Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of workinQM_5thJan_azad by
Diff: EPS.cpp
- Revision:
- 96:6603fedb6b69
- Parent:
- 95:d9ad0e6481be
diff -r d9ad0e6481be -r 6603fedb6b69 EPS.cpp
--- a/EPS.cpp Thu Jan 05 13:02:41 2017 +0000
+++ b/EPS.cpp Wed Jan 25 09:09:43 2017 +0000
@@ -231,6 +231,8 @@
timer_soc.reset();
timer_soc.start();
actual_data.Batt_gauge_actual[1] = soc();
+ //eps_pc.printf("\n\r is soc assigned??? \n\r");
+
timer_soc.stop();
actual_data.Batt_voltage_actual = Batt_voltage.read()*3.3; //1 corresponds to 3.3 scaling factor
@@ -599,6 +601,9 @@
//changed
quant_data.Batt_voltage_quant = 10*(actual_data.Batt_voltage_actual);
+ // eps_pc.printf("\n\r the actual_data.batt_vol_actual %f \n\r",actual_data.Batt_voltage_actual);
+
+ // eps_pc.printf("\n\r the quant_data.batt_vol_actual %d \n\r",quant_data.Batt_voltage_quant);
/*quant_data.Batt_voltage_quant= float_to_uint8(0,25.0,actual_data.Batt_voltage_actual);*/
/*
for(Iteration=0; Iteration<16; Iteration++)
@@ -781,12 +786,20 @@
LONG_HK_data[1][106+i] = quant_data.current_quant[i];
}
- LONG_HK_data[1][122] = quant_data.Batt_voltage_quant;
+ LONG_HK_data[1][122] = quant_data.Batt_voltage_quant;//checked
eps_pc.printf("\n\rBattery voltage in LONG_HK: %d\n\r",LONG_HK_data[1][122]);
- LONG_HK_data[1][123] = quant_data.BAE_temp_quant;
+ LONG_HK_data[1][123] = quant_data.BAE_temp_quant; /**/
+ eps_pc.printf("\n\rquant_data.BAE_temp_quant %d \n\r",LONG_HK_data[1][123]);
+
+
LONG_HK_data[1][124] = (uint8_t)(actual_data.Batt_gauge_actual[1]);
+ //LONG_HK_data[1][124] = soc();//just for debugging
+ //eps_pc.printf("Battery SOC in LONG_HK in float: %f\n\r",actual_data.Batt_gauge_actual[1]); //not needed
eps_pc.printf("Battery SOC in LONG_HK: %d\n\r",LONG_HK_data[1][124]);
+ eps_pc.printf("Battery SOC in eps in float: %f\n\r",soc());
+ eps_pc.printf("Battery SOC in eps: %d\n\r",(int)soc());
LONG_HK_data[1][125] = quant_data.Batt_temp_quant[0];
+ //LONG_HK_data[1][125] = actual_data.Batt_temp_actual[0]; //just for debugging
eps_pc.printf("Battery TMP1 in LONG_HK: %d\n\r",LONG_HK_data[1][125]);
LONG_HK_data[1][126] = quant_data.Batt_temp_quant[1];
eps_pc.printf("Battery TMP2 in LONG_HK: %d\n\r",LONG_HK_data[1][126]);
