![](/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@2:4c12e1ed1367, 2018-09-24 (annotated)
- Committer:
- MobilisEletrica
- Date:
- Mon Sep 24 18:30:52 2018 +0000
- Revision:
- 2:4c12e1ed1367
- Parent:
- 0:5f3b8289e36c
[SATC] C?digo do painel de controle
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MobilisEletrica | 0:5f3b8289e36c | 1 | #include "mbed.h" |
MobilisEletrica | 0:5f3b8289e36c | 2 | int16_t FindIndex( const uint16_t a[], uint16_t size, uint16_t value ); |
MobilisEletrica | 0:5f3b8289e36c | 3 | uint16_t converteDTCWeg(uint16_t dtc_weg); |
MobilisEletrica | 0:5f3b8289e36c | 4 | uint16_t converteDTCBms(unsigned char flags); |
MobilisEletrica | 0:5f3b8289e36c | 5 | uint16_t arraySum(uint16_t* v,uint16_t n); |
MobilisEletrica | 0:5f3b8289e36c | 6 | void arrayPush(uint16_t* v, uint16_t input, uint16_t n); |
MobilisEletrica | 0:5f3b8289e36c | 7 | /* |
MobilisEletrica | 0:5f3b8289e36c | 8 | dtc weg e mobilis estao associados atraves do INDICE do array |
MobilisEletrica | 0:5f3b8289e36c | 9 | |
MobilisEletrica | 0:5f3b8289e36c | 10 | ex: dtc mobilis[1] 0xA01 corresponde ao dtc weg[1] 0xA046 |
MobilisEletrica | 0:5f3b8289e36c | 11 | */ |
MobilisEletrica | 0:5f3b8289e36c | 12 | |
MobilisEletrica | 0:5f3b8289e36c | 13 | enum DTC_PAINEL{ |
MobilisEletrica | 0:5f3b8289e36c | 14 | DTC_FALHA_INVERSOR_CAN = 0xF26, |
MobilisEletrica | 0:5f3b8289e36c | 15 | DTC_FALHA_CIRCUITO_DE_CARGA = 0xF27, |
MobilisEletrica | 0:5f3b8289e36c | 16 | DTC_FALHA_DIVERGENCIA_ENTRE_ACIONAMENTOS = 0xF28, |
MobilisEletrica | 0:5f3b8289e36c | 17 | DTC_FALHA_LEITOR = 0xF38, |
MobilisEletrica | 0:5f3b8289e36c | 18 | DTC_FALHA_CAN = 0xF39, |
MobilisEletrica | 0:5f3b8289e36c | 19 | DTC_FALHA_BMS_CAN = 0xF40, |
MobilisEletrica | 0:5f3b8289e36c | 20 | |
MobilisEletrica | 0:5f3b8289e36c | 21 | }; |
MobilisEletrica | 0:5f3b8289e36c | 22 | |
MobilisEletrica | 0:5f3b8289e36c | 23 | const uint16_t tabela_dtc_weg_mobilis[] = { |
MobilisEletrica | 0:5f3b8289e36c | 24 | 0xA00, 0xA01, 0xA02, 0xA03, 0xA04, 0xA05, 0xA06, 0xA07, |
MobilisEletrica | 0:5f3b8289e36c | 25 | 0xA08, 0xA09, 0xA10, 0xA11, 0xA12, 0xF00, 0xF01, 0xF02, |
MobilisEletrica | 0:5f3b8289e36c | 26 | 0xF03, 0xF04, 0xF05, 0xF06, 0xF07, 0xF08, 0xF09, 0xF10, |
MobilisEletrica | 0:5f3b8289e36c | 27 | 0xF11, 0xF12, 0xF13, 0xF14, 0xF15, 0xF16, 0xF17, 0xF18, |
MobilisEletrica | 0:5f3b8289e36c | 28 | 0xF19, 0xF20, 0xF21, 0xF22, 0xF23, 0xF24, 0xF25, 0xF35, |
MobilisEletrica | 0:5f3b8289e36c | 29 | 0xF36, 0xF37, 0x00 |
MobilisEletrica | 0:5f3b8289e36c | 30 | }; |
MobilisEletrica | 0:5f3b8289e36c | 31 | |
MobilisEletrica | 0:5f3b8289e36c | 32 | const uint16_t tabela_dtc_weg[] = { |
MobilisEletrica | 2:4c12e1ed1367 | 33 | 0x02E, 0x02F, 0x062, 0x080, 0x098, 0x2BE, 0x2C0, 0x2C2, |
MobilisEletrica | 2:4c12e1ed1367 | 34 | 0x085, 0x086, 0x087, 0x088, 0x06E, 0x015, 0x016, 0x01E, |
MobilisEletrica | 2:4c12e1ed1367 | 35 | 0x022, 0x026, 0x030, 0x043, 0x047, 0x048, 0x04E, 0x04F, |
MobilisEletrica | 2:4c12e1ed1367 | 36 | 0x050, 0x054, 0x05B, 0x063, 0x096, 0x099, 0x09C, 0x09D, |
MobilisEletrica | 2:4c12e1ed1367 | 37 | 0x09E, 0x0B6, 0x0B7, 0x0B9, 0x0EC, 0x2C7, 0x033, 0x0E4, |
MobilisEletrica | 2:4c12e1ed1367 | 38 | 0x0EA, 0x0EB, 0x000 |
MobilisEletrica | 0:5f3b8289e36c | 39 | }; |