Issue #764 fixed
This commit is contained in:
@@ -270,6 +270,9 @@ int ConvertSource_215_to_216(int source, bool insertZero=false)
|
||||
// Virtual Inputs and Lua Outputs added
|
||||
if (source > 0)
|
||||
source += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
// PPM9-PPM16 added
|
||||
if (source > MIXSRC_FIRST_PPM+7)
|
||||
source += 8;
|
||||
// 4 GVARS added
|
||||
if (source > MIXSRC_GVAR1+4)
|
||||
source += 4;
|
||||
|
||||
@@ -2186,7 +2186,7 @@ void menuModelHeli(uint8_t event)
|
||||
uint8_t attr = (sub == i ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
switch(i) {
|
||||
case ITEM_HELI_SWASHTYPE:
|
||||
g_model.swashR.type = selectMenuItem(HELI_PARAM_OFS, y, STR_SWASHTYPE, STR_VSWASHTYPE, g_model.swashR.type, 0, SWASH_TYPE_NUM, attr, event);
|
||||
g_model.swashR.type = selectMenuItem(HELI_PARAM_OFS, y, STR_SWASHTYPE, STR_VSWASHTYPE, g_model.swashR.type, 0, SWASH_TYPE_MAX, attr, event);
|
||||
break;
|
||||
|
||||
case ITEM_HELI_COLLECTIVE:
|
||||
|
||||
+16
-1
@@ -77,6 +77,7 @@
|
||||
#define NUM_CFN 64 // number of functions assigned to switches
|
||||
#define MAX_SCRIPTS 7
|
||||
#define MAX_INPUTS 32
|
||||
#define NUM_PPM 16
|
||||
#elif defined(CPUARM)
|
||||
#define MAX_MODELS 60
|
||||
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
|
||||
@@ -85,6 +86,7 @@
|
||||
#define MAX_EXPOS 32
|
||||
#define NUM_CSW 32 // number of custom switches
|
||||
#define NUM_CFN 64 // number of functions assigned to switches
|
||||
#define NUM_PPM 16
|
||||
#elif defined(CPUM2560) || defined(CPUM2561)
|
||||
#define MAX_MODELS 30
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
@@ -93,6 +95,7 @@
|
||||
#define MAX_EXPOS 16
|
||||
#define NUM_CSW 15 // number of custom switches
|
||||
#define NUM_CFN 24 // number of functions assigned to switches
|
||||
#define NUM_PPM 8
|
||||
#elif defined(CPUM128)
|
||||
#define MAX_MODELS 30
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
@@ -101,6 +104,7 @@
|
||||
#define MAX_EXPOS 14
|
||||
#define NUM_CSW 15 // number of custom switches
|
||||
#define NUM_CFN 24 // number of functions assigned to switches
|
||||
#define NUM_PPM 8
|
||||
#else
|
||||
#define MAX_MODELS 16
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
@@ -109,9 +113,12 @@
|
||||
#define MAX_EXPOS 14
|
||||
#define NUM_CSW 12 // number of custom switches
|
||||
#define NUM_CFN 16 // number of functions assigned to switches
|
||||
#define NUM_PPM 8
|
||||
#endif
|
||||
|
||||
#define MAX_TIMERS 2
|
||||
#define NUM_CYC 3
|
||||
#define NUM_CAL_PPM 4
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
enum CurveType {
|
||||
@@ -1156,6 +1163,14 @@ PACK(typedef struct t_MavlinkData {
|
||||
}) MavlinkData;
|
||||
#endif
|
||||
|
||||
enum SwashType {
|
||||
SWASH_TYPE_120,
|
||||
SWASH_TYPE_120X,
|
||||
SWASH_TYPE_140,
|
||||
SWASH_TYPE_90,
|
||||
SWASH_TYPE_MAX = SWASH_TYPE_90
|
||||
};
|
||||
|
||||
PACK(typedef struct t_SwashRingData { // Swash Ring data
|
||||
uint8_t invertELE:1;
|
||||
uint8_t invertAIL:1;
|
||||
@@ -1427,7 +1442,7 @@ enum MixSources {
|
||||
MIXSRC_LAST_CSW = MIXSRC_FIRST_CSW+NUM_CSW-1,
|
||||
|
||||
MIXSRC_FIRST_PPM,
|
||||
MIXSRC_LAST_PPM = MIXSRC_FIRST_PPM + 7,
|
||||
MIXSRC_LAST_PPM = MIXSRC_FIRST_PPM+NUM_PPM-1,
|
||||
|
||||
MIXSRC_FIRST_CH,
|
||||
MIXSRC_CH1 = MIXSRC_FIRST_CH,
|
||||
|
||||
@@ -4875,10 +4875,10 @@ void perMain()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} //endfunc void perMain()
|
||||
}
|
||||
|
||||
int16_t g_ppmIns[8];
|
||||
uint8_t ppmInState = 0; //0=unsync 1..8= wait for value i-1
|
||||
int16_t g_ppmIns[NUM_PPM];
|
||||
uint8_t ppmInState = 0; // 0=unsync 1..8= wait for value i-1
|
||||
|
||||
#if !defined(SIMU) && !defined(CPUARM)
|
||||
|
||||
|
||||
+1
-11
@@ -622,16 +622,6 @@ enum BaseCurves {
|
||||
CURVE_BASE
|
||||
};
|
||||
|
||||
#define SWASH_TYPE_120 1
|
||||
#define SWASH_TYPE_120X 2
|
||||
#define SWASH_TYPE_140 3
|
||||
#define SWASH_TYPE_90 4
|
||||
#define SWASH_TYPE_NUM 4
|
||||
|
||||
#define NUM_CYC 3
|
||||
#define NUM_CAL_PPM 4
|
||||
#define NUM_PPM 8
|
||||
|
||||
#define THRCHK_DEADBAND 16
|
||||
|
||||
#if defined(FSPLASH) || defined(XSPLASH)
|
||||
@@ -1205,7 +1195,7 @@ extern uint8_t g_beepCnt;
|
||||
extern uint8_t g_beepVal[5];
|
||||
|
||||
extern uint8_t ppmInState; //0=unsync 1..8= wait for value i-1
|
||||
extern int16_t g_ppmIns[8];
|
||||
extern int16_t g_ppmIns[NUM_PPM];
|
||||
extern int32_t chans[NUM_CHNOUT];
|
||||
extern int16_t ex_chans[NUM_CHNOUT]; // Outputs (before LIMITS) of the last perMain
|
||||
extern int16_t channelOutputs[NUM_CHNOUT];
|
||||
|
||||
Reference in New Issue
Block a user