Show initial checkup state & hydraulic pressures
This commit is contained in:
@ -10,10 +10,11 @@
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/widgets/Image.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
||||
#include <touchgfx/containers/Container.hpp>
|
||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
||||
#include <touchgfx/widgets/canvas/Shape.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
#include <touchgfx/containers/progress_indicators/BoxProgress.hpp>
|
||||
|
||||
class AMIViewBase : public touchgfx::View<AMIPresenter>
|
||||
{
|
||||
@ -33,6 +34,7 @@ protected:
|
||||
touchgfx::Box __background;
|
||||
touchgfx::Image logo;
|
||||
touchgfx::TextArea currentMission;
|
||||
touchgfx::Container driving;
|
||||
touchgfx::TextArea textArea1;
|
||||
touchgfx::TextArea textArea2;
|
||||
touchgfx::TextAreaWithOneWildcard desiredAngle;
|
||||
@ -64,6 +66,18 @@ protected:
|
||||
touchgfx::PainterRGB565 cone9Painter;
|
||||
touchgfx::Shape<3> ft;
|
||||
touchgfx::PainterRGB565 ftPainter;
|
||||
touchgfx::Container init;
|
||||
touchgfx::TextArea textArea8;
|
||||
touchgfx::TextArea textArea7;
|
||||
touchgfx::TextAreaWithOneWildcard pressRear;
|
||||
touchgfx::TextAreaWithOneWildcard pressFront;
|
||||
touchgfx::TextAreaWithOneWildcard pressB;
|
||||
touchgfx::TextAreaWithOneWildcard pressA;
|
||||
touchgfx::TextArea textArea6;
|
||||
touchgfx::TextArea textArea5;
|
||||
touchgfx::BoxProgress progressBar;
|
||||
touchgfx::TextArea initLabel;
|
||||
touchgfx::TextAreaWithOneWildcard progressLabel;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@ -26,53 +26,55 @@ AMIViewBase::AMIViewBase()
|
||||
currentMission.setTypedText(touchgfx::TypedText(T_INVALID_HUGE));
|
||||
add(currentMission);
|
||||
|
||||
driving.setPosition(0, 0, 480, 320);
|
||||
driving.setVisible(false);
|
||||
textArea1.setXY(273, 103);
|
||||
textArea1.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea1.setLinespacing(0);
|
||||
textArea1.setTypedText(touchgfx::TypedText(T___SINGLEUSE_3MDX));
|
||||
add(textArea1);
|
||||
driving.add(textArea1);
|
||||
|
||||
textArea2.setXY(273, 135);
|
||||
textArea2.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea2.setLinespacing(0);
|
||||
textArea2.setTypedText(touchgfx::TypedText(T___SINGLEUSE_JFR7));
|
||||
add(textArea2);
|
||||
driving.add(textArea2);
|
||||
|
||||
desiredAngle.setPosition(405, 104, 60, 23);
|
||||
desiredAngle.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
desiredAngle.setLinespacing(0);
|
||||
desiredAngle.setTypedText(touchgfx::TypedText(T___SINGLEUSE_232C));
|
||||
add(desiredAngle);
|
||||
driving.add(desiredAngle);
|
||||
|
||||
measuredAngle.setPosition(405, 136, 60, 23);
|
||||
measuredAngle.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
measuredAngle.setLinespacing(0);
|
||||
measuredAngle.setTypedText(touchgfx::TypedText(T___SINGLEUSE_LLOZ));
|
||||
add(measuredAngle);
|
||||
driving.add(measuredAngle);
|
||||
|
||||
measuredSpeed.setPosition(405, 199, 60, 23);
|
||||
measuredSpeed.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
measuredSpeed.setLinespacing(0);
|
||||
measuredSpeed.setTypedText(touchgfx::TypedText(T___SINGLEUSE_2S21));
|
||||
add(measuredSpeed);
|
||||
driving.add(measuredSpeed);
|
||||
|
||||
desiredSpeed.setPosition(405, 167, 60, 23);
|
||||
desiredSpeed.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
desiredSpeed.setLinespacing(0);
|
||||
desiredSpeed.setTypedText(touchgfx::TypedText(T___SINGLEUSE_OQ6P));
|
||||
add(desiredSpeed);
|
||||
driving.add(desiredSpeed);
|
||||
|
||||
textArea4.setXY(273, 198);
|
||||
textArea4.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea4.setLinespacing(0);
|
||||
textArea4.setTypedText(touchgfx::TypedText(T___SINGLEUSE_590R));
|
||||
add(textArea4);
|
||||
driving.add(textArea4);
|
||||
|
||||
textArea3.setXY(273, 166);
|
||||
textArea3.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea3.setLinespacing(0);
|
||||
textArea3.setTypedText(touchgfx::TypedText(T___SINGLEUSE_Z78U));
|
||||
add(textArea3);
|
||||
driving.add(textArea3);
|
||||
|
||||
map.setPosition(15, 103, 255, 202);
|
||||
cone0.setPosition(0, 0, 10, 10);
|
||||
@ -195,7 +197,81 @@ AMIViewBase::AMIViewBase()
|
||||
ft.setShape(ftPoints);
|
||||
map.add(ft);
|
||||
|
||||
add(map);
|
||||
driving.add(map);
|
||||
|
||||
add(driving);
|
||||
|
||||
init.setPosition(0, 0, 480, 320);
|
||||
textArea8.setXY(68, 247);
|
||||
textArea8.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea8.setLinespacing(0);
|
||||
textArea8.setTypedText(touchgfx::TypedText(T___SINGLEUSE_0L75));
|
||||
init.add(textArea8);
|
||||
|
||||
textArea7.setXY(68, 215);
|
||||
textArea7.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea7.setLinespacing(0);
|
||||
textArea7.setTypedText(touchgfx::TypedText(T___SINGLEUSE_GA13));
|
||||
init.add(textArea7);
|
||||
|
||||
pressRear.setPosition(352, 248, 60, 23);
|
||||
pressRear.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
pressRear.setLinespacing(0);
|
||||
pressRear.setTypedText(touchgfx::TypedText(T___SINGLEUSE_THUG));
|
||||
init.add(pressRear);
|
||||
|
||||
pressFront.setPosition(352, 216, 60, 23);
|
||||
pressFront.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
pressFront.setLinespacing(0);
|
||||
pressFront.setTypedText(touchgfx::TypedText(T___SINGLEUSE_CO7A));
|
||||
init.add(pressFront);
|
||||
|
||||
pressB.setPosition(352, 185, 60, 23);
|
||||
pressB.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
pressB.setLinespacing(0);
|
||||
pressB.setTypedText(touchgfx::TypedText(T___SINGLEUSE_A0LF));
|
||||
init.add(pressB);
|
||||
|
||||
pressA.setPosition(352, 153, 60, 23);
|
||||
pressA.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
pressA.setLinespacing(0);
|
||||
pressA.setTypedText(touchgfx::TypedText(T___SINGLEUSE_166C));
|
||||
init.add(pressA);
|
||||
|
||||
textArea6.setXY(68, 184);
|
||||
textArea6.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea6.setLinespacing(0);
|
||||
textArea6.setTypedText(touchgfx::TypedText(T___SINGLEUSE_OOU3));
|
||||
init.add(textArea6);
|
||||
|
||||
textArea5.setXY(68, 152);
|
||||
textArea5.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea5.setLinespacing(0);
|
||||
textArea5.setTypedText(touchgfx::TypedText(T___SINGLEUSE_2FPP));
|
||||
init.add(textArea5);
|
||||
|
||||
progressBar.setXY(12, 85);
|
||||
progressBar.setProgressIndicatorPosition(0, 0, 480, 55);
|
||||
progressBar.setRange(0, 100);
|
||||
progressBar.setDirection(touchgfx::AbstractDirectionProgress::RIGHT);
|
||||
progressBar.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID));
|
||||
progressBar.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
|
||||
progressBar.setValue(0);
|
||||
init.add(progressBar);
|
||||
|
||||
initLabel.setPosition(86, 83, 309, 37);
|
||||
initLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
initLabel.setLinespacing(0);
|
||||
initLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_E6D7));
|
||||
init.add(initLabel);
|
||||
|
||||
progressLabel.setPosition(165, 83, 226, 37);
|
||||
progressLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
progressLabel.setLinespacing(0);
|
||||
progressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_ZEKA));
|
||||
init.add(progressLabel);
|
||||
|
||||
add(init);
|
||||
}
|
||||
|
||||
AMIViewBase::~AMIViewBase()
|
||||
|
||||
@ -21,7 +21,7 @@ DriverViewViewBase::DriverViewViewBase() :
|
||||
soc.setProgressIndicatorPosition(0, 0, 456, 33);
|
||||
soc.setRange(0, 100);
|
||||
soc.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID));
|
||||
socPainter.setColor(touchgfx::Color::getColorFromRGB(136, 255, 0));
|
||||
socPainter.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
|
||||
soc.setPainter(socPainter);
|
||||
soc.setStart(0, 16);
|
||||
soc.setEnd(456, 16);
|
||||
|
||||
Reference in New Issue
Block a user