Skip to content

Commit

Permalink
🚸 Optional Cutter/Laser status for HD44780 (MarlinFirmware#25003)
Browse files Browse the repository at this point in the history
  • Loading branch information
xythobuz authored and thinkyhead committed Dec 16, 2022
1 parent b9bed1c commit b6051fe
Show file tree
Hide file tree
Showing 19 changed files with 178 additions and 124 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/feature/power_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ PowerMonitor power_monitor; // Single instance - this calls the constructor
void PowerMonitor::draw_current() {
const float amps = getAmps();
lcd_put_u8str(amps < 100 ? ftostr31ns(amps) : ui16tostr4rj((uint16_t)amps));
lcd_put_lchar('A');
lcd_put_u8str(F("A"));
}
#endif

#if ENABLED(POWER_MONITOR_VOLTAGE)
void PowerMonitor::draw_voltage() {
const float volts = getVolts();
lcd_put_u8str(volts < 100 ? ftostr31ns(volts) : ui16tostr4rj((uint16_t)volts));
lcd_put_lchar('V');
lcd_put_u8str(F("V"));
}
#endif

#if HAS_POWER_MONITOR_WATTS
void PowerMonitor::draw_power() {
const float power = getPower();
lcd_put_u8str(power < 100 ? ftostr31ns(power) : ui16tostr4rj((uint16_t)power));
lcd_put_lchar('W');
lcd_put_u8str(F("W"));
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ typedef struct _hd44780_charmap_t {
} hd44780_charmap_t;

#ifdef __AVR__
#define IV(a) U##a
#define IV(a) lchar_t(U##a)
#else
#define IV(a) L##a
#define IV(a) lchar_t(L##a)
#endif

static const hd44780_charmap_t g_hd44780_charmap_device[] PROGMEM = {
Expand Down
Loading

0 comments on commit b6051fe

Please sign in to comment.