Fixes #1205 - Delay only applied to Play family function, with a
configurable delay, between 0 and 300ms (default is 150ms).
This commit is contained in:
+15
-11
@@ -417,7 +417,7 @@ PACK(typedef struct t_EEGeneral {
|
||||
int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||
AVR_FIELD(uint8_t blOffBright:4)
|
||||
AVR_FIELD(uint8_t blOnBright:4)
|
||||
ARM_FIELD(uint8_t switchesDelay)
|
||||
ARM_FIELD(int8_t switchesDelay)
|
||||
uint8_t lightAutoOff;
|
||||
uint8_t templateSetup; // RETA order for receiver channels
|
||||
int8_t PPM_Multiplier;
|
||||
@@ -439,6 +439,8 @@ PACK(typedef struct t_EEGeneral {
|
||||
|
||||
}) EEGeneral;
|
||||
|
||||
#define SWITCHES_DELAY() uint8_t(15+g_eeGeneral.switchesDelay)
|
||||
#define SWITCHES_DELAY_NONE (-15)
|
||||
#define HAPTIC_STRENGTH() (3+g_eeGeneral.hapticStrength)
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
@@ -839,33 +841,35 @@ enum Functions {
|
||||
FUNC_MAX
|
||||
};
|
||||
|
||||
#define HAS_ENABLE_PARAM(func) (func < FUNC_FIRST_WITHOUT_ENABLE)
|
||||
#define HAS_ENABLE_PARAM(func) ((func) < FUNC_FIRST_WITHOUT_ENABLE)
|
||||
|
||||
#if defined(VOICE)
|
||||
#define IS_PLAY_FUNC(func) ((func) >= FUNC_PLAY_SOUND && func <= FUNC_PLAY_VALUE)
|
||||
#else
|
||||
#define IS_PLAY_FUNC(func) ((func) == FUNC_PLAY_SOUND)
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define IS_PLAY_BOTH_FUNC(func) (0)
|
||||
#define IS_VOLUME_FUNC(func) (func == FUNC_VOLUME)
|
||||
#define IS_VOLUME_FUNC(func) ((func) == FUNC_VOLUME)
|
||||
#else
|
||||
#define IS_PLAY_BOTH_FUNC(func) (func == FUNC_PLAY_BOTH)
|
||||
#define IS_PLAY_BOTH_FUNC(func) ((func) == FUNC_PLAY_BOTH)
|
||||
#define IS_VOLUME_FUNC(func) (0)
|
||||
#endif
|
||||
|
||||
#if defined(GVARS)
|
||||
#define IS_ADJUST_GV_FUNC(func) (func == FUNC_ADJUST_GVAR)
|
||||
#define IS_ADJUST_GV_FUNC(func) ((func) == FUNC_ADJUST_GVAR)
|
||||
#else
|
||||
#define IS_ADJUST_GV_FUNC(func) (0)
|
||||
#endif
|
||||
|
||||
#if defined(HAPTIC)
|
||||
#define IS_HAPTIC_FUNC(func) (func == FUNC_HAPTIC)
|
||||
#define IS_HAPTIC_FUNC(func) ((func) == FUNC_HAPTIC)
|
||||
#else
|
||||
#define IS_HAPTIC_FUNC(func) (0)
|
||||
#endif
|
||||
|
||||
#if defined(VOICE)
|
||||
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || (func >= FUNC_PLAY_TRACK && func <= FUNC_PLAY_VALUE) || IS_HAPTIC_FUNC(func))
|
||||
#else
|
||||
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || IS_HAPTIC_FUNC(func))
|
||||
#endif
|
||||
#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func))
|
||||
|
||||
enum ResetFunctionParam {
|
||||
FUNC_RESET_TIMER1,
|
||||
|
||||
Reference in New Issue
Block a user