Haptic / Taranis fix
This commit is contained in:
@@ -242,8 +242,13 @@ void debugPutc(const char c);
|
|||||||
// Haptic driver
|
// Haptic driver
|
||||||
void hapticInit(void);
|
void hapticInit(void);
|
||||||
void hapticOff(void);
|
void hapticOff(void);
|
||||||
void hapticOn(uint32_t pwmPercent);
|
|
||||||
#define HAPTIC_OFF() hapticOff()
|
#define HAPTIC_OFF() hapticOff()
|
||||||
|
#if defined(REVPLUS)
|
||||||
|
void hapticOn(uint32_t pwmPercent);
|
||||||
|
#else
|
||||||
|
void hapticOn();
|
||||||
|
#define HAPTIC_ON() hapticOn()
|
||||||
|
#endif
|
||||||
|
|
||||||
extern uint8_t currentTrainerMode;
|
extern uint8_t currentTrainerMode;
|
||||||
|
|
||||||
|
|||||||
@@ -39,22 +39,25 @@
|
|||||||
void hapticOff(void)
|
void hapticOff(void)
|
||||||
{
|
{
|
||||||
#if defined(REVPLUS)
|
#if defined(REVPLUS)
|
||||||
return; //TODO PWM support
|
return; // TODO PWM support
|
||||||
#else
|
#else
|
||||||
GPIO_ResetBits(GPIO_HAPTIC, PIN_HAPTIC);
|
GPIO_ResetBits(GPIO_HAPTIC, PIN_HAPTIC);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(REVPLUS)
|
||||||
void hapticOn(uint32_t pwmPercent)
|
void hapticOn(uint32_t pwmPercent)
|
||||||
{
|
{
|
||||||
#if defined(REVPLUS)
|
|
||||||
// pwmPercent 0-100
|
// pwmPercent 0-100
|
||||||
return; //TODO PWM support
|
return; // TODO PWM support
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
void hapticOn()
|
||||||
|
{
|
||||||
// No PWM before REVPLUS
|
// No PWM before REVPLUS
|
||||||
GPIO_SetBits(GPIO_HAPTIC, PIN_HAPTIC);
|
GPIO_SetBits(GPIO_HAPTIC, PIN_HAPTIC);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void hapticInit(void)
|
void hapticInit(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user