Display steering angle, speed & cones in AMI
This commit is contained in:
@ -2,9 +2,25 @@
|
||||
#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:
|
||||
@ -15,7 +31,20 @@ public:
|
||||
|
||||
void setMission(Mission mission);
|
||||
|
||||
void updateDataFields();
|
||||
void setJetsonTimeout(bool timeout);
|
||||
void setEPSCTimeout(bool timeout);
|
||||
|
||||
void setConePositions(ConePosition *positions, size_t count);
|
||||
|
||||
protected:
|
||||
AMIDataField desiredAngleField;
|
||||
AMIDataField measuredAngleField;
|
||||
AMIDataField desiredSpeedField;
|
||||
AMIDataField measuredSpeedField;
|
||||
|
||||
touchgfx::Shape<3> cones[NUM_CONES] = {cone0, cone1, cone2, cone3, cone4,
|
||||
cone5, cone6, cone7, cone8, cone9};
|
||||
};
|
||||
|
||||
#endif // AMIVIEW_HPP
|
||||
|
||||
Reference in New Issue
Block a user