Merge pull request #1015 from opentx/kilrah/haptic

Haptic for Taranis
This commit is contained in:
Bertrand Songis
2014-04-29 07:16:04 +02:00
13 changed files with 124 additions and 28 deletions
@@ -52,6 +52,7 @@
#define LUA
#define LUA_MODEL_SCRIPTS
#define EEPROM_VARIANT 3
#define HAPTIC
#define NUM_POTS 5
@@ -99,6 +100,8 @@ inline int geteepromsize() {
#include "radio/src/targets/taranis/keys_driver.cpp"
#include "radio/src/keys.cpp"
#include "radio/src/bmp.cpp"
#include "radio/src/haptic.cpp"
#include "radio/src/targets/taranis/haptic_driver.cpp"
// TODO Because FatFS in not C++ there cannot be namespaces there and the functions are defined several times!
#undef SDCARD
#include "radio/src/simpgmspace.cpp"
@@ -559,10 +559,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case SoundPitch:
return 1;
case Haptic:
if (IS_TARANIS(board))
return 0;
else
return 1;
return 1;
case ModelTrainerEnable:
if (IS_TARANIS(board))
return 1;
@@ -573,10 +570,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
return 1;
case HapticLength:
case HapticMode:
if (IS_TARANIS(board))
return 0;
else
return 1;
return 1;
case Beeperlen:
return 1;
case MaxVolume:
@@ -1219,6 +1213,7 @@ void registerOpenTxFirmwares()
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
openTx->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
openTx->addOption("haptic", QObject::tr("Haptic module installed"));
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
openTx->addOptions(fai_options);
@@ -1229,6 +1224,7 @@ void registerOpenTxFirmwares()
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
openTx->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
openTx->addOption("haptic", QObject::tr("Haptic module installed"));
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
openTx->addOptions(fai_options);