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: TCTM.cpp
- Revision:
- 53:459b71b1861c
- Parent:
- 52:daa685b0e390
- Child:
- 54:d6a45982ace1
diff -r daa685b0e390 -r 459b71b1861c TCTM.cpp --- a/TCTM.cpp Fri Jul 22 22:21:05 2016 +0000 +++ b/TCTM.cpp Fri Aug 05 19:33:09 2016 +0000 @@ -498,7 +498,7 @@ telemetry[80+i] = jm_mms[i]; } - for(int i=0;i<2;i++) + for(int i=1;i<3;i++) telemetry[78+i] = bb_mms[i]; for(int i=0;i<16;i++) @@ -549,7 +549,7 @@ telemetry[i+19] = bae_HK_minmax.current_max[i]; } - telemetry[35] = bae_HK_minmax.Batt_voltage_max;; + telemetry[35] = bae_HK_minmax.Batt_voltage_max; telemetry[36] = bae_HK_minmax.BAE_temp_max; telemetry[37] = bae_HK_minmax.Batt_SOC_max; @@ -562,53 +562,59 @@ for(int i=0; i<3; i++) { - telemetry[41+i] = bae_HK_minmax.bit_data_acs_mm_max[i]; - telemetry[44+i] = bae_HK_minmax.bit_data_acs_mg_max[i]; + telemetry[41+(2*i)] = (bae_HK_minmax.bit_data_acs_mm_max[i]>>8); + telemetry[42+(2*i)] = bae_HK_minmax.bit_data_acs_mm_max[i]; + + telemetry[47+(2*i)] = (bae_HK_minmax.bit_data_acs_mg_max[i]>>8); + telemetry[48+(2*i)] = bae_HK_minmax.bit_data_acs_mg_max[i]; } /*min data*/ for(int i;i<16;i++) - telemetry[i+47] = bae_HK_minmax.voltage_min[i]; + telemetry[i+53] = bae_HK_minmax.voltage_min[i]; for(int i;i<16;i++) - telemetry[i+63] = bae_HK_minmax.current_min[i]; + telemetry[i+69] = bae_HK_minmax.current_min[i]; - telemetry[79] = bae_HK_minmax.Batt_voltage_min; - telemetry[80] = bae_HK_minmax.BAE_temp_min; + telemetry[85] = bae_HK_minmax.Batt_voltage_min; + telemetry[86] = bae_HK_minmax.BAE_temp_min; /*battery soc*/ - telemetry[81] = bae_HK_minmax.Batt_SOC_min; + telemetry[87] = bae_HK_minmax.Batt_SOC_min; - telemetry[82] = bae_HK_minmax.Batt_temp_min[0]; - telemetry[83] = bae_HK_minmax.Batt_temp_min[1]; + telemetry[88] = bae_HK_minmax.Batt_temp_min[0]; + telemetry[89] = bae_HK_minmax.Batt_temp_min[1]; //huhu// /*BCN temp named as BCN_TS_BUFFER there*/ - telemetry[84] = bae_HK_minmax.BCN_TEMP_min; + telemetry[90] = bae_HK_minmax.BCN_TEMP_min; for(int i=0; i<3; i++) { - telemetry[85+i] = bae_HK_minmax.bit_data_acs_mm_min[i]; - telemetry[88+i] = bae_HK_minmax.bit_data_acs_mg_min[i]; + telemetry[91+(2*i)] = (bae_HK_minmax.bit_data_acs_mm_min[i]>>8); + telemetry[92+(2*i)] = bae_HK_minmax.bit_data_acs_mm_min[i]; + + telemetry[97+(2*i)] = (bae_HK_minmax.bit_data_acs_mg_min[i]>>8); + telemetry[98+(2*i)] = bae_HK_minmax.bit_data_acs_mg_min[i]; } - telemetry[90] = BCN_TX_OC_FAULT; - telemetry[90] = (telemetry[90]<<1) | ACS_TR_XY_OC_FAULT; - telemetry[90] = (telemetry[90]<<1) | ACS_TR_Z_OC_FAULT; - telemetry[90] = (telemetry[90]<<1) | ACS_TR_XY_FAULT; + telemetry[103] = BCN_TX_OC_FAULT; + telemetry[103] = (telemetry[103]<<1) | ACS_TR_XY_OC_FAULT; + telemetry[103] = (telemetry[103]<<1) | ACS_TR_Z_OC_FAULT; + telemetry[103] = (telemetry[103]<<1) | ACS_TR_XY_FAULT; //EPS CHARGER - telemetry[90] = (telemetry[90]<<1) | EPS_CHARGER_FAULT;//eps_charger; - telemetry[90] = (telemetry[90]<<1) | CDMS_OC_FAULT; - telemetry[90] = (telemetry[90]<<1) | ACS_ATS1_OC_FAULT; - telemetry[90] = (telemetry[90]<<1) | ACS_ATS2_OC_FAULT; + telemetry[103] = (telemetry[103]<<1) | EPS_CHARGER_FAULT;//eps_charger; + telemetry[103] = (telemetry[103]<<1) | CDMS_OC_FAULT; + telemetry[103] = (telemetry[103]<<1) | ACS_ATS1_OC_FAULT; + telemetry[103] = (telemetry[103]<<1) | ACS_ATS2_OC_FAULT; - telemetry[91] = ACS_TR_Z_FAULT; + telemetry[104] = (ACS_TR_Z_FAULT<<7); //spare 23 bits - telemetry[92] = 0x00; - telemetry[93] = 0x00; + telemetry[105] = 0x00; + telemetry[106] = 0x00; - for (int i=94; i<132;i++) + for (int i=107; i<132;i++) { telemetry[i] = 0x00; }