SSL_Display OK

This commit is contained in:
2024-02-12 17:59:32 -03:00
parent 4139759b96
commit 5fcfc681b3
4 changed files with 56 additions and 9 deletions

View File

@@ -250,8 +250,8 @@ int32_t SSL_GFX::drawId(uint8_t color[3]) {
uint32_t errors = 0;
errors += drawText(color, 3, 71, (uint8_t*)"ID = ", 5);
if(robotStatus.robotId<10){
uint8_t robotIdChar = robotStatus.robotId+48;
errors += drawText(color, 33, 71, &robotIdChar, 1);
uint8_t robotIdChar[2] = {robotStatus.robotId+48, 32};
errors += drawText(color, 33, 71, robotIdChar, 2);
}else{
uint8_t robotIdChar[2] = {49, robotStatus.robotId+(uint8_t)38};
errors += drawText(color, 33, 71, robotIdChar, 2);
@@ -263,7 +263,7 @@ int32_t SSL_GFX::drawBatteryBar() {
uint32_t errors = 0;
for(uint32_t j = 3; j<7; j++){
for(uint32_t k = 3; k<77; k++){
if(robotStatus.batteryLevel*74 > k){
if(robotStatus.batteryLevel*74 > k-3){
if(robotStatus.batteryLevel>0.5){
hBuffer[j][k][0] = ((uint8_t)(512-robotStatus.batteryLevel*512))&0xFC;
hBuffer[j][k][1] = 255&0xFC;