Status bar to the top

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

View File

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

View File

@ -14,6 +14,7 @@ const uint16_t BITMAP_FASTTUBE_LOGO_WHITE_ID = 4;
const uint16_t BITMAP_LOGO_DV_SMALL_ID = 5; const uint16_t BITMAP_LOGO_DV_SMALL_ID = 5;
const uint16_t BITMAP_LOGO_DV_SMALL_WHITE_ID = 6; const uint16_t BITMAP_LOGO_DV_SMALL_WHITE_ID = 6;
const uint16_t BITMAP_PRECHARGE_BG_ID = 7; const uint16_t BITMAP_PRECHARGE_BG_ID = 7;
const uint16_t BITMAP_PROG_HORIZ_BG_ID = 8;
namespace BitmapDatabase namespace BitmapDatabase
{ {

View File

@ -1,4 +1,4 @@
// 4.21.2 0x4415ad56 // 4.21.2 0xf98ee735
// Generated by imageconverter. Please, do not edit! // Generated by imageconverter. Please, do not edit!
#include <images/BitmapDatabase.hpp> #include <images/BitmapDatabase.hpp>
@ -12,6 +12,7 @@ extern const unsigned char image_fasttube_logo_white[]; // BITMAP_FASTTUBE_LOGO_
extern const unsigned char image_logo_dv_small[]; // BITMAP_LOGO_DV_SMALL_ID = 5, Size: 160x55 pixels extern const unsigned char image_logo_dv_small[]; // BITMAP_LOGO_DV_SMALL_ID = 5, Size: 160x55 pixels
extern const unsigned char image_logo_dv_small_white[]; // BITMAP_LOGO_DV_SMALL_WHITE_ID = 6, Size: 160x39 pixels extern const unsigned char image_logo_dv_small_white[]; // BITMAP_LOGO_DV_SMALL_WHITE_ID = 6, Size: 160x39 pixels
extern const unsigned char image_precharge_bg[]; // BITMAP_PRECHARGE_BG_ID = 7, Size: 450x29 pixels extern const unsigned char image_precharge_bg[]; // BITMAP_PRECHARGE_BG_ID = 7, Size: 450x29 pixels
extern const unsigned char image_prog_horiz_bg[]; // BITMAP_PROG_HORIZ_BG_ID = 8, Size: 450x33 pixels
const touchgfx::Bitmap::BitmapData bitmap_database[] = { const touchgfx::Bitmap::BitmapData bitmap_database[] = {
{ image_bat_bar_bg, 0, 40, 150, 0, 0, 40, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 150, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 }, { image_bat_bar_bg, 0, 40, 150, 0, 0, 40, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 150, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
@ -21,7 +22,8 @@ const touchgfx::Bitmap::BitmapData bitmap_database[] = {
{ image_fasttube_logo_white, 0, 480, 165, 0, 0, 480, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 165, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 }, { image_fasttube_logo_white, 0, 480, 165, 0, 0, 480, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 165, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
{ image_logo_dv_small, 0, 160, 55, 62, 42, 37, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 2, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 }, { image_logo_dv_small, 0, 160, 55, 62, 42, 37, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 2, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 },
{ image_logo_dv_small_white, 0, 160, 39, 47, 0, 1, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 17, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 }, { image_logo_dv_small_white, 0, 160, 39, 47, 0, 1, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 17, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 },
{ image_precharge_bg, 0, 450, 29, 0, 0, 450, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 29, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 } { image_precharge_bg, 0, 450, 29, 0, 0, 450, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 29, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
{ image_prog_horiz_bg, 0, 450, 33, 0, 0, 450, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 33, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 }
}; };
namespace BitmapDatabase namespace BitmapDatabase

File diff suppressed because it is too large Load Diff

View File

@ -248,7 +248,7 @@
"Type": "LineProgress", "Type": "LineProgress",
"Name": "tsSoC", "Name": "tsSoC",
"X": 15, "X": 15,
"Y": 122, "Y": 155,
"Width": 40, "Width": 40,
"Height": 150, "Height": 150,
"Color": { "Color": {
@ -268,7 +268,7 @@
"Type": "LineProgress", "Type": "LineProgress",
"Name": "lvSoC", "Name": "lvSoC",
"X": 110, "X": 110,
"Y": 122, "Y": 155,
"Width": 40, "Width": 40,
"Height": 150, "Height": 150,
"Color": { "Color": {
@ -288,7 +288,7 @@
"Type": "TextArea", "Type": "TextArea",
"Name": "tsSoCLabel", "Name": "tsSoCLabel",
"X": 15, "X": 15,
"Y": 97, "Y": 130,
"Width": 40, "Width": 40,
"Height": 25, "Height": 25,
"TextId": "__SingleUse_PHFD", "TextId": "__SingleUse_PHFD",
@ -303,7 +303,7 @@
"Type": "TextArea", "Type": "TextArea",
"Name": "lvSoCLabel", "Name": "lvSoCLabel",
"X": 110, "X": 110,
"Y": 97, "Y": 130,
"Width": 40, "Width": 40,
"Height": 25, "Height": 25,
"TextId": "__SingleUse_4OBM", "TextId": "__SingleUse_4OBM",
@ -318,7 +318,7 @@
"Type": "CustomContainerInstance", "Type": "CustomContainerInstance",
"Name": "errorPopup", "Name": "errorPopup",
"X": 15, "X": 15,
"Y": 122, "Y": 155,
"Width": 450, "Width": 450,
"Height": 150, "Height": 150,
"Visible": false, "Visible": false,
@ -328,7 +328,7 @@
"Type": "Container", "Type": "Container",
"Name": "drivetrainTemps", "Name": "drivetrainTemps",
"X": 315, "X": 315,
"Y": 97, "Y": 130,
"Width": 150, "Width": 150,
"Height": 175, "Height": 175,
"Components": [ "Components": [
@ -433,7 +433,7 @@
"Type": "Container", "Type": "Container",
"Name": "brakeTemps", "Name": "brakeTemps",
"X": 165, "X": 165,
"Y": 97, "Y": 130,
"Width": 150, "Width": 150,
"Height": 150, "Height": 150,
"Components": [ "Components": [
@ -524,7 +524,7 @@
"Type": "Container", "Type": "Container",
"Name": "dataFields", "Name": "dataFields",
"X": 15, "X": 15,
"Y": 15, "Y": 48,
"Width": 450, "Width": 450,
"Height": 305, "Height": 305,
"Components": [ "Components": [
@ -573,23 +573,22 @@
"Type": "Container", "Type": "Container",
"Name": "statusBar", "Name": "statusBar",
"X": 15, "X": 15,
"Y": 275, "Y": 15,
"Width": 450, "Width": 450,
"Height": 37, "Height": 33,
"Components": [ "Components": [
{ {
"Type": "BoxProgress", "Type": "BoxProgress",
"Name": "progressBar", "Name": "progressBar",
"Y": 5,
"Width": 450, "Width": 450,
"Height": 29, "Height": 33,
"Visible": false, "Visible": false,
"Color": { "Color": {
"Red": 99, "Red": 99,
"Green": 186 "Green": 186
}, },
"Direction": "Right", "Direction": "Right",
"FileNameBackground": "precharge_bg.png", "FileNameBackground": "prog_horiz_bg.png",
"IndicatorPositionWidth": 480, "IndicatorPositionWidth": 480,
"IndicatorPositionHeight": 55, "IndicatorPositionHeight": 55,
"ProgressRangeMax": 100 "ProgressRangeMax": 100
@ -598,6 +597,7 @@
"Type": "TextArea", "Type": "TextArea",
"Name": "prechargeLabel", "Name": "prechargeLabel",
"X": 90, "X": 90,
"Y": -2,
"Width": 269, "Width": 269,
"Height": 37, "Height": 37,
"Visible": false, "Visible": false,
@ -614,6 +614,7 @@
"Type": "TextArea", "Type": "TextArea",
"Name": "r2dLabel", "Name": "r2dLabel",
"X": 67, "X": 67,
"Y": -2,
"Width": 317, "Width": 317,
"Height": 37, "Height": 37,
"Visible": false, "Visible": false,
@ -629,6 +630,7 @@
"Type": "TextArea", "Type": "TextArea",
"Name": "r2dProgressLabel", "Name": "r2dProgressLabel",
"X": 165, "X": 165,
"Y": -2,
"Width": 219, "Width": 219,
"Height": 37, "Height": 37,
"Visible": false, "Visible": false,