Add missing TERN_
This commit is contained in:
parent
cde553790e
commit
58c82d541d
3 changed files with 4 additions and 5 deletions
|
|
@ -113,7 +113,6 @@ typedef int16_t pin_t;
|
||||||
#define HAL_SERVO_LIB libServo
|
#define HAL_SERVO_LIB libServo
|
||||||
#define PAUSE_SERVO_OUTPUT() libServo::pause_all_servos()
|
#define PAUSE_SERVO_OUTPUT() libServo::pause_all_servos()
|
||||||
#define RESUME_SERVO_OUTPUT() libServo::resume_all_servos()
|
#define RESUME_SERVO_OUTPUT() libServo::resume_all_servos()
|
||||||
#define HAS_PAUSE_SERVO_OUTPUT HAS_SERVOS
|
|
||||||
|
|
||||||
// ------------------------
|
// ------------------------
|
||||||
// Public Variables
|
// Public Variables
|
||||||
|
|
|
||||||
|
|
@ -163,11 +163,11 @@ bool PersistentStore::access_finish() {
|
||||||
current_slot = EEPROM_SLOTS - 1;
|
current_slot = EEPROM_SLOTS - 1;
|
||||||
UNLOCK_FLASH();
|
UNLOCK_FLASH();
|
||||||
|
|
||||||
PAUSE_SERVO_OUTPUT();
|
TERN_(HAS_PAUSE_SERVO_OUTPUT, PAUSE_SERVO_OUTPUT());
|
||||||
DISABLE_ISRS();
|
DISABLE_ISRS();
|
||||||
status = HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError);
|
status = HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError);
|
||||||
ENABLE_ISRS();
|
ENABLE_ISRS();
|
||||||
RESUME_SERVO_OUTPUT();
|
TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT());
|
||||||
if (status != HAL_OK) {
|
if (status != HAL_OK) {
|
||||||
DEBUG_ECHOLNPAIR("HAL_FLASHEx_Erase=", status);
|
DEBUG_ECHOLNPAIR("HAL_FLASHEx_Erase=", status);
|
||||||
DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError());
|
DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError());
|
||||||
|
|
|
||||||
|
|
@ -1999,8 +1999,8 @@
|
||||||
#if NUM_SERVOS > 0
|
#if NUM_SERVOS > 0
|
||||||
#define HAS_SERVOS 1
|
#define HAS_SERVOS 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef HAS_PAUSE_SERVO_OUTPUT
|
#if HAS_SERVOS && defined(PAUSE_SERVO_OUTPUT) && defined(RESUME_SERVO_OUTPUT)
|
||||||
#define HAS_PAUSE_SERVO_OUTPUT 0
|
#define HAS_PAUSE_SERVO_OUTPUT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Sensors
|
// Sensors
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue