feat(cpn): visual and audible feedback for haptic in simulator (#7322)
This commit is contained in:
@@ -22,6 +22,11 @@
|
||||
#include "edgetx.h"
|
||||
#include "haptic.h"
|
||||
|
||||
#if defined(SIMU)
|
||||
#include <stdint.h>
|
||||
extern uint32_t simuHapticValue;
|
||||
#endif
|
||||
|
||||
hapticQueue::hapticQueue()
|
||||
{
|
||||
buzzTimeLeft = 0;
|
||||
@@ -96,6 +101,10 @@ void hapticQueue::play(uint8_t tLen, uint8_t tPause, uint8_t tFlags)
|
||||
void hapticQueue::event(uint8_t e)
|
||||
{
|
||||
if (g_eeGeneral.hapticMode >= e_mode_nokeys || (g_eeGeneral.hapticMode >= e_mode_alarms && e <= AU_ERROR)) {
|
||||
#if defined(SIMU)
|
||||
simuHapticValue++;
|
||||
return;
|
||||
#endif
|
||||
if (e <= AU_ERROR)
|
||||
play(15, 3, PLAY_NOW);
|
||||
else if (e <= AU_MIX_WARNING_3)
|
||||
|
||||
Reference in New Issue
Block a user