Last fixes for display wrong characters.

pull/32/head
Holger Wirtz 5 years ago
parent 6b39de5b19
commit 47137419e2
  1. 16
      UI.hpp
  2. 2
      config.h

@ -5051,16 +5051,16 @@ void lcd_display_bar_float(const char* title, float value, float factor, int32_t
if (vi == 0) 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++) for (uint8_t i = vi + 1; i < cols; i++)
lcd.print(F(" ")); // empty block lcd.print(F(" ")); // empty block
} }
else else
{ {
for (uint8_t i = 0; i < vi; i++) 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) 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++) for (uint8_t i = vi + 1; i < cols; i++)
lcd.print(F(" ")); // empty block 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) 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++) for (uint8_t i = 1; i < cols; i++)
lcd.print(F(" ")); // empty block 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++) for (uint8_t i = 0; i < cols - 1; i++)
lcd.print(F(" ")); // empty block lcd.print(F(" ")); // empty block
lcd.write(4); lcd.write(4 + 2);
} }
else else
{ {
for (uint8_t i = 0; i < cols; i++) for (uint8_t i = 0; i < cols; i++)
lcd.print(F(" ")); // empty block lcd.print(F(" ")); // empty block
lcd.setCursor(vi, 1); 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++) for (uint8_t i = vi + 1; i < cols; i++)
lcd.print(F(" ")); // empty block lcd.print(F(" ")); // empty block
} }
@ -5262,7 +5262,7 @@ void lcd_special_chars(uint8_t mode)
for (uint8_t i = 0; i < 7; i++) for (uint8_t i = 0; i < 7; i++)
{ {
#ifdef I2C_DISPLAY #ifdef I2C_DISPLAY
lcd.createChar(i, (uint8_t*)block_bar[i]); lcd.createChar(i + 2, (uint8_t*)block_bar[i]);
#else #else
flipped_block_bar[i] = rotTile(block_bar[i]); flipped_block_bar[i] = rotTile(block_bar[i]);
#endif #endif
@ -5273,7 +5273,7 @@ void lcd_special_chars(uint8_t mode)
for (uint8_t i = 0; i < 7; i++) for (uint8_t i = 0; i < 7; i++)
{ {
#ifdef I2C_DISPLAY #ifdef I2C_DISPLAY
lcd.createChar(i, (uint8_t*)meter_bar[i]); lcd.createChar(i + 2, (uint8_t*)meter_bar[i]);
#else #else
flipped_meter_bar[i] = rotTile(meter_bar[i]); flipped_meter_bar[i] = rotTile(meter_bar[i]);
#endif #endif

@ -84,7 +84,7 @@
//************************************************************************************************* //*************************************************************************************************
//* DEBUG OUTPUT SETTINGS //* DEBUG OUTPUT SETTINGS
//************************************************************************************************* //*************************************************************************************************
#define DEBUG 1 //#define DEBUG 1
#define SERIAL_SPEED 230400 #define SERIAL_SPEED 230400
#define SHOW_XRUN 1 #define SHOW_XRUN 1
#define SHOW_CPU_LOAD_MSEC 5000 #define SHOW_CPU_LOAD_MSEC 5000

Loading…
Cancel
Save