mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 14:25:11 +03:00
Fixes #1007
This commit is contained in:
parent
bb75538070
commit
b56bcff576
2 changed files with 18 additions and 4 deletions
|
@ -826,10 +826,16 @@ enum Functions {
|
|||
#define IS_ADJUST_GV_FUNC(func) (0)
|
||||
#endif
|
||||
|
||||
#if defined(VOICE)
|
||||
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || (func >= FUNC_PLAY_TRACK && func <= FUNC_PLAY_VALUE))
|
||||
#if defined(HAPTIC)
|
||||
#define IS_HAPTIC_FUNC(func) (func == FUNC_HAPTIC)
|
||||
#else
|
||||
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND)
|
||||
#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
|
||||
|
||||
enum ResetFunctionParam {
|
||||
|
|
|
@ -3564,6 +3564,9 @@ void evalFunctions()
|
|||
case FUNC_PLAY_SOUND:
|
||||
case FUNC_PLAY_TRACK:
|
||||
case FUNC_PLAY_VALUE:
|
||||
#if defined(HAPTIC)
|
||||
case FUNC_HAPTIC:
|
||||
#endif
|
||||
{
|
||||
tmr10ms_t tmr10ms = get_tmr10ms();
|
||||
uint8_t repeatParam = CFN_PLAY_REPEAT(sd);
|
||||
|
@ -3578,6 +3581,11 @@ void evalFunctions()
|
|||
else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) {
|
||||
PLAY_VALUE(CFN_PARAM(sd), i+1);
|
||||
}
|
||||
#if defined(HAPTIC)
|
||||
else if (CFN_FUNC(sd) == FUNC_HAPTIC) {
|
||||
haptic.event(AU_FRSKY_LAST+CFN_PARAM(sd));
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
playCustomFunctionFile(sd, i+1);
|
||||
}
|
||||
|
@ -3643,7 +3651,7 @@ void evalFunctions()
|
|||
break;
|
||||
#endif
|
||||
|
||||
#if defined(HAPTIC)
|
||||
#if defined(HAPTIC) && !defined(CPUARM)
|
||||
case FUNC_HAPTIC:
|
||||
haptic.event(AU_FRSKY_LAST+CFN_PARAM(sd));
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue