[Taranis] Curve names

[Taranis] Menu system now allows hidden rows
[Taranis] DEBUG menu removed
[stock2561] First draft!
This commit is contained in:
bsongis@gmail.com
2013-04-18 20:04:37 +00:00
parent e7a0c793bb
commit 11c1dba91e
31 changed files with 752 additions and 461 deletions
+47 -37
View File
@@ -57,6 +57,8 @@
#define EEPROM_VER 214
#elif defined(PCBGRUVIN9X)
#define EEPROM_VER 214
#elif defined(CPUM2561)
#define EEPROM_VER 214
#elif defined(CPUM128)
#define EEPROM_VER 215
#else
@@ -83,6 +85,14 @@
#define MAX_EXPOS 16
#define NUM_CSW 15 // number of custom switches
#define NUM_CFN 24 // number of functions assigned to switches
#elif defined(CPUM2561)
#define MAX_MODELS 30
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
#define MAX_PHASES 6
#define MAX_MIXERS 32
#define MAX_EXPOS 16
#define NUM_CSW 15 // number of custom switches
#define NUM_CFN 24 // number of functions assigned to switches
#elif defined(CPUM128)
#define MAX_MODELS 30
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
@@ -215,7 +225,7 @@ PACK(typedef struct t_ModuleData {
}) ModuleData;
#if defined(PCBTARANIS)
#define MODELDATA_EXTRA char bitmap[10]; uint8_t externalModule; ModuleData moduleData[NUM_MODULES]; uint8_t trainerMode;
#define MODELDATA_EXTRA char bitmap[10]; uint8_t externalModule; ModuleData moduleData[NUM_MODULES]; uint8_t trainerMode; char curveNames[MAX_CURVES][6];
#define LIMITDATA_EXTRA char name[6];
#define swstate_t uint16_t
#elif defined(PCBSKY9X)
@@ -314,17 +324,7 @@ PACK(typedef struct t_ExpoData {
char name[LEN_EXPOMIX_NAME];
int8_t curveParam;
}) ExpoData;
#elif defined(PCBSTD)
PACK(typedef struct t_ExpoData {
uint8_t mode:2; // 0=end, 1=pos, 2=neg, 3=both
int8_t swtch:6;
uint8_t chn:2;
uint8_t phases:5;
uint8_t curveMode:1;
uint8_t weight; // One spare bit here (used for GVARS)
int8_t curveParam;
}) ExpoData;
#else
#elif defined(PCBGRUVIN9X) || defined(CPUM2561)
PACK(typedef struct t_ExpoData {
uint8_t mode:2; // 0=end, 1=pos, 2=neg, 3=both
uint8_t chn:2;
@@ -335,6 +335,16 @@ PACK(typedef struct t_ExpoData {
uint8_t weight;
int8_t curveParam;
}) ExpoData;
#else
PACK(typedef struct t_ExpoData {
uint8_t mode:2; // 0=end, 1=pos, 2=neg, 3=both
int8_t swtch:6;
uint8_t chn:2;
uint8_t phases:5;
uint8_t curveMode:1;
uint8_t weight; // One spare bit here (used for GVARS)
int8_t curveParam;
}) ExpoData;
#endif
PACK(typedef struct t_LimitData {
@@ -415,28 +425,7 @@ PACK( union u_int8int16_t {
#define DELAY_MAX 15 /* 7.5 seconds */
#define SLOW_MAX 15 /* 7.5 seconds */
#if defined(PCBSTD)
PACK(typedef struct t_MixData {
uint8_t destCh:4; // 0, 1..NUM_CHNOUT
uint8_t curveMode:1; // O=curve, 1=differential
uint8_t noExpo:1;
uint8_t weightMode:1;
uint8_t offsetMode:1;
int8_t weight;
int8_t swtch:6;
uint8_t mltpx:2; // multiplex method: 0 means +=, 1 means *=, 2 means :=
uint8_t phases:5;
int8_t carryTrim:3;
uint8_t srcRaw:6;
uint8_t mixWarn:2; // mixer warning
uint8_t delayUp:4;
uint8_t delayDown:4;
uint8_t speedUp:4;
uint8_t speedDown:4;
int8_t curveParam;
int8_t offset;
}) MixData;
#else
#if defined(PCBGRUVIN9X) || defined(CPUM2561)
PACK(typedef struct t_MixData {
uint8_t destCh:4; // 0, 1..NUM_CHNOUT
uint8_t curveMode:1; // O=curve, 1=differential
@@ -458,6 +447,27 @@ PACK(typedef struct t_MixData {
int8_t curveParam;
int8_t offset;
}) MixData;
#else
PACK(typedef struct t_MixData {
uint8_t destCh:4; // 0, 1..NUM_CHNOUT
uint8_t curveMode:1; // O=curve, 1=differential
uint8_t noExpo:1;
uint8_t weightMode:1;
uint8_t offsetMode:1;
int8_t weight;
int8_t swtch:6;
uint8_t mltpx:2; // multiplex method: 0 means +=, 1 means *=, 2 means :=
uint8_t phases:5;
int8_t carryTrim:3;
uint8_t srcRaw:6;
uint8_t mixWarn:2; // mixer warning
uint8_t delayUp:4;
uint8_t delayDown:4;
uint8_t speedUp:4;
uint8_t speedDown:4;
int8_t curveParam;
int8_t offset;
}) MixData;
#endif
PACK( union u_gvarint_t {
struct {
@@ -1174,10 +1184,10 @@ enum FailsafeModes {
FAILSAFE_LAST = FAILSAFE_NOPULSES
};
#if defined(MAVLINK)
#define TELEMETRY_DATA MavlinkData mavlink;
#elif defined(FRSKY)
#if defined(FRSKY) || !defined(PCBSTD)
#define TELEMETRY_DATA FrSkyData frsky;
#elif defined(MAVLINK)
#define TELEMETRY_DATA MavlinkData mavlink;
#else
#define TELEMETRY_DATA
#endif