Display steering angle, speed & cones in AMI
This commit is contained in:
@ -2,36 +2,205 @@
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#include <gui_generated/ami_screen/AMIViewBase.hpp>
|
||||
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <images/BitmapDatabase.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
AMIViewBase::AMIViewBase()
|
||||
{
|
||||
touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
|
||||
|
||||
__background.setPosition(0, 0, 480, 320);
|
||||
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
|
||||
add(__background);
|
||||
|
||||
logo.setXY(160, 266);
|
||||
logo.setBitmap(touchgfx::Bitmap(BITMAP_LOGO_DV_SMALL_WHITE_ID));
|
||||
logo.setVisible(false);
|
||||
add(logo);
|
||||
|
||||
title.setXY(42, 20);
|
||||
title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
title.setLinespacing(0);
|
||||
title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_SDGP));
|
||||
add(title);
|
||||
|
||||
currentMission.setPosition(0, 130, 480, 49);
|
||||
currentMission.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
currentMission.setPosition(0, 15, 480, 49);
|
||||
currentMission.setColor(touchgfx::Color::getColorFromRGB(197, 14, 31));
|
||||
currentMission.setLinespacing(0);
|
||||
currentMission.setTypedText(touchgfx::TypedText(T_INVALID_HUGE));
|
||||
add(currentMission);
|
||||
|
||||
textArea1.setXY(273, 103);
|
||||
textArea1.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea1.setLinespacing(0);
|
||||
textArea1.setTypedText(touchgfx::TypedText(T___SINGLEUSE_3MDX));
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
textArea4.setXY(273, 198);
|
||||
textArea4.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea4.setLinespacing(0);
|
||||
textArea4.setTypedText(touchgfx::TypedText(T___SINGLEUSE_590R));
|
||||
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);
|
||||
|
||||
map.setPosition(15, 103, 255, 202);
|
||||
cone0.setPosition(0, 0, 10, 10);
|
||||
cone0.setOrigin(0.0f, 0.0f);
|
||||
cone0.setScale(1.0f, 1.0f);
|
||||
cone0.setAngle(0.0f);
|
||||
cone0Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone0.setPainter(cone0Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone0Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone0.setShape(cone0Points);
|
||||
cone0.setVisible(false);
|
||||
map.add(cone0);
|
||||
|
||||
cone1.setPosition(0, 0, 10, 10);
|
||||
cone1.setOrigin(0.0f, 0.0f);
|
||||
cone1.setScale(1.0f, 1.0f);
|
||||
cone1.setAngle(0.0f);
|
||||
cone1Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone1.setPainter(cone1Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone1Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone1.setShape(cone1Points);
|
||||
cone1.setVisible(false);
|
||||
map.add(cone1);
|
||||
|
||||
cone2.setPosition(0, 0, 10, 10);
|
||||
cone2.setOrigin(0.0f, 0.0f);
|
||||
cone2.setScale(1.0f, 1.0f);
|
||||
cone2.setAngle(0.0f);
|
||||
cone2Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone2.setPainter(cone2Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone2Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone2.setShape(cone2Points);
|
||||
cone2.setVisible(false);
|
||||
map.add(cone2);
|
||||
|
||||
cone3.setPosition(0, 0, 10, 10);
|
||||
cone3.setOrigin(0.0f, 0.0f);
|
||||
cone3.setScale(1.0f, 1.0f);
|
||||
cone3.setAngle(0.0f);
|
||||
cone3Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone3.setPainter(cone3Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone3Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone3.setShape(cone3Points);
|
||||
cone3.setVisible(false);
|
||||
map.add(cone3);
|
||||
|
||||
cone4.setPosition(0, 0, 10, 10);
|
||||
cone4.setOrigin(0.0f, 0.0f);
|
||||
cone4.setScale(1.0f, 1.0f);
|
||||
cone4.setAngle(0.0f);
|
||||
cone4Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone4.setPainter(cone4Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone4Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone4.setShape(cone4Points);
|
||||
cone4.setVisible(false);
|
||||
map.add(cone4);
|
||||
|
||||
cone5.setPosition(0, 0, 10, 10);
|
||||
cone5.setOrigin(0.0f, 0.0f);
|
||||
cone5.setScale(1.0f, 1.0f);
|
||||
cone5.setAngle(0.0f);
|
||||
cone5Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone5.setPainter(cone5Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone5Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone5.setShape(cone5Points);
|
||||
cone5.setVisible(false);
|
||||
map.add(cone5);
|
||||
|
||||
cone6.setPosition(0, 0, 10, 10);
|
||||
cone6.setOrigin(0.0f, 0.0f);
|
||||
cone6.setScale(1.0f, 1.0f);
|
||||
cone6.setAngle(0.0f);
|
||||
cone6Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone6.setPainter(cone6Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone6Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone6.setShape(cone6Points);
|
||||
cone6.setVisible(false);
|
||||
map.add(cone6);
|
||||
|
||||
cone7.setPosition(0, 0, 10, 10);
|
||||
cone7.setOrigin(0.0f, 0.0f);
|
||||
cone7.setScale(1.0f, 1.0f);
|
||||
cone7.setAngle(0.0f);
|
||||
cone7Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone7.setPainter(cone7Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone7Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone7.setShape(cone7Points);
|
||||
cone7.setVisible(false);
|
||||
map.add(cone7);
|
||||
|
||||
cone8.setPosition(0, 0, 10, 10);
|
||||
cone8.setOrigin(0.0f, 0.0f);
|
||||
cone8.setScale(1.0f, 1.0f);
|
||||
cone8.setAngle(0.0f);
|
||||
cone8Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone8.setPainter(cone8Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone8Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone8.setShape(cone8Points);
|
||||
cone8.setVisible(false);
|
||||
map.add(cone8);
|
||||
|
||||
cone9.setPosition(0, 0, 10, 10);
|
||||
cone9.setOrigin(0.0f, 0.0f);
|
||||
cone9.setScale(1.0f, 1.0f);
|
||||
cone9.setAngle(0.0f);
|
||||
cone9Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 0));
|
||||
cone9.setPainter(cone9Painter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> cone9Points[3] = { { 0.0f, 0.0f }, { 10.0f, 5.0f }, { 0.0f, 10.0f } };
|
||||
cone9.setShape(cone9Points);
|
||||
cone9.setVisible(false);
|
||||
map.add(cone9);
|
||||
|
||||
ft.setPosition(0, 91, 20, 20);
|
||||
ft.setOrigin(0.0f, 0.0f);
|
||||
ft.setScale(1.0f, 1.0f);
|
||||
ft.setAngle(0.0f);
|
||||
ftPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
ft.setPainter(ftPainter);
|
||||
const touchgfx::AbstractShape::ShapePoint<float> ftPoints[3] = { { 0.0f, 0.0f }, { 20.0f, 10.0f }, { 0.0f, 20.0f } };
|
||||
ft.setShape(ftPoints);
|
||||
map.add(ft);
|
||||
|
||||
add(map);
|
||||
}
|
||||
|
||||
AMIViewBase::~AMIViewBase()
|
||||
{
|
||||
|
||||
touchgfx::CanvasWidgetRenderer::resetBuffer();
|
||||
}
|
||||
|
||||
void AMIViewBase::setupScreen()
|
||||
|
||||
Reference in New Issue
Block a user