tune menu updated
This commit is contained in:
parent
9e1a61cebc
commit
b24e12143e
|
|
@ -1157,9 +1157,8 @@ void EEPROM_read_st(int pos, uint8_t* value, uint8_t size)
|
||||||
|
|
||||||
void digipot_init() //Initialize Digipot Motor Current
|
void digipot_init() //Initialize Digipot Motor Current
|
||||||
{
|
{
|
||||||
|
|
||||||
EEPROM_read_st(EEPROM_SILENT,(uint8_t*)&SilentMode,sizeof(SilentMode));
|
EEPROM_read_st(EEPROM_SILENT,(uint8_t*)&SilentMode,sizeof(SilentMode));
|
||||||
|
SilentModeMenu = SilentMode;
|
||||||
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
|
||||||
if(SilentMode == 0){
|
if(SilentMode == 0){
|
||||||
const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT_LOUD;
|
const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT_LOUD;
|
||||||
|
|
|
||||||
|
|
@ -4502,8 +4502,13 @@ static void lcd_autostart_sd()
|
||||||
|
|
||||||
|
|
||||||
static void lcd_silent_mode_set_tune() {
|
static void lcd_silent_mode_set_tune() {
|
||||||
SilentModeMenu = !SilentModeMenu;
|
switch (SilentModeMenu) {
|
||||||
eeprom_update_byte((unsigned char*)EEPROM_SILENT, SilentModeMenu);
|
case 0: SilentModeMenu = 1; break;
|
||||||
|
case 1: SilentModeMenu = 2; break;
|
||||||
|
case 2: SilentModeMenu = 0; break;
|
||||||
|
default: SilentModeMenu = 0; break;
|
||||||
|
}
|
||||||
|
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
||||||
digipot_init();
|
digipot_init();
|
||||||
lcd_goto_menu(lcd_tune_menu, 9);
|
lcd_goto_menu(lcd_tune_menu, 9);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue