Merge branch 'nano-eeprom-fix' into 'master'
Nano eeprom fix Closes #9 See merge request filipayazi/sangaboard-firmware!6
This commit is contained in:
commit
78a2130cd6
2 changed files with 8 additions and 0 deletions
|
|
@ -33,6 +33,7 @@
|
||||||
#define WIRING_PWM_LEDS {}
|
#define WIRING_PWM_LEDS {}
|
||||||
#define SUPPORT_EEPROM
|
#define SUPPORT_EEPROM
|
||||||
#define STAGE_MAX_MOTORS 3
|
#define STAGE_MAX_MOTORS 3
|
||||||
|
#define EEPROM_IS_REAL
|
||||||
#elif defined(BOARD_SANGABOARDv2)
|
#elif defined(BOARD_SANGABOARDv2)
|
||||||
#define BOARD_STRING "Sangaboard v0.2"
|
#define BOARD_STRING "Sangaboard v0.2"
|
||||||
#define WIRING_MOTOR_X 13, 12, 11, 10
|
#define WIRING_MOTOR_X 13, 12, 11, 10
|
||||||
|
|
@ -47,6 +48,7 @@
|
||||||
#define WIRING_PWM_LEDS {}
|
#define WIRING_PWM_LEDS {}
|
||||||
#define SUPPORT_EEPROM
|
#define SUPPORT_EEPROM
|
||||||
#define STAGE_MAX_MOTORS 3
|
#define STAGE_MAX_MOTORS 3
|
||||||
|
#define EEPROM_IS_REAL
|
||||||
#elif defined(BOARD_CUSTOM_BLUEPILL)
|
#elif defined(BOARD_CUSTOM_BLUEPILL)
|
||||||
#define BOARD_STRING "Custom Bluepill board"
|
#define BOARD_STRING "Custom Bluepill board"
|
||||||
#define WIRING_MOTOR_X PB11, PB10, PB1, PB0
|
#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
|
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)
|
if (!stage_moving && notify_on_stop)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue