123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- /*
- * CanVar.c
- *
- * Created on: 2021年12月27日
- * 编码
- * Author: QiXiang_CHENJIE
- */
- #include "CanVar.h"
- /************************************************************
- *CAN0->BMC解码变量存放区
- ************************************************************/
- UINT32 Can0InTable[2] =
- {
- 0x18FF5A51,
- 0x18FF5A52,
- };
- BOOL Can0RxShortError[2];
- BOOL Can0RxLongError[2];
- UINT8 Can0RxErrorCounter[2];
- UINT8 Can0RxFlag[2];
- UINT8 gashighLevel_gf1 = 0;
- UINT8 gaslowLevel_gf1 = 0;
- UINT8 temp_gf1 = 0;
- UINT8 warningLevel_gf1 = 0;
- UINT8 workMode_gf1 = 0;
- UINT8 fumesHigh_gf1 = 0;
- UINT8 fumesLow_gf1 = 0;
- UINT8 gashighLevel_gf2 = 0;
- UINT8 gaslowLevel_gf2 = 0;
- UINT8 temp_gf2 = 0;
- UINT8 warningLevel_gf2 = 0;
- UINT8 workMode_gf2 = 0;
- UINT8 fumesHigh_gf2 = 0;
- UINT8 fumesLow_gf2 = 0;
- /************************************************************
- *CAN1->BMC解码变量存放区
- ************************************************************/
- UINT32 Can1InTable[1] =
- {
- 0x18FF1200,
- };
- BOOL Can1RxShortError[1];
- BOOL Can1RxLongError[1];
- UINT8 Can1RxErrorCounter[1];
- UINT8 Can1RxFlag[1];
- UINT8 chrgModulePwrCtrl = 0; //充电模块总电源控制(交流接触器)XK36输出控制
- UINT8 baseSwitchCtrl = 0; //底座/充电枪切换总控制(0X1切换到枪,充电停止状态可动作。0X0切换到底座,充电停止状态可动作。)
- UINT8 paraChrgCtrlState = 0; //充电机并充控制状态
- UINT8 chrgStartState = 0; //充电开始状态
- UINT8 chrgStopState = 0; //充电停止状态
- /************************************************************
- *BMC->CAN1解码变量存放区
- ************************************************************/
- UINT32 Can1OutTable[4][4] =
- {
- {0x18FF1100, 100},
- {0x18FF1101, 100},
- {0x18FF1102, 100},
- {0x18FF1103, 100}
- };
- UINT8 connectorHvlock1 = 0; //动力连接器互锁信号1
- UINT8 connectorHvlock2 = 0; //动力连接器互锁信号2
- UINT8 chrgModuelPwrCtlFB = 0; //充电模块总电源控制反馈
- UINT8 paraChrgCtlFB = 0; //并充控制状态反馈
- UINT8 outToChrgCtlFB_A = 0; // A路至充电枪输出状态反馈
- UINT8 outToBaseCtlFB_A = 0; // A路至底座输出状态反馈
- UINT8 outToChrgCtlFB_B = 0; // B路至充电枪输出状态反馈
- UINT8 outToBaseCtlFB_B = 0; // B路至底座输出状态反馈
- UINT8 fuseActionFB_A = 0; // A路熔断器熔断反馈
- UINT8 fuseActionFB_B = 0; // B路熔断器熔断反馈
- UINT8 sigSwitchReadyFB_A = 0; // A路信号切换到位状态反馈
- UINT8 sigSwitchReadyFB_B = 0; // B路信号切换到位状态反馈
- UINT8 ctrlFXFB1 = 0; //执行气溶胶灭火装置1反馈
- UINT8 ctrlFXFB2 = 0; //执行气溶胶灭火装置2反馈
- UINT8 conn1Temp1 = 0; //动力连接器1温度检测1
- UINT8 conn1Temp2 = 0; //动力连接器1温度检测2
- UINT8 conn2Temp1 = 0; //动力连接器2温度检测1
- UINT8 conn2Temp2 = 0; //动力连接器2温度检测2
- UINT8 chrgGunTemp1_A = 0; // A充电枪温度检测1
- UINT8 chrgGunTemp2_A = 0; // A充电枪温度检测2
- UINT8 chrgGunTemp1_B = 0; // B充电枪温度检测1
- UINT8 chrgGunTemp2_B = 0; // B充电枪温度检测2
- UINT8 chrgBoxTemp1 = 0; //充电仓温度1
- UINT8 chrgBoxTemp2 = 0; //充电仓温度2
- UINT8 chrgBoxGasOver1 = 0; //充电仓气体高 1
- UINT8 chrgBoxGasOver2 = 0; //充电仓气体高 2
- UINT8 chrgBoxFumesOver1 = 0; //充电仓烟雾高1
- UINT8 chrgBoxFumesOver2 = 0; //充电仓烟雾高2
- UINT8 chrgBox1Warning = 0; //充电仓1预警等级
- UINT8 chrgBox2Warning = 0; //充电仓2预警等级
- #define EEPDATA_START_SEC_VAR
- #include "MemMap.h"
- /*存储数据区*/
- #define EEPDATA_STOP_SEC_VAR
- #include "MemMap.h"
- #define APPLAYERVER_START_SEC_VAR
- #include "MemMap.h"
- const uint8 T_table[240] = {239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224,
- 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203,
- 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182,
- 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161,
- 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140,
- 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119,
- 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97,
- 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69,
- 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41,
- 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13,
- 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
- const uint32 R_table[240] = {125, 127, 129, 131, 133, 136, 138, 141, 143, 145, 148, 151, 153, 156, 159, 162, 165,
- 168, 171, 174, 177, 180, 183, 187, 190, 194, 198, 201, 205, 209, 213, 217, 221, 226, 230, 234, 239, 244, 249,
- 254, 259, 264, 269, 274, 280, 286, 292, 298, 304, 310, 316, 323, 330, 337, 344, 351, 359, 366, 374, 382, 391,
- 399, 408, 417, 426, 436, 445, 455, 466, 476, 487, 498, 509, 521, 533, 546, 558, 571, 585, 599, 613, 627, 642,
- 658, 674, 690, 707, 724, 742, 760, 779, 799, 819, 839, 861, 883, 905, 928, 952, 977, 1002, 1029, 1056, 1083,
- 1112, 1142, 1172, 1204, 1236, 1270, 1305, 1340, 1377, 1415, 1455, 1495, 1537, 1581, 1626, 1672, 1720, 1769,
- 1821, 1874, 1928, 1985, 2044, 2104, 2167, 2232, 2299, 2369, 2441, 2515, 2592, 2672, 2755, 2841, 2931, 3023,
- 3119, 3218, 3321, 3428, 3539, 3654, 3773, 3898, 4026, 4160, 4299, 4443, 4593, 4749, 4911, 5080, 5255, 5438,
- 5627, 5825, 6030, 6244, 6466, 6698, 6940, 7191, 7454, 7727, 8012, 8309, 8619, 8942, 9280, 9632, 10000, 10383,
- 10784, 11203, 11641, 12098, 12577, 13077, 13600, 14147, 14720, 15319, 15947, 16604, 17293, 18015, 18771,
- 19564, 20395, 21268, 22183, 23144, 24152, 25211, 26324, 27493, 28722, 30014, 31373, 32802, 34307, 35891,
- 37558, 39315, 41166, 43117, 45174, 47343, 49633, 52049, 54599, 57293, 60140, 63148, 66329, 69693, 73252,
- 77019, 81008, 85233, 89710, 94455, 99488, 104827, 110493, 116508, 122898, 129687, 136905, 144580,
- 152746, 161438, 170694, 180554, 191063, 202269};
- #define APPLAYERVER_STOP_SEC_VAR
- #include "MemMap.h"
|