From 47137419e249d5f81a5a176ba9e9eed88e7e9fb7 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Fri, 15 May 2020 12:39:19 +0200 Subject: [PATCH] Last fixes for display wrong characters. --- UI.hpp | 16 ++++++++-------- config.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UI.hpp b/UI.hpp index 5b276e3..256b72b 100644 --- a/UI.hpp +++ b/UI.hpp @@ -5051,16 +5051,16 @@ void lcd_display_bar_float(const char* title, float value, float factor, int32_t if (vi == 0) { - lcd.write((uint8_t)vf / 2.0 - 0.5); + lcd.write((uint8_t)(vf / 2.0 - 0.5) + 2); for (uint8_t i = vi + 1; i < cols; i++) lcd.print(F(" ")); // empty block } else { for (uint8_t i = 0; i < vi; i++) - lcd.write((uint8_t)4); // full block + lcd.write((uint8_t)4 + 2); // full block if (vi < cols) - lcd.write((uint8_t)vf / 2.0 - 0.5); + lcd.write((uint8_t)(vf / 2.0 - 0.5) + 2); for (uint8_t i = vi + 1; i < cols; i++) lcd.print(F(" ")); // empty block } @@ -5119,7 +5119,7 @@ void lcd_display_meter_float(const char* title, float value, float factor, float if (vi == 0) { - lcd.write((uint8_t)(vf / 2.0)); + lcd.write((uint8_t)(vf / 2.0) + 2); for (uint8_t i = 1; i < cols; i++) lcd.print(F(" ")); // empty block } @@ -5127,14 +5127,14 @@ void lcd_display_meter_float(const char* title, float value, float factor, float { for (uint8_t i = 0; i < cols - 1; i++) lcd.print(F(" ")); // empty block - lcd.write(4); + lcd.write(4 + 2); } else { for (uint8_t i = 0; i < cols; i++) lcd.print(F(" ")); // empty block lcd.setCursor(vi, 1); - lcd.write((uint8_t)(vf / 2.0)); + lcd.write((uint8_t)(vf / 2.0) + 2); for (uint8_t i = vi + 1; i < cols; i++) lcd.print(F(" ")); // empty block } @@ -5262,7 +5262,7 @@ void lcd_special_chars(uint8_t mode) for (uint8_t i = 0; i < 7; i++) { #ifdef I2C_DISPLAY - lcd.createChar(i, (uint8_t*)block_bar[i]); + lcd.createChar(i + 2, (uint8_t*)block_bar[i]); #else flipped_block_bar[i] = rotTile(block_bar[i]); #endif @@ -5273,7 +5273,7 @@ void lcd_special_chars(uint8_t mode) for (uint8_t i = 0; i < 7; i++) { #ifdef I2C_DISPLAY - lcd.createChar(i, (uint8_t*)meter_bar[i]); + lcd.createChar(i + 2, (uint8_t*)meter_bar[i]); #else flipped_meter_bar[i] = rotTile(meter_bar[i]); #endif diff --git a/config.h b/config.h index a2e148a..4f4b22b 100644 --- a/config.h +++ b/config.h @@ -84,7 +84,7 @@ //************************************************************************************************* //* DEBUG OUTPUT SETTINGS //************************************************************************************************* -#define DEBUG 1 +//#define DEBUG 1 #define SERIAL_SPEED 230400 #define SHOW_XRUN 1 #define SHOW_CPU_LOAD_MSEC 5000