Set default SuperPINDA toggle on MK2.5/S to NO

This commit is contained in:
3d-gussner 2020-12-08 18:39:54 +01:00
parent 4b510fef0a
commit 76eb743139
2 changed files with 7 additions and 3 deletions

View File

@ -93,6 +93,10 @@ void eeprom_init()
eeprom_switch_to_next_sheet(); eeprom_switch_to_next_sheet();
} }
check_babystep(); check_babystep();
#ifdef PINDA_TEMP_COMP
if (eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION) == 0xff) eeprom_update_byte((uint8_t *)EEPROM_PINDA_TEMP_COMPENSATION, 0);
#endif //PINDA_TEMP_COMP
} }
//! @brief Get default sheet name for index //! @brief Get default sheet name for index

View File

@ -5759,7 +5759,7 @@ void lcd_hw_setup_menu(void) // can not be "static"
//! as a disconnected SuperPINDA will show higher temps compared to an EINSY board. //! as a disconnected SuperPINDA will show higher temps compared to an EINSY board.
//! //!
//! This menu allows the user to en-/disable the SuperPINDA manualy //! This menu allows the user to en-/disable the SuperPINDA manualy
MENU_ITEM_TOGGLE_P(_N("SuperPINDA"), eeprom_read_byte((unsigned char *)EEPROM_PINDA_TEMP_COMPENSATION) ? _T(MSG_YES) : _T(MSG_NO), lcd_pinda_temp_compensation_toggle); MENU_ITEM_TOGGLE_P(_N("SuperPINDA"), eeprom_read_byte((uint8_t *)EEPROM_PINDA_TEMP_COMPENSATION) ? _T(MSG_YES) : _T(MSG_NO), lcd_pinda_temp_compensation_toggle);
#endif //PINDA_TEMP_COMP #endif //PINDA_TEMP_COMP
MENU_END(); MENU_END();
@ -9249,8 +9249,8 @@ void lcd_experimental_menu()
void lcd_pinda_temp_compensation_toggle() void lcd_pinda_temp_compensation_toggle()
{ {
uint8_t pinda_temp_compensation = eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION); uint8_t pinda_temp_compensation = eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION);
if (pinda_temp_compensation == EEPROM_EMPTY_VALUE) if (pinda_temp_compensation == EEPROM_EMPTY_VALUE) // On MK2.5/S the EEPROM_EMPTY_VALUE will be set to 0 during eeprom_init.
pinda_temp_compensation = 1; pinda_temp_compensation = 1; // But for MK3/S it should be 1 so SuperPINDA is "active"
else else
pinda_temp_compensation = !pinda_temp_compensation; pinda_temp_compensation = !pinda_temp_compensation;
eeprom_update_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION, pinda_temp_compensation); eeprom_update_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION, pinda_temp_compensation);