APPS calibration screen
This commit is contained in:
@ -0,0 +1,99 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef APPSVIEWBASE_HPP
|
||||
#define APPSVIEWBASE_HPP
|
||||
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <mvp/View.hpp>
|
||||
#include <gui/apps_screen/APPSPresenter.hpp>
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/widgets/graph/GraphWrapAndOverwrite.hpp>
|
||||
#include <touchgfx/widgets/graph/GraphElements.hpp>
|
||||
#include <touchgfx/widgets/graph/GraphLabels.hpp>
|
||||
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
|
||||
|
||||
class APPSViewBase : public touchgfx::View<APPSPresenter>
|
||||
{
|
||||
public:
|
||||
APPSViewBase();
|
||||
virtual ~APPSViewBase();
|
||||
virtual void setupScreen();
|
||||
virtual void handleKeyEvent(uint8_t key);
|
||||
|
||||
/*
|
||||
* Virtual Action Handlers
|
||||
*/
|
||||
virtual void selectPrevField()
|
||||
{
|
||||
// Override and implement this function in APPS
|
||||
}
|
||||
virtual void selectNextField()
|
||||
{
|
||||
// Override and implement this function in APPS
|
||||
}
|
||||
virtual void decField()
|
||||
{
|
||||
// Override and implement this function in APPS
|
||||
}
|
||||
virtual void incField()
|
||||
{
|
||||
// Override and implement this function in APPS
|
||||
}
|
||||
virtual void confirmField()
|
||||
{
|
||||
// Override and implement this function in APPS
|
||||
}
|
||||
virtual void switchPrecision()
|
||||
{
|
||||
// Override and implement this function in APPS
|
||||
}
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
}
|
||||
|
||||
/*
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::Box __background;
|
||||
touchgfx::GraphWrapAndOverwrite<50> apps0Graph;
|
||||
touchgfx::GraphElementGridY apps0GraphMajorYAxisGrid;
|
||||
touchgfx::GraphLabelsY apps0GraphMajorYAxisLabel;
|
||||
touchgfx::GraphElementLine apps0GraphLine1;
|
||||
touchgfx::PainterRGB565 apps0GraphLine1Painter;
|
||||
touchgfx::GraphElementVerticalGapLine apps0GraphVerticalFrontline;
|
||||
touchgfx::GraphWrapAndOverwrite<50> apps1Graph;
|
||||
touchgfx::GraphElementLine apps1GraphLine1;
|
||||
touchgfx::PainterRGB565 apps1GraphLine1Painter;
|
||||
touchgfx::TextArea title;
|
||||
touchgfx::TextArea apps0;
|
||||
touchgfx::TextArea apps1;
|
||||
touchgfx::TextArea min;
|
||||
touchgfx::TextArea max;
|
||||
touchgfx::TextArea cur;
|
||||
touchgfx::Box apps1max_bg;
|
||||
touchgfx::Box apps0max_bg;
|
||||
touchgfx::Box apps1min_bg;
|
||||
touchgfx::Box apps0min_bg;
|
||||
touchgfx::TextAreaWithOneWildcard apps1cur;
|
||||
touchgfx::TextAreaWithOneWildcard apps0cur;
|
||||
touchgfx::TextAreaWithOneWildcard apps1max;
|
||||
touchgfx::TextAreaWithOneWildcard apps0max;
|
||||
touchgfx::TextAreaWithOneWildcard apps1min;
|
||||
touchgfx::TextAreaWithOneWildcard apps0min;
|
||||
|
||||
private:
|
||||
|
||||
/*
|
||||
* Canvas Buffer Size
|
||||
*/
|
||||
static const uint32_t CANVAS_BUFFER_SIZE = 7200;
|
||||
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
|
||||
|
||||
};
|
||||
|
||||
#endif // APPSVIEWBASE_HPP
|
||||
@ -41,6 +41,9 @@ public:
|
||||
// Endurance
|
||||
void gotoEnduranceScreenNoTransition();
|
||||
|
||||
// APPS
|
||||
void gotoAPPSScreenNoTransition();
|
||||
|
||||
protected:
|
||||
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
|
||||
FrontendHeap& frontendHeap;
|
||||
@ -66,6 +69,9 @@ protected:
|
||||
|
||||
// Endurance
|
||||
void gotoEnduranceScreenNoTransitionImpl();
|
||||
|
||||
// APPS
|
||||
void gotoAPPSScreenNoTransitionImpl();
|
||||
};
|
||||
|
||||
#endif // FRONTENDAPPLICATIONBASE_HPP
|
||||
|
||||
@ -26,6 +26,8 @@
|
||||
#include <gui/sdc_screen/SDCPresenter.hpp>
|
||||
#include <gui/endurance_screen/EnduranceView.hpp>
|
||||
#include <gui/endurance_screen/EndurancePresenter.hpp>
|
||||
#include <gui/apps_screen/APPSView.hpp>
|
||||
#include <gui/apps_screen/APPSPresenter.hpp>
|
||||
|
||||
|
||||
/**
|
||||
@ -55,7 +57,8 @@ public:
|
||||
touchgfx::meta::TypeList< VehicleConfigView,
|
||||
touchgfx::meta::TypeList< SDCView,
|
||||
touchgfx::meta::TypeList< EnduranceView,
|
||||
touchgfx::meta::Nil > > > > > >
|
||||
touchgfx::meta::TypeList< APPSView,
|
||||
touchgfx::meta::Nil > > > > > > >
|
||||
> GeneratedViewTypes;
|
||||
|
||||
/**
|
||||
@ -74,7 +77,8 @@ public:
|
||||
touchgfx::meta::TypeList< VehicleConfigPresenter,
|
||||
touchgfx::meta::TypeList< SDCPresenter,
|
||||
touchgfx::meta::TypeList< EndurancePresenter,
|
||||
touchgfx::meta::Nil > > > > > >
|
||||
touchgfx::meta::TypeList< APPSPresenter,
|
||||
touchgfx::meta::Nil > > > > > > >
|
||||
> GeneratedPresenterTypes;
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,216 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#include <gui_generated/apps_screen/APPSViewBase.hpp>
|
||||
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
APPSViewBase::APPSViewBase()
|
||||
{
|
||||
touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
|
||||
|
||||
__background.setPosition(0, 0, 480, 320);
|
||||
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
|
||||
add(__background);
|
||||
|
||||
apps0Graph.setPosition(11, 36, 458, 180);
|
||||
apps0Graph.setScale(10);
|
||||
apps0Graph.setGraphAreaMargin(0, 40, 0, 0);
|
||||
apps0Graph.setGraphAreaPadding(0, 0, 0, 0);
|
||||
apps0Graph.setGraphRangeY(-10, 110);
|
||||
apps0GraphMajorYAxisGrid.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps0GraphMajorYAxisGrid.setInterval(20);
|
||||
apps0GraphMajorYAxisGrid.setLineWidth(1);
|
||||
apps0GraphMajorYAxisGrid.setScale(10);
|
||||
apps0Graph.addGraphElement(apps0GraphMajorYAxisGrid);
|
||||
|
||||
apps0GraphMajorYAxisLabel.setInterval(20);
|
||||
apps0GraphMajorYAxisLabel.setLabelTypedText(touchgfx::TypedText(T___SINGLEUSE_RK9Z));
|
||||
apps0GraphMajorYAxisLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps0GraphMajorYAxisLabel.setScale(10);
|
||||
apps0Graph.addLeftElement(apps0GraphMajorYAxisLabel);
|
||||
|
||||
apps0GraphLine1Painter.setColor(touchgfx::Color::getColorFromRGB(20, 151, 197));
|
||||
apps0GraphLine1.setPainter(apps0GraphLine1Painter);
|
||||
apps0GraphLine1.setLineWidth(2);
|
||||
apps0Graph.addGraphElement(apps0GraphLine1);
|
||||
|
||||
apps0GraphVerticalFrontline.setColor(touchgfx::Color::getColorFromRGB(137, 224, 13));
|
||||
apps0GraphVerticalFrontline.setGapLineWidth(1);
|
||||
apps0Graph.addGraphElement(apps0GraphVerticalFrontline);
|
||||
|
||||
|
||||
add(apps0Graph);
|
||||
|
||||
apps1Graph.setPosition(11, 36, 458, 180);
|
||||
apps1Graph.setScale(10);
|
||||
apps1Graph.setGraphAreaMargin(0, 0, 0, 0);
|
||||
apps1Graph.setGraphAreaPadding(0, 40, 0, 0);
|
||||
apps1Graph.setGraphRangeY(-10, 110);
|
||||
apps1GraphLine1Painter.setColor(touchgfx::Color::getColorFromRGB(196, 109, 22));
|
||||
apps1GraphLine1.setPainter(apps1GraphLine1Painter);
|
||||
apps1GraphLine1.setLineWidth(2);
|
||||
apps1Graph.addGraphElement(apps1GraphLine1);
|
||||
|
||||
add(apps1Graph);
|
||||
|
||||
title.setXY(38, 0);
|
||||
title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
title.setLinespacing(0);
|
||||
title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_UBFH));
|
||||
add(title);
|
||||
|
||||
apps0.setXY(11, 247);
|
||||
apps0.setColor(touchgfx::Color::getColorFromRGB(20, 151, 197));
|
||||
apps0.setLinespacing(0);
|
||||
apps0.setTypedText(touchgfx::TypedText(T___SINGLEUSE_6EKV));
|
||||
add(apps0);
|
||||
|
||||
apps1.setXY(11, 285);
|
||||
apps1.setColor(touchgfx::Color::getColorFromRGB(196, 109, 22));
|
||||
apps1.setLinespacing(0);
|
||||
apps1.setTypedText(touchgfx::TypedText(T___SINGLEUSE_W4YT));
|
||||
add(apps1);
|
||||
|
||||
min.setPosition(127, 216, 100, 24);
|
||||
min.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
min.setLinespacing(0);
|
||||
min.setTypedText(touchgfx::TypedText(T___SINGLEUSE_QXG5));
|
||||
add(min);
|
||||
|
||||
max.setPosition(250, 216, 100, 24);
|
||||
max.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
max.setLinespacing(0);
|
||||
max.setTypedText(touchgfx::TypedText(T___SINGLEUSE_WQXQ));
|
||||
add(max);
|
||||
|
||||
cur.setPosition(369, 216, 100, 24);
|
||||
cur.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
cur.setLinespacing(0);
|
||||
cur.setTypedText(touchgfx::TypedText(T___SINGLEUSE_CBZ9));
|
||||
add(cur);
|
||||
|
||||
apps1max_bg.setPosition(250, 278, 100, 38);
|
||||
apps1max_bg.setColor(touchgfx::Color::getColorFromRGB(68, 68, 68));
|
||||
apps1max_bg.setVisible(false);
|
||||
add(apps1max_bg);
|
||||
|
||||
apps0max_bg.setPosition(250, 240, 100, 38);
|
||||
apps0max_bg.setColor(touchgfx::Color::getColorFromRGB(68, 68, 68));
|
||||
apps0max_bg.setVisible(false);
|
||||
add(apps0max_bg);
|
||||
|
||||
apps1min_bg.setPosition(127, 278, 100, 38);
|
||||
apps1min_bg.setColor(touchgfx::Color::getColorFromRGB(68, 68, 68));
|
||||
apps1min_bg.setVisible(false);
|
||||
add(apps1min_bg);
|
||||
|
||||
apps0min_bg.setPosition(127, 240, 100, 38);
|
||||
apps0min_bg.setColor(touchgfx::Color::getColorFromRGB(68, 68, 68));
|
||||
apps0min_bg.setVisible(false);
|
||||
add(apps0min_bg);
|
||||
|
||||
apps1cur.setPosition(369, 278, 100, 38);
|
||||
apps1cur.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps1cur.setLinespacing(0);
|
||||
apps1cur.setTypedText(touchgfx::TypedText(T___SINGLEUSE_SM6H));
|
||||
add(apps1cur);
|
||||
|
||||
apps0cur.setPosition(369, 240, 100, 38);
|
||||
apps0cur.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps0cur.setLinespacing(0);
|
||||
apps0cur.setTypedText(touchgfx::TypedText(T___SINGLEUSE_8KB4));
|
||||
add(apps0cur);
|
||||
|
||||
apps1max.setPosition(250, 278, 100, 38);
|
||||
apps1max.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps1max.setLinespacing(0);
|
||||
apps1max.setTypedText(touchgfx::TypedText(T___SINGLEUSE_H8OI));
|
||||
add(apps1max);
|
||||
|
||||
apps0max.setPosition(250, 240, 100, 38);
|
||||
apps0max.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps0max.setLinespacing(0);
|
||||
apps0max.setTypedText(touchgfx::TypedText(T___SINGLEUSE_978V));
|
||||
add(apps0max);
|
||||
|
||||
apps1min.setPosition(127, 278, 100, 38);
|
||||
apps1min.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps1min.setLinespacing(0);
|
||||
apps1min.setTypedText(touchgfx::TypedText(T___SINGLEUSE_P4TL));
|
||||
add(apps1min);
|
||||
|
||||
apps0min.setPosition(127, 240, 100, 38);
|
||||
apps0min.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
apps0min.setLinespacing(0);
|
||||
apps0min.setTypedText(touchgfx::TypedText(T___SINGLEUSE_MBQT));
|
||||
add(apps0min);
|
||||
}
|
||||
|
||||
APPSViewBase::~APPSViewBase()
|
||||
{
|
||||
touchgfx::CanvasWidgetRenderer::resetBuffer();
|
||||
}
|
||||
|
||||
void APPSViewBase::setupScreen()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void APPSViewBase::handleKeyEvent(uint8_t key)
|
||||
{
|
||||
if(104 == key)
|
||||
{
|
||||
//SelectPrevField
|
||||
//When hardware button 104 clicked call virtual function
|
||||
//Call selectPrevField
|
||||
selectPrevField();
|
||||
|
||||
}
|
||||
|
||||
if(108 == key)
|
||||
{
|
||||
//SelectNextField
|
||||
//When hardware button 108 clicked call virtual function
|
||||
//Call selectNextField
|
||||
selectNextField();
|
||||
|
||||
}
|
||||
|
||||
if(107 == key)
|
||||
{
|
||||
//DecField
|
||||
//When hardware button 107 clicked call virtual function
|
||||
//Call decField
|
||||
decField();
|
||||
|
||||
}
|
||||
|
||||
if(106 == key)
|
||||
{
|
||||
//IncField
|
||||
//When hardware button 106 clicked call virtual function
|
||||
//Call incField
|
||||
incField();
|
||||
|
||||
}
|
||||
|
||||
if(54 == key)
|
||||
{
|
||||
//ConfirmField
|
||||
//When hardware button 54 clicked call virtual function
|
||||
//Call confirmField
|
||||
confirmField();
|
||||
|
||||
}
|
||||
|
||||
if(53 == key)
|
||||
{
|
||||
//SwitchPrecision
|
||||
//When hardware button 53 clicked call virtual function
|
||||
//Call switchPrecision
|
||||
switchPrecision();
|
||||
|
||||
}
|
||||
}
|
||||
@ -23,6 +23,8 @@
|
||||
#include <gui/sdc_screen/SDCPresenter.hpp>
|
||||
#include <gui/endurance_screen/EnduranceView.hpp>
|
||||
#include <gui/endurance_screen/EndurancePresenter.hpp>
|
||||
#include <gui/apps_screen/APPSView.hpp>
|
||||
#include <gui/apps_screen/APPSPresenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
@ -132,3 +134,16 @@ void FrontendApplicationBase::gotoEnduranceScreenNoTransitionImpl()
|
||||
{
|
||||
touchgfx::makeTransition<EnduranceView, EndurancePresenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
|
||||
}
|
||||
|
||||
// APPS
|
||||
|
||||
void FrontendApplicationBase::gotoAPPSScreenNoTransition()
|
||||
{
|
||||
transitionCallback = touchgfx::Callback<FrontendApplicationBase>(this, &FrontendApplicationBase::gotoAPPSScreenNoTransitionImpl);
|
||||
pendingScreenTransitionCallback = &transitionCallback;
|
||||
}
|
||||
|
||||
void FrontendApplicationBase::gotoAPPSScreenNoTransitionImpl()
|
||||
{
|
||||
touchgfx::makeTransition<APPSView, APPSPresenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
|
||||
}
|
||||
|
||||
@ -153,4 +153,13 @@ void MissionSelectViewBase::handleKeyEvent(uint8_t key)
|
||||
application().gotoEnduranceScreenNoTransition();
|
||||
|
||||
}
|
||||
|
||||
if(248 == key)
|
||||
{
|
||||
//DummyChangeAPPSView
|
||||
//When hardware button 248 clicked change screen to APPS
|
||||
//Go to APPS with no screen transition
|
||||
application().gotoAPPSScreenNoTransition();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user