Issue 19 solved
Revert the last Haptic changes (was unfinished, no more spare time during the week-end, sorry!) Revert my last modification on main views (offset not displayed in Bar Graphs, I was wrong) PPM Center now configurable for each servo No mean on the Batt voltage when in the calibration menu to have a faster response when calibrating SD card Backup / Restore Models feature started Some french translations fixed
This commit is contained in:
+21
-3
@@ -34,6 +34,12 @@
|
||||
#ifndef audio_h
|
||||
#define audio_h
|
||||
|
||||
//#define ISER9X //enable this define for er9x. comment out for open9x
|
||||
|
||||
#if defined(ISER9X)
|
||||
#define HAPTIC
|
||||
#define PCBSTD
|
||||
#endif
|
||||
|
||||
#if defined(PCBARM)
|
||||
#include "ersky9x/sound.h"
|
||||
@@ -87,6 +93,11 @@ enum AUDIO_SOUNDS {
|
||||
AU_FRSKY_ALARMC,
|
||||
AU_FRSKY_RATATA,
|
||||
AU_FRSKY_TICK,
|
||||
#ifdef HAPTIC
|
||||
AU_FRSKY_HAPTIC1,
|
||||
AU_FRSKY_HAPTIC2,
|
||||
AU_FRSKY_HAPTIC3,
|
||||
#endif
|
||||
AU_FRSKY_LAST,
|
||||
};
|
||||
|
||||
@@ -98,9 +109,9 @@ class audioQueue
|
||||
|
||||
// only difference between these two functions is that one does the
|
||||
// interupt queue (Now) and the other queues for playing ASAP.
|
||||
void playNow(uint8_t tFreq, uint8_t tLen, uint8_t tPause, uint8_t tRepeat=0, int8_t tFreqIncr=0);
|
||||
void playNow(uint8_t tFreq, uint8_t tLen, uint8_t tPause, uint8_t tRepeat=0, uint8_t tHaptic=0, int8_t tFreqIncr=0);
|
||||
|
||||
void playASAP(uint8_t tFreq, uint8_t tLen, uint8_t tPause, uint8_t tRepeat=0, int8_t tFreqIncr=0);
|
||||
void playASAP(uint8_t tFreq, uint8_t tLen, uint8_t tPause, uint8_t tRepeat=0, uint8_t tHaptic=0, int8_t tFreqIncr=0);
|
||||
|
||||
inline bool busy() { return (toneTimeLeft > 0); }
|
||||
|
||||
@@ -173,7 +184,12 @@ class audioQueue
|
||||
uint8_t queueTonePause[AUDIO_QUEUE_LENGTH];
|
||||
uint8_t queueToneRepeat[AUDIO_QUEUE_LENGTH];
|
||||
|
||||
|
||||
#ifdef HAPTIC
|
||||
uint8_t toneHaptic;
|
||||
uint8_t hapticTick;
|
||||
uint8_t queueToneHaptic[AUDIO_QUEUE_LENGTH];
|
||||
uint8_t hapticSpinUpTime;
|
||||
#endif
|
||||
|
||||
#if defined(PCBSTD)
|
||||
uint8_t toneCounter;
|
||||
@@ -185,6 +201,8 @@ extern audioQueue audio;
|
||||
|
||||
void audioDefevent(uint8_t e);
|
||||
|
||||
#define HAPTIC_SPINUP (10);
|
||||
|
||||
#define AUDIO_KEYPAD_UP() audioDefevent(AU_KEYPAD_UP)
|
||||
#define AUDIO_KEYPAD_DOWN() audioDefevent(AU_KEYPAD_DOWN)
|
||||
#define AUDIO_MENUS() audioDefevent(AU_MENUS)
|
||||
|
||||
Reference in New Issue
Block a user