Only write position to physical EEPROM when move finishes
This commit is contained in:
parent
ef05df7eb9
commit
40e27eeb22
2 changed files with 8 additions and 0 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#define WIRING_PWM_LEDS {}
|
||||
#define SUPPORT_EEPROM
|
||||
#define STAGE_MAX_MOTORS 3
|
||||
#define EEPROM_IS_REAL
|
||||
#elif defined(BOARD_SANGABOARDv2)
|
||||
#define BOARD_STRING "Sangaboard v0.2"
|
||||
#define WIRING_MOTOR_X 13, 12, 11, 10
|
||||
|
|
@ -47,6 +48,7 @@
|
|||
#define WIRING_PWM_LEDS {}
|
||||
#define SUPPORT_EEPROM
|
||||
#define STAGE_MAX_MOTORS 3
|
||||
#define EEPROM_IS_REAL
|
||||
#elif defined(BOARD_CUSTOM_BLUEPILL)
|
||||
#define BOARD_STRING "Custom Bluepill board"
|
||||
#define WIRING_MOTOR_X PB11, PB10, PB1, PB0
|
||||
|
|
|
|||
|
|
@ -194,7 +194,13 @@ void stage_loop()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef EEPROM_IS_REAL
|
||||
EEPROM.put(0, current_pos); // ensure our position is held in EEPROM so it persists
|
||||
#else
|
||||
if (!stage_moving)
|
||||
EEPROM.put(0, current_pos); // ensure our position is held in EEPROM so it persists
|
||||
#endif
|
||||
|
||||
if (!stage_moving && notify_on_stop)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue