add basic system overview screen with can watchdogs and brake pressure
This commit is contained in:
@ -38,6 +38,9 @@ public:
|
||||
// SDC
|
||||
void gotoSDCScreenNoTransition();
|
||||
|
||||
// SystemOverview
|
||||
void gotoSystemOverviewScreenNoTransition();
|
||||
|
||||
protected:
|
||||
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
|
||||
FrontendHeap& frontendHeap;
|
||||
@ -60,6 +63,9 @@ protected:
|
||||
|
||||
// SDC
|
||||
void gotoSDCScreenNoTransitionImpl();
|
||||
|
||||
// SystemOverview
|
||||
void gotoSystemOverviewScreenNoTransitionImpl();
|
||||
};
|
||||
|
||||
#endif // FRONTENDAPPLICATIONBASE_HPP
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
|
||||
#include <gui/sdc_screen/SDCView.hpp>
|
||||
#include <gui/sdc_screen/SDCPresenter.hpp>
|
||||
#include <gui/systemoverview_screen/SystemOverviewView.hpp>
|
||||
#include <gui/systemoverview_screen/SystemOverviewPresenter.hpp>
|
||||
|
||||
|
||||
/**
|
||||
@ -52,7 +54,8 @@ public:
|
||||
touchgfx::meta::TypeList< DebugViewView,
|
||||
touchgfx::meta::TypeList< VehicleConfigView,
|
||||
touchgfx::meta::TypeList< SDCView,
|
||||
touchgfx::meta::Nil > > > > >
|
||||
touchgfx::meta::TypeList< SystemOverviewView,
|
||||
touchgfx::meta::Nil > > > > > >
|
||||
> GeneratedViewTypes;
|
||||
|
||||
/**
|
||||
@ -70,7 +73,8 @@ public:
|
||||
touchgfx::meta::TypeList< DebugViewPresenter,
|
||||
touchgfx::meta::TypeList< VehicleConfigPresenter,
|
||||
touchgfx::meta::TypeList< SDCPresenter,
|
||||
touchgfx::meta::Nil > > > > >
|
||||
touchgfx::meta::TypeList< SystemOverviewPresenter,
|
||||
touchgfx::meta::Nil > > > > > >
|
||||
> GeneratedPresenterTypes;
|
||||
|
||||
/**
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#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 DriverViewStatusItemBase : public touchgfx::Container
|
||||
{
|
||||
@ -25,7 +25,7 @@ protected:
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::BoxWithBorder bg;
|
||||
touchgfx::TextArea text;
|
||||
touchgfx::TextAreaWithOneWildcard text;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#ifndef SYSTEMOVERVIEWVIEWBASE_HPP
|
||||
#define SYSTEMOVERVIEWVIEWBASE_HPP
|
||||
|
||||
#include <gui/common/FrontendApplication.hpp>
|
||||
#include <mvp/View.hpp>
|
||||
#include <gui/systemoverview_screen/SystemOverviewPresenter.hpp>
|
||||
#include <touchgfx/widgets/Box.hpp>
|
||||
#include <touchgfx/containers/Container.hpp>
|
||||
#include <gui/containers/DriverViewStatusItem.hpp>
|
||||
#include <touchgfx/widgets/TextArea.hpp>
|
||||
|
||||
class SystemOverviewViewBase : public touchgfx::View<SystemOverviewPresenter>
|
||||
{
|
||||
public:
|
||||
SystemOverviewViewBase();
|
||||
virtual ~SystemOverviewViewBase();
|
||||
virtual void setupScreen();
|
||||
|
||||
protected:
|
||||
FrontendApplication& application() {
|
||||
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
|
||||
}
|
||||
|
||||
/*
|
||||
* Member Declarations
|
||||
*/
|
||||
touchgfx::Box __background;
|
||||
touchgfx::Container statusItems;
|
||||
DriverViewStatusItem statusTS_R2D;
|
||||
DriverViewStatusItem status1;
|
||||
DriverViewStatusItem statusSDC;
|
||||
DriverViewStatusItem statusSCS;
|
||||
DriverViewStatusItem status2;
|
||||
DriverViewStatusItem status3;
|
||||
DriverViewStatusItem status4;
|
||||
DriverViewStatusItem statusINV;
|
||||
DriverViewStatusItem statusAMS;
|
||||
DriverViewStatusItem statusShunt;
|
||||
DriverViewStatusItem statusLV;
|
||||
DriverViewStatusItem statusSNR;
|
||||
DriverViewStatusItem statusPDU;
|
||||
DriverViewStatusItem statusFTCU;
|
||||
DriverViewStatusItem statusDB;
|
||||
DriverViewStatusItem statusSNF;
|
||||
DriverViewStatusItem statusBPR;
|
||||
DriverViewStatusItem statusBPF;
|
||||
touchgfx::TextArea textArea1;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif // SYSTEMOVERVIEWVIEWBASE_HPP
|
||||
@ -21,6 +21,8 @@
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
|
||||
#include <gui/sdc_screen/SDCView.hpp>
|
||||
#include <gui/sdc_screen/SDCPresenter.hpp>
|
||||
#include <gui/systemoverview_screen/SystemOverviewView.hpp>
|
||||
#include <gui/systemoverview_screen/SystemOverviewPresenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
@ -118,3 +120,16 @@ void FrontendApplicationBase::gotoSDCScreenNoTransitionImpl()
|
||||
{
|
||||
touchgfx::makeTransition<SDCView, SDCPresenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
|
||||
}
|
||||
|
||||
// SystemOverview
|
||||
|
||||
void FrontendApplicationBase::gotoSystemOverviewScreenNoTransition()
|
||||
{
|
||||
transitionCallback = touchgfx::Callback<FrontendApplicationBase>(this, &FrontendApplicationBase::gotoSystemOverviewScreenNoTransitionImpl);
|
||||
pendingScreenTransitionCallback = &transitionCallback;
|
||||
}
|
||||
|
||||
void FrontendApplicationBase::gotoSystemOverviewScreenNoTransitionImpl()
|
||||
{
|
||||
touchgfx::makeTransition<SystemOverviewView, SystemOverviewPresenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
|
||||
}
|
||||
|
||||
@ -144,4 +144,13 @@ void MissionSelectViewBase::handleKeyEvent(uint8_t key)
|
||||
application().gotoSDCScreenNoTransition();
|
||||
|
||||
}
|
||||
|
||||
if(79 == key)
|
||||
{
|
||||
//DummyChangeSystemOverviewView
|
||||
//When hardware button 79 clicked change screen to SystemOverview
|
||||
//Go to SystemOverview with no screen transition
|
||||
application().gotoSystemOverviewScreenNoTransition();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,103 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#include <gui_generated/systemoverview_screen/SystemOverviewViewBase.hpp>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
SystemOverviewViewBase::SystemOverviewViewBase()
|
||||
{
|
||||
__background.setPosition(0, 0, 480, 320);
|
||||
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
|
||||
add(__background);
|
||||
|
||||
statusItems.setPosition(0, 0, 480, 320);
|
||||
statusTS_R2D.setXY(12, 280);
|
||||
statusItems.add(statusTS_R2D);
|
||||
|
||||
status1.setXY(77, 280);
|
||||
statusItems.add(status1);
|
||||
|
||||
statusSDC.setXY(142, 280);
|
||||
statusItems.add(statusSDC);
|
||||
|
||||
statusSCS.setXY(207, 280);
|
||||
statusItems.add(statusSCS);
|
||||
|
||||
status2.setXY(272, 280);
|
||||
statusItems.add(status2);
|
||||
|
||||
status3.setXY(337, 280);
|
||||
statusItems.add(status3);
|
||||
|
||||
status4.setXY(402, 280);
|
||||
statusItems.add(status4);
|
||||
|
||||
statusINV.setXY(337, 218);
|
||||
statusItems.add(statusINV);
|
||||
|
||||
statusAMS.setXY(402, 202);
|
||||
statusItems.add(statusAMS);
|
||||
|
||||
statusShunt.setXY(402, 234);
|
||||
statusItems.add(statusShunt);
|
||||
|
||||
statusLV.setXY(337, 185);
|
||||
statusItems.add(statusLV);
|
||||
|
||||
statusSNR.setXY(402, 169);
|
||||
statusItems.add(statusSNR);
|
||||
|
||||
statusPDU.setXY(402, 136);
|
||||
statusItems.add(statusPDU);
|
||||
|
||||
statusFTCU.setXY(337, 120);
|
||||
statusItems.add(statusFTCU);
|
||||
|
||||
statusDB.setXY(337, 87);
|
||||
statusItems.add(statusDB);
|
||||
|
||||
statusSNF.setXY(402, 70);
|
||||
statusItems.add(statusSNF);
|
||||
|
||||
statusBPR.setXY(12, 63);
|
||||
statusItems.add(statusBPR);
|
||||
|
||||
statusBPF.setXY(12, 30);
|
||||
statusItems.add(statusBPF);
|
||||
|
||||
add(statusItems);
|
||||
|
||||
textArea1.setXY(12, 5);
|
||||
textArea1.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
textArea1.setLinespacing(0);
|
||||
textArea1.setTypedText(touchgfx::TypedText(T___SINGLEUSE_HTV5));
|
||||
add(textArea1);
|
||||
}
|
||||
|
||||
SystemOverviewViewBase::~SystemOverviewViewBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SystemOverviewViewBase::setupScreen()
|
||||
{
|
||||
statusTS_R2D.initialize();
|
||||
status1.initialize();
|
||||
statusSDC.initialize();
|
||||
statusSCS.initialize();
|
||||
status2.initialize();
|
||||
status3.initialize();
|
||||
status4.initialize();
|
||||
statusINV.initialize();
|
||||
statusAMS.initialize();
|
||||
statusShunt.initialize();
|
||||
statusLV.initialize();
|
||||
statusSNR.initialize();
|
||||
statusPDU.initialize();
|
||||
statusFTCU.initialize();
|
||||
statusDB.initialize();
|
||||
statusSNF.initialize();
|
||||
statusBPR.initialize();
|
||||
statusBPF.initialize();
|
||||
}
|
||||
Reference in New Issue
Block a user