![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Repositório para códigos do painel da plataforma SATC
Dependencies: MFRC522 mbed-STM32F103C8T6 mbed
Fork of C_005_EA_Painel_sem_bms by
helpers.h
- Committer:
- MobilisEletrica
- Date:
- 2018-09-24
- Revision:
- 2:4c12e1ed1367
- Parent:
- 0:5f3b8289e36c
File content as of revision 2:4c12e1ed1367:
#include "mbed.h" int16_t FindIndex( const uint16_t a[], uint16_t size, uint16_t value ); uint16_t converteDTCWeg(uint16_t dtc_weg); uint16_t converteDTCBms(unsigned char flags); uint16_t arraySum(uint16_t* v,uint16_t n); void arrayPush(uint16_t* v, uint16_t input, uint16_t n); /* dtc weg e mobilis estao associados atraves do INDICE do array ex: dtc mobilis[1] 0xA01 corresponde ao dtc weg[1] 0xA046 */ enum DTC_PAINEL{ DTC_FALHA_INVERSOR_CAN = 0xF26, DTC_FALHA_CIRCUITO_DE_CARGA = 0xF27, DTC_FALHA_DIVERGENCIA_ENTRE_ACIONAMENTOS = 0xF28, DTC_FALHA_LEITOR = 0xF38, DTC_FALHA_CAN = 0xF39, DTC_FALHA_BMS_CAN = 0xF40, }; const uint16_t tabela_dtc_weg_mobilis[] = { 0xA00, 0xA01, 0xA02, 0xA03, 0xA04, 0xA05, 0xA06, 0xA07, 0xA08, 0xA09, 0xA10, 0xA11, 0xA12, 0xF00, 0xF01, 0xF02, 0xF03, 0xF04, 0xF05, 0xF06, 0xF07, 0xF08, 0xF09, 0xF10, 0xF11, 0xF12, 0xF13, 0xF14, 0xF15, 0xF16, 0xF17, 0xF18, 0xF19, 0xF20, 0xF21, 0xF22, 0xF23, 0xF24, 0xF25, 0xF35, 0xF36, 0xF37, 0x00 }; const uint16_t tabela_dtc_weg[] = { 0x02E, 0x02F, 0x062, 0x080, 0x098, 0x2BE, 0x2C0, 0x2C2, 0x085, 0x086, 0x087, 0x088, 0x06E, 0x015, 0x016, 0x01E, 0x022, 0x026, 0x030, 0x043, 0x047, 0x048, 0x04E, 0x04F, 0x050, 0x054, 0x05B, 0x063, 0x096, 0x099, 0x09C, 0x09D, 0x09E, 0x0B6, 0x0B7, 0x0B9, 0x0EC, 0x2C7, 0x033, 0x0E4, 0x0EA, 0x0EB, 0x000 };