GFX Develop Branch

This commit is contained in:
2024-06-11 19:38:14 +02:00
parent e23389a0b9
commit b0ef96e390
647 changed files with 10174 additions and 6435 deletions

View File

@ -34,6 +34,7 @@ FrontendApplicationBase::FrontendApplicationBase(Model& m, FrontendHeap& heap)
touchgfx::Texts::setLanguage(GB);
reinterpret_cast<touchgfx::LCD16bpp&>(touchgfx::HAL::lcd()).enableTextureMapperAll();
reinterpret_cast<touchgfx::LCD16bpp&>(touchgfx::HAL::lcd()).enableDecompressorL8_All();
reinterpret_cast<touchgfx::LCD16bpp&>(touchgfx::HAL::lcd()).enableDecompressorRGB();
}
/*

View File

@ -22,6 +22,7 @@ DebugViewViewBase::DebugViewViewBase() :
list.setDragAcceleration(10);
list.setNumberOfItems(1);
list.setSelectedItemOffset(0);
list.setOvershootPercentage(0);
list.setDrawableSize(26, 0);
list.setDrawables(listListItems, updateItemCallback);
list.animateToItem(0, 0);

View File

@ -4,8 +4,8 @@
#include <gui_generated/driverview_screen/DriverViewViewBase.hpp>
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
#include <touchgfx/Color.hpp>
#include <images/BitmapDatabase.hpp>
#include <texts/TextKeysAndLanguages.hpp>
#include <images/BitmapDatabase.hpp>
DriverViewViewBase::DriverViewViewBase() :
updateItemCallback(this, &DriverViewViewBase::updateItemCallbackHandler)
@ -16,28 +16,6 @@ DriverViewViewBase::DriverViewViewBase() :
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
add(__background);
SoC.setPosition(12, 277, 456, 33);
soc.setXY(0, 0);
soc.setProgressIndicatorPosition(0, 0, 456, 33);
soc.setRange(0, 100);
soc.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID));
socPainter.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
soc.setPainter(socPainter);
soc.setStart(0, 16);
soc.setEnd(456, 16);
soc.setLineWidth(100);
soc.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
soc.setValue(60);
SoC.add(soc);
socLabel.setPosition(188, 4, 81, 25);
socLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
socLabel.setLinespacing(0);
socLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_PHFD));
SoC.add(socLabel);
add(SoC);
brakeTemps.setPosition(164, 125, 152, 150);
btDivVert.setPosition(74, 25, 3, 123);
btDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
@ -86,6 +64,7 @@ DriverViewViewBase::DriverViewViewBase() :
fieldTypeSelection.setDragAcceleration(10);
fieldTypeSelection.setNumberOfItems(1);
fieldTypeSelection.setSelectedItemOffset(94);
fieldTypeSelection.setOvershootPercentage(0);
fieldTypeSelection.setDrawableSize(26, 0);
fieldTypeSelection.setDrawables(fieldTypeSelectionListItems, updateItemCallback);
fieldTypeSelection.animateToItem(0, 0);
@ -103,7 +82,7 @@ DriverViewViewBase::DriverViewViewBase() :
add(dataFields);
statusBar.setPosition(12, 10, 456, 33);
statusBar.setPosition(12, 280, 456, 33);
statusItems.setXY(0, 0);
statusItems.setDirection(touchgfx::EAST);
@ -156,6 +135,28 @@ DriverViewViewBase::DriverViewViewBase() :
add(statusBar);
SoC.setPosition(12, 277, 456, 33);
soc.setXY(0, -267);
soc.setProgressIndicatorPosition(0, 0, 456, 33);
soc.setRange(0, 100);
soc.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID));
socPainter.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
soc.setPainter(socPainter);
soc.setStart(0, 16);
soc.setEnd(456, 16);
soc.setLineWidth(100);
soc.setLineEndingStyle(touchgfx::Line::BUTT_CAP_ENDING);
soc.setValue(60);
SoC.add(soc);
socLabel.setPosition(178, -263, 81, 25);
socLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
socLabel.setLinespacing(0);
socLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_PHFD));
SoC.add(socLabel);
add(SoC);
errorPopup.setXY(12, 125);
errorPopup.setVisible(false);
add(errorPopup);

View File

@ -109,10 +109,10 @@ void MissionSelectViewBase::handleKeyEvent(uint8_t key)
}
if(253 == key)
if(68 == key)
{
//DummyChangeDriverView
//When hardware button 253 clicked change screen to DriverView
//When hardware button 68 clicked change screen to DriverView
//Go to DriverView with no screen transition
application().gotoDriverViewScreenNoTransition();

View File

@ -29,6 +29,7 @@ VehicleConfigViewBase::VehicleConfigViewBase() :
params.setDragAcceleration(10);
params.setNumberOfItems(1);
params.setSelectedItemOffset(0);
params.setOvershootPercentage(0);
params.setDrawableSize(50, 0);
params.setDrawables(paramsListItems, updateItemCallback);
params.animateToItem(0, 0);