Add debug view

This commit is contained in:
2023-03-21 18:37:50 +01:00
parent 629fcb9098
commit ff37c8503d
49 changed files with 1603 additions and 289 deletions

View File

@ -17,25 +17,37 @@ public:
virtual void changeToStartScreen()
{
gotoDriverViewScreenNoTransition();
gotoMissionSelectScreenNoTransition();
}
// MissionSelect
void gotoMissionSelectScreenNoTransition();
// AMI
void gotoAMIScreenNoTransition();
// DriverView
void gotoDriverViewScreenNoTransition();
// DebugView
void gotoDebugViewScreenNoTransition();
protected:
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
FrontendHeap& frontendHeap;
Model& model;
// MissionSelect
void gotoMissionSelectScreenNoTransitionImpl();
// AMI
void gotoAMIScreenNoTransitionImpl();
// DriverView
void gotoDriverViewScreenNoTransitionImpl();
// DebugView
void gotoDebugViewScreenNoTransitionImpl();
};
#endif // FRONTENDAPPLICATIONBASE_HPP

View File

@ -18,6 +18,8 @@
#include <gui/ami_screen/AMIPresenter.hpp>
#include <gui/driverview_screen/DriverViewView.hpp>
#include <gui/driverview_screen/DriverViewPresenter.hpp>
#include <gui/debugview_screen/DebugViewView.hpp>
#include <gui/debugview_screen/DebugViewPresenter.hpp>
/**
@ -43,7 +45,8 @@ public:
typedef touchgfx::meta::TypeList< MissionSelectView,
touchgfx::meta::TypeList< AMIView,
touchgfx::meta::TypeList< DriverViewView,
touchgfx::meta::Nil > >
touchgfx::meta::TypeList< DebugViewView,
touchgfx::meta::Nil > > >
> GeneratedViewTypes;
/**
@ -58,7 +61,8 @@ public:
typedef touchgfx::meta::TypeList< MissionSelectPresenter,
touchgfx::meta::TypeList< AMIPresenter,
touchgfx::meta::TypeList< DriverViewPresenter,
touchgfx::meta::Nil > >
touchgfx::meta::TypeList< DebugViewPresenter,
touchgfx::meta::Nil > > >
> GeneratedPresenterTypes;
/**
@ -81,7 +85,7 @@ public:
virtual void gotoStartScreen(FrontendApplication& app)
{
app.gotoDriverViewScreenNoTransition();
app.gotoMissionSelectScreenNoTransition();
}
protected:
FrontendHeapBase(touchgfx::AbstractPartition& presenters, touchgfx::AbstractPartition& views, touchgfx::AbstractPartition& transitions, FrontendApplication& app)

View File

@ -0,0 +1,33 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef DEBUGVIEWITEMBASE_HPP
#define DEBUGVIEWITEMBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
class DebugViewItemBase : public touchgfx::Container
{
public:
DebugViewItemBase();
virtual ~DebugViewItemBase();
virtual void initialize();
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::TextAreaWithOneWildcard label;
touchgfx::TextAreaWithOneWildcard value;
private:
};
#endif // DEBUGVIEWITEMBASE_HPP

View File

@ -0,0 +1,41 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef DEBUGVIEWLINEBASE_HPP
#define DEBUGVIEWLINEBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
#include <gui/containers/DebugViewItem.hpp>
class DebugViewLineBase : public touchgfx::Container
{
public:
DebugViewLineBase();
virtual ~DebugViewLineBase();
virtual void initialize();
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::Box bg;
touchgfx::Line line1;
touchgfx::PainterRGB565 line1Painter;
touchgfx::Line line2;
touchgfx::PainterRGB565 line2Painter;
DebugViewItem item1;
DebugViewItem item2;
private:
};
#endif // DEBUGVIEWLINEBASE_HPP

View File

@ -7,7 +7,6 @@
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/BoxWithBorder.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
class DriverViewFieldBase : public touchgfx::Container
@ -26,7 +25,7 @@ protected:
* Member Declarations
*/
touchgfx::BoxWithBorder box;
touchgfx::TextArea title;
touchgfx::TextAreaWithOneWildcard title;
touchgfx::TextAreaWithOneWildcard value;
private:

View File

@ -7,7 +7,7 @@
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/TextAreaWithWildcard.hpp>
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
@ -27,7 +27,7 @@ protected:
* Member Declarations
*/
touchgfx::Box bg;
touchgfx::TextArea name;
touchgfx::TextAreaWithOneWildcard name;
touchgfx::Line line1;
touchgfx::PainterRGB565 line1Painter;
touchgfx::Line line2;

View File

@ -0,0 +1,62 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef DEBUGVIEWVIEWBASE_HPP
#define DEBUGVIEWVIEWBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <mvp/View.hpp>
#include <gui/debugview_screen/DebugViewPresenter.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/containers/scrollers/ScrollList.hpp>
#include <gui/containers/DebugViewLine.hpp>
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
class DebugViewViewBase : public touchgfx::View<DebugViewPresenter>
{
public:
DebugViewViewBase();
virtual ~DebugViewViewBase();
virtual void setupScreen();
virtual void listUpdateItem(DebugViewLine& item, int16_t itemIndex)
{
// Override and implement this function in DebugView
}
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::Box __background;
touchgfx::ScrollList list;
touchgfx::DrawableListItems<DebugViewLine, 13> listListItems;
touchgfx::Line line1;
touchgfx::PainterRGB565 line1Painter;
private:
/*
* Canvas Buffer Size
*/
static const uint32_t CANVAS_BUFFER_SIZE = 7200;
uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
/*
* Callback Declarations
*/
touchgfx::Callback<DebugViewViewBase, touchgfx::DrawableListItemsInterface*, int16_t, int16_t> updateItemCallback;
/*
* Callback Handler Declarations
*/
void updateItemCallbackHandler(touchgfx::DrawableListItemsInterface* items, int16_t containerIndex, int16_t itemIndex);
};
#endif // DEBUGVIEWVIEWBASE_HPP