Add three general-purpose fields to DriverView
This commit is contained in:
29
TouchGFX/gui/include/gui/containers/DriverViewField.hpp
Normal file
29
TouchGFX/gui/include/gui/containers/DriverViewField.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef DRIVERVIEWFIELD_HPP
|
||||
#define DRIVERVIEWFIELD_HPP
|
||||
|
||||
#include "touchgfx/TypedText.hpp"
|
||||
#include "touchgfx/Unicode.hpp"
|
||||
#include <gui_generated/containers/DriverViewFieldBase.hpp>
|
||||
|
||||
class DriverViewField : public DriverViewFieldBase {
|
||||
public:
|
||||
DriverViewField();
|
||||
virtual ~DriverViewField() {}
|
||||
|
||||
virtual void initialize();
|
||||
|
||||
void setName(const touchgfx::TypedText &text);
|
||||
void setValue(float newValue);
|
||||
void setPrecision(size_t intDigits, size_t decimalDigits);
|
||||
|
||||
protected:
|
||||
private:
|
||||
Unicode::UnicodeChar valueBuffer[16];
|
||||
size_t intDigits;
|
||||
size_t decimalDigits;
|
||||
float fieldValue;
|
||||
|
||||
void updateValueBuffer();
|
||||
};
|
||||
|
||||
#endif // DRIVERVIEWFIELD_HPP
|
||||
Reference in New Issue
Block a user