MCU
Loading...
Searching...
No Matches
ThermistorInterface.h
Go to the documentation of this file.
1#ifndef THERMISTORINTERFACE
2#define THERMISTORINTERFACE
3#include "stdint.h"
4#include <math.h>
5#include "FlexCAN_T4.h"
6#include "HyTech_CAN.h"
9#include "hytech.h"
10#include "Thermistor.h"
11
15
17{
18private:
19 Thermistors<MCU15_NUM_THERMISTORS> _front_thermistors;
20
21 float therm_fl;
22 float therm_fr;
23
25
26 float convert(int raw);
27
28public:
29 ThermistorInterface(CANBufferType *msg_output_queue);
31
32 template <typename U>
33 void enqueue_CAN_front_thermistors(U *structure, uint32_t (*pack_function)(U *, uint8_t *, uint8_t *, uint8_t *));
34
35 void tick(const AnalogConversion_s &raw_therm_fl, const AnalogConversion_s &raw_therm_fr);
36
37};
38
39
40
41
42
43
44#endif
Circular_Buffer< uint8_t,(uint32_t) 128, sizeof(CAN_message_t)> CANBufferType
const int MCU15_THERM_FR_CHANNEL
const int MCU15_THERM_FL_CHANNEL
const int MCU15_NUM_THERMISTORS
CANBufferType * _msg_queue
float convert(int raw)
void tick(const AnalogConversion_s &raw_therm_fl, const AnalogConversion_s &raw_therm_fr)
Thermistors< MCU15_NUM_THERMISTORS > _front_thermistors
void enqueue_CAN_front_thermistors(U *structure, uint32_t(*pack_function)(U *, uint8_t *, uint8_t *, uint8_t *))