|
@@ -1695,7 +1695,7 @@ static void lcd_menu_temperatures()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef defined(VOLT_BED_PIN) || defined(VOLT_BED_PIN)
|
|
|
|
|
|
+#if defined VOLT_BED_PIN || defined VOLT_PWR_PIN
|
|
#define VOLT_DIV_R1 10000
|
|
#define VOLT_DIV_R1 10000
|
|
#define VOLT_DIV_R2 2370
|
|
#define VOLT_DIV_R2 2370
|
|
#define VOLT_DIV_FAC ((float)VOLT_DIV_R2 / (VOLT_DIV_R2 + VOLT_DIV_R1))
|
|
#define VOLT_DIV_FAC ((float)VOLT_DIV_R2 / (VOLT_DIV_R2 + VOLT_DIV_R1))
|
|
@@ -1703,8 +1703,8 @@ static void lcd_menu_temperatures()
|
|
static void lcd_menu_voltages()
|
|
static void lcd_menu_voltages()
|
|
{
|
|
{
|
|
float volt_pwr = VOLT_DIV_REF * ((float)current_voltage_raw_pwr / (1023 * OVERSAMPLENR)) / VOLT_DIV_FAC;
|
|
float volt_pwr = VOLT_DIV_REF * ((float)current_voltage_raw_pwr / (1023 * OVERSAMPLENR)) / VOLT_DIV_FAC;
|
|
- //float volt_bed = VOLT_DIV_REF * ((float)current_voltage_raw_bed / (1023 * OVERSAMPLENR)) / VOLT_DIV_FAC;
|
|
|
|
- //fprintf_P(lcdout, PSTR(ESC_H(1,1)"PWR: %d.%01dV" ESC_H(1,2)"BED: %d.%01dV"), (int)volt_pwr, (int)(10*fabs(volt_pwr - (int)volt_pwr)), (int)volt_bed, (int)(10*fabs(volt_bed - (int)volt_bed)));
|
|
|
|
|
|
+ float volt_bed = VOLT_DIV_REF * ((float)current_voltage_raw_bed / (1023 * OVERSAMPLENR)) / VOLT_DIV_FAC;
|
|
|
|
+ fprintf_P(lcdout, PSTR(ESC_H(1,1)"PWR: %d.%01dV" ESC_H(1,2)"BED: %d.%01dV"), (int)volt_pwr, (int)(10*fabs(volt_pwr - (int)volt_pwr)), (int)volt_bed, (int)(10*fabs(volt_bed - (int)volt_bed)));
|
|
fprintf_P(lcdout, PSTR( ESC_H(1,1)"PWR: %d.%01dV"), (int)volt_pwr, (int)(10*fabs(volt_pwr - (int)volt_pwr))) ;
|
|
fprintf_P(lcdout, PSTR( ESC_H(1,1)"PWR: %d.%01dV"), (int)volt_pwr, (int)(10*fabs(volt_pwr - (int)volt_pwr))) ;
|
|
if (lcd_clicked())
|
|
if (lcd_clicked())
|
|
{
|
|
{
|
|
@@ -1712,7 +1712,7 @@ static void lcd_menu_voltages()
|
|
lcd_return_to_status();
|
|
lcd_return_to_status();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-#endif //defined(VOLT_BED_PIN) || defined(VOLT_BED_PIN)
|
|
|
|
|
|
+#endif //defined VOLT_BED_PIN || defined VOLT_PWR_PIN
|
|
|
|
|
|
#ifdef TMC2130
|
|
#ifdef TMC2130
|
|
static void lcd_menu_belt_status()
|
|
static void lcd_menu_belt_status()
|
|
@@ -1824,9 +1824,9 @@ static void lcd_support_menu()
|
|
|
|
|
|
MENU_ITEM(submenu, MSG_MENU_TEMPERATURES, lcd_menu_temperatures);
|
|
MENU_ITEM(submenu, MSG_MENU_TEMPERATURES, lcd_menu_temperatures);
|
|
|
|
|
|
-#ifdef defined(VOLT_BED_PIN) || defined(VOLT_BED_PIN)
|
|
|
|
|
|
+#if defined VOLT_BED_PIN || defined VOLT_BED_PIN
|
|
MENU_ITEM(submenu, MSG_MENU_VOLTAGES, lcd_menu_voltages);
|
|
MENU_ITEM(submenu, MSG_MENU_VOLTAGES, lcd_menu_voltages);
|
|
-#endif //defined(VOLT_BED_PIN) || defined(VOLT_BED_PIN)
|
|
|
|
|
|
+#endif //defined VOLT_BED_PIN || defined VOLT_BED_PIN
|
|
|
|
|
|
#ifdef DEBUG_BUILD
|
|
#ifdef DEBUG_BUILD
|
|
MENU_ITEM(submenu, PSTR("Debug"), lcd_menu_debug);
|
|
MENU_ITEM(submenu, PSTR("Debug"), lcd_menu_debug);
|