[WIP] SDC screen

This hasn't really been tested yet and sometimes looks weird.
This commit is contained in:
2023-09-30 10:11:42 +02:00
parent 61656942f9
commit 698c6a24c4
26 changed files with 784 additions and 156 deletions

View File

@ -35,6 +35,9 @@ public:
// VehicleConfig
void gotoVehicleConfigScreenNoTransition();
// SDC
void gotoSDCScreenNoTransition();
protected:
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
FrontendHeap& frontendHeap;
@ -54,6 +57,9 @@ protected:
// VehicleConfig
void gotoVehicleConfigScreenNoTransitionImpl();
// SDC
void gotoSDCScreenNoTransitionImpl();
};
#endif // FRONTENDAPPLICATIONBASE_HPP

View File

@ -22,6 +22,8 @@
#include <gui/debugview_screen/DebugViewPresenter.hpp>
#include <gui/vehicleconfig_screen/VehicleConfigView.hpp>
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
#include <gui/sdc_screen/SDCView.hpp>
#include <gui/sdc_screen/SDCPresenter.hpp>
/**
@ -49,7 +51,8 @@ public:
touchgfx::meta::TypeList< DriverViewView,
touchgfx::meta::TypeList< DebugViewView,
touchgfx::meta::TypeList< VehicleConfigView,
touchgfx::meta::Nil > > > >
touchgfx::meta::TypeList< SDCView,
touchgfx::meta::Nil > > > > >
> GeneratedViewTypes;
/**
@ -66,7 +69,8 @@ public:
touchgfx::meta::TypeList< DriverViewPresenter,
touchgfx::meta::TypeList< DebugViewPresenter,
touchgfx::meta::TypeList< VehicleConfigPresenter,
touchgfx::meta::Nil > > > >
touchgfx::meta::TypeList< SDCPresenter,
touchgfx::meta::Nil > > > > >
> GeneratedPresenterTypes;
/**

View File

@ -0,0 +1,56 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef SDCVIEWBASE_HPP
#define SDCVIEWBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <mvp/View.hpp>
#include <gui/sdc_screen/SDCPresenter.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
class SDCViewBase : public touchgfx::View<SDCPresenter>
{
public:
SDCViewBase();
virtual ~SDCViewBase();
virtual void setupScreen();
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::Box __background;
touchgfx::TextArea pdu;
touchgfx::TextArea inertia;
touchgfx::TextArea sdcl;
touchgfx::TextArea hvb;
touchgfx::TextArea tsms;
touchgfx::TextArea acc;
touchgfx::TextArea imd;
touchgfx::TextArea ams;
touchgfx::Line line1;
touchgfx::PainterRGB565 line1Painter;
touchgfx::Line line2;
touchgfx::PainterRGB565 line2Painter;
touchgfx::Line line3;
touchgfx::PainterRGB565 line3Painter;
private:
/*
* Canvas Buffer Size
*/
static const uint32_t CANVAS_BUFFER_SIZE = 7200;
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
};
#endif // SDCVIEWBASE_HPP