60 lines
1.5 KiB
C++
60 lines
1.5 KiB
C++
#ifndef AMIVIEW_HPP
|
|
#define AMIVIEW_HPP
|
|
|
|
#include "stw_defines.h"
|
|
#include "touchgfx/Unicode.hpp"
|
|
#include "touchgfx/widgets/TextArea.hpp"
|
|
#include "touchgfx/widgets/TextAreaWithWildcard.hpp"
|
|
#include "vehicle_state.h"
|
|
#include <gui/ami_screen/AMIPresenter.hpp>
|
|
#include <gui_generated/ami_screen/AMIViewBase.hpp>
|
|
|
|
class AMIDataField {
|
|
public:
|
|
AMIDataField(touchgfx::TextAreaWithOneWildcard &textArea, const char *fmt);
|
|
|
|
void setValue(float value);
|
|
|
|
protected:
|
|
const char *fmt;
|
|
|
|
touchgfx::TextAreaWithOneWildcard &textArea;
|
|
touchgfx::Unicode::UnicodeChar buffer[16];
|
|
};
|
|
|
|
class AMIView : public AMIViewBase {
|
|
public:
|
|
AMIView();
|
|
virtual ~AMIView() {}
|
|
virtual void setupScreen();
|
|
virtual void tearDownScreen();
|
|
|
|
void setMission(Mission mission);
|
|
void setASState(ASState state);
|
|
void setIniChkState(IniChkState state);
|
|
|
|
void updateDataFields();
|
|
void setJetsonTimeout(bool timeout);
|
|
void setEPSCTimeout(bool timeout);
|
|
|
|
void setConePositions(ConePosition *positions, size_t count);
|
|
|
|
protected:
|
|
AMIDataField paField;
|
|
AMIDataField pbField;
|
|
AMIDataField pfField;
|
|
AMIDataField prField;
|
|
|
|
AMIDataField desiredAngleField;
|
|
AMIDataField measuredAngleField;
|
|
AMIDataField desiredSpeedField;
|
|
AMIDataField measuredSpeedField;
|
|
|
|
touchgfx::Unicode::UnicodeChar progressBuffer[16];
|
|
touchgfx::Unicode::UnicodeChar asOKBuffer[16];
|
|
touchgfx::Shape<3> cones[NUM_CONES] = {cone0, cone1, cone2, cone3, cone4,
|
|
cone5, cone6, cone7, cone8, cone9};
|
|
};
|
|
|
|
#endif // AMIVIEW_HPP
|