Status bar to the top

This commit is contained in:
2023-05-22 06:31:42 +02:00
parent d1d0c3df1d
commit efa36eab5f
6 changed files with 2517 additions and 29 deletions

View File

@ -16,7 +16,7 @@ DriverViewViewBase::DriverViewViewBase() :
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
add(__background);
tsSoC.setXY(15, 122);
tsSoC.setXY(15, 155);
tsSoC.setProgressIndicatorPosition(0, 0, 40, 150);
tsSoC.setRange(0, 100);
tsSoC.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
@ -29,7 +29,7 @@ DriverViewViewBase::DriverViewViewBase() :
tsSoC.setValue(60);
add(tsSoC);
lvSoC.setXY(110, 122);
lvSoC.setXY(110, 155);
lvSoC.setProgressIndicatorPosition(0, 0, 40, 150);
lvSoC.setRange(0, 100);
lvSoC.setBackground(touchgfx::Bitmap(BITMAP_BAT_BAR_BG_ID));
@ -42,23 +42,23 @@ DriverViewViewBase::DriverViewViewBase() :
lvSoC.setValue(80);
add(lvSoC);
tsSoCLabel.setPosition(15, 97, 40, 25);
tsSoCLabel.setPosition(15, 130, 40, 25);
tsSoCLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
tsSoCLabel.setLinespacing(0);
tsSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_PHFD));
add(tsSoCLabel);
lvSoCLabel.setPosition(110, 97, 40, 25);
lvSoCLabel.setPosition(110, 130, 40, 25);
lvSoCLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
lvSoCLabel.setLinespacing(0);
lvSoCLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_4OBM));
add(lvSoCLabel);
errorPopup.setXY(15, 122);
errorPopup.setXY(15, 155);
errorPopup.setVisible(false);
add(errorPopup);
drivetrainTemps.setPosition(315, 97, 150, 175);
drivetrainTemps.setPosition(315, 130, 150, 175);
motorTempLabel.setPosition(0, 90, 150, 25);
motorTempLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
motorTempLabel.setLinespacing(0);
@ -103,7 +103,7 @@ DriverViewViewBase::DriverViewViewBase() :
add(drivetrainTemps);
brakeTemps.setPosition(165, 97, 150, 150);
brakeTemps.setPosition(165, 130, 150, 150);
btDivVert.setPosition(74, 25, 3, 123);
btDivVertPainter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
btDivVert.setPainter(btDivVertPainter);
@ -142,7 +142,7 @@ DriverViewViewBase::DriverViewViewBase() :
add(brakeTemps);
dataFields.setPosition(15, 15, 450, 305);
dataFields.setPosition(15, 48, 450, 305);
fieldTypeSelection.setPosition(0, 80, 150, 225);
fieldTypeSelection.setHorizontal(false);
fieldTypeSelection.setCircular(true);
@ -168,32 +168,32 @@ DriverViewViewBase::DriverViewViewBase() :
add(dataFields);
statusBar.setPosition(15, 275, 450, 37);
progressBar.setXY(0, 5);
statusBar.setPosition(15, 15, 450, 33);
progressBar.setXY(0, 0);
progressBar.setProgressIndicatorPosition(0, 0, 480, 55);
progressBar.setRange(0, 100);
progressBar.setDirection(touchgfx::AbstractDirectionProgress::RIGHT);
progressBar.setBackground(touchgfx::Bitmap(BITMAP_PRECHARGE_BG_ID));
progressBar.setBackground(touchgfx::Bitmap(BITMAP_PROG_HORIZ_BG_ID));
progressBar.setColor(touchgfx::Color::getColorFromRGB(99, 186, 0));
progressBar.setValue(0);
progressBar.setVisible(false);
statusBar.add(progressBar);
prechargeLabel.setXY(90, 0);
prechargeLabel.setXY(90, -2);
prechargeLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
prechargeLabel.setLinespacing(0);
prechargeLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_HMH2));
prechargeLabel.setVisible(false);
statusBar.add(prechargeLabel);
r2dLabel.setPosition(67, 0, 317, 37);
r2dLabel.setPosition(67, -2, 317, 37);
r2dLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
r2dLabel.setLinespacing(0);
r2dLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_NGUK));
r2dLabel.setVisible(false);
statusBar.add(r2dLabel);
r2dProgressLabel.setPosition(165, 0, 219, 37);
r2dProgressLabel.setPosition(165, -2, 219, 37);
r2dProgressLabel.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
r2dProgressLabel.setLinespacing(0);
r2dProgressLabel.setTypedText(touchgfx::TypedText(T___SINGLEUSE_J5UH));