Display inverter & motor temperatures
This commit is contained in:
31
TouchGFX/gui/include/gui/containers/Temperature.hpp
Normal file
31
TouchGFX/gui/include/gui/containers/Temperature.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef TEMPERATURE_HPP
|
||||
#define TEMPERATURE_HPP
|
||||
|
||||
#include <gui_generated/containers/TemperatureBase.hpp>
|
||||
|
||||
class Temperature : public TemperatureBase {
|
||||
public:
|
||||
Temperature();
|
||||
virtual ~Temperature() {}
|
||||
|
||||
virtual void initialize();
|
||||
|
||||
virtual void setTemp(int temp_in_celsius);
|
||||
|
||||
/**
|
||||
* @brief Set the temperature thresholds for the color coding.
|
||||
*
|
||||
* @param thresholds Array of 4 integers
|
||||
*/
|
||||
void setTempThresholds(int *thresholds);
|
||||
|
||||
protected:
|
||||
private:
|
||||
int temp;
|
||||
int tempThresholds[4];
|
||||
Unicode::UnicodeChar valueBuffer[3];
|
||||
|
||||
void updateValueBuffer();
|
||||
};
|
||||
|
||||
#endif // TEMPERATURE_HPP
|
||||
@ -1,24 +0,0 @@
|
||||
#ifndef TIRETEMP_HPP
|
||||
#define TIRETEMP_HPP
|
||||
|
||||
#include <gui_generated/containers/TireTempBase.hpp>
|
||||
#include <sys/_stdint.h>
|
||||
|
||||
class TireTemp : public TireTempBase {
|
||||
public:
|
||||
TireTemp();
|
||||
virtual ~TireTemp() {}
|
||||
|
||||
virtual void initialize();
|
||||
|
||||
virtual void setTemp(int temp_in_celsius);
|
||||
|
||||
protected:
|
||||
private:
|
||||
int temp;
|
||||
Unicode::UnicodeChar valueBuffer[3];
|
||||
|
||||
void updateValueBuffer();
|
||||
};
|
||||
|
||||
#endif // TIRETEMP_HPP
|
||||
@ -24,7 +24,7 @@ public:
|
||||
void setFieldType(size_t i, DataFieldType type);
|
||||
void updateFieldValues();
|
||||
|
||||
void setTireTemps(const TireTemps &temps);
|
||||
void setTemps(const Temperatures &temps);
|
||||
void setTSSoC(uint8_t soc);
|
||||
void setProgress(bool active, DriverViewProgressType type, float progress);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user