diff --git a/sufst-controller/daq.cpp b/sufst-controller/daq.cpp index af4cd57bdcb4c3c7ec55500dc4b820a150922673..14b8b790a3468caf5145771294ad7891eddafaea 100644 --- a/sufst-controller/daq.cpp +++ b/sufst-controller/daq.cpp @@ -9,17 +9,6 @@ * e.g 1 is rpm and 2 is tps... etc */ -static const uint8_t daqEcuDataToTag[8][4] = { - {1, 2, 3, 4}, - {5, 6, 7, 8}, - {9, 10, 11, 12}, - {13, 14, 15, 16}, - {17, 18, 19, 20}, - {21, 22, 23, 24}, - {25, 26, 27, 28}, - {29, 30, 31, 32}, -}; - void daqEcuWrite(CanMsgTemplate *canMsg, uint8_t index) { static DaqEcuFormat daqEcuFormat; diff --git a/sufst-controller/daq.h b/sufst-controller/daq.h index dc72a47229aacefe5d27ee7b1670c7634d3c6977..23423cad2c677c059176a184baf30aa40e384171 100644 --- a/sufst-controller/daq.h +++ b/sufst-controller/daq.h @@ -13,16 +13,29 @@ struct DaqEcuFormat uint32_t timestamp; uint16_t data; uint8_t endTag; -}; +} __attribute__((packed)); struct DaqEvoScannPressureFormat { uint8_t startTag; uint32_t timestamp; - uint32_t data; + int data; uint8_t endTag; +} __attribute__((packed)); + +static const uint8_t daqEcuDataToTag[8][4] = { + {1, 2, 3, 4}, + {5, 6, 7, 8}, + {9, 10, 11, 12}, + {13, 14, 15, 16}, + {17, 18, 19, 20}, + {21, 22, 23, 24}, + {25, 26, 27, 28}, + {29, 30, 31, 32}, }; +static const uint8_t daqEvoScannPressSensToTag[8] = {33, 34, 35, 36, 37, 38, 39, 40}; + void daqEcuWrite(CanMsgTemplate *canMsg, uint8_t index); #endif //DAQ_H