1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00
This commit is contained in:
bsongis 2014-04-28 13:01:28 +02:00
parent bb75538070
commit b56bcff576
2 changed files with 18 additions and 4 deletions

View file

@ -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 {

View file

@ -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;