Issue #713 - 64 custom functions instead of 32. 8chars only filenames in
PlayTrack function
This commit is contained in:
@@ -74,7 +74,7 @@ const uint8_t modn12x3[4][4]= {
|
||||
#define C9X_MAX_ENCODERS 2
|
||||
#define C9X_NUM_CHNOUT 32 // number of real output channels
|
||||
#define C9X_NUM_CSW 32 // number of custom switches
|
||||
#define C9X_MAX_CUSTOM_FUNCTIONS 32 // number of functions assigned to switches
|
||||
#define C9X_MAX_CUSTOM_FUNCTIONS 64 // number of functions assigned to switches
|
||||
#define C9X_NUM_MODULES 2
|
||||
|
||||
#define STK_RUD 1
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16)
|
||||
#define MAX_EXPOS(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 64 : 32) : (IS_DBLRAM(board, version) ? 16 : 14))
|
||||
#define MAX_CUSTOM_SWITCHES(board, version) (IS_ARM(board) ? 32 : (IS_DBLEEPROM(board, version) ? 15 : 12))
|
||||
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? 32 : (IS_DBLEEPROM(board, version) ? 24 : 16))
|
||||
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? (version >= 216 ? 64 : 32) : (IS_DBLEEPROM(board, version) ? 24 : 16))
|
||||
#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : O9X_MAX_CURVES)
|
||||
#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5)
|
||||
|
||||
@@ -1424,7 +1424,9 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
internalField.Append(new SwitchField<8>(fn.swtch, board, version));
|
||||
internalField.Append(new ConversionField< UnsignedField<8> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function")));
|
||||
|
||||
if (IS_TARANIS(board))
|
||||
if (IS_TARANIS(board) && version >= 216)
|
||||
internalField.Append(new CharField<8>(_param, false));
|
||||
else if (IS_TARANIS(board))
|
||||
internalField.Append(new CharField<10>(_param, false));
|
||||
else
|
||||
internalField.Append(new CharField<6>(_param, false));
|
||||
|
||||
@@ -521,7 +521,7 @@ int Open9xInterface::getCapability(const Capability capability)
|
||||
return (IS_TARANIS(board) ? 22 : 9);
|
||||
case CustomFunctions:
|
||||
if (IS_ARM(board))
|
||||
return 32;
|
||||
return 64;
|
||||
else if (board==BOARD_GRUVIN9X||board==BOARD_M128)
|
||||
return 24;
|
||||
else
|
||||
@@ -554,7 +554,7 @@ int Open9xInterface::getCapability(const Capability capability)
|
||||
case VoicesAsNumbers:
|
||||
return (IS_ARM(board) ? 0 : 1);
|
||||
case VoicesMaxLength:
|
||||
return (IS_ARM(board) ? (IS_TARANIS(board) ? 10 : 6) : 0);
|
||||
return (IS_ARM(board) ? (IS_TARANIS(board) ? 8 : 6) : 0);
|
||||
case MultiLangVoice:
|
||||
return (IS_ARM(board) ? 1 : 0);
|
||||
case SoundPitch:
|
||||
|
||||
@@ -144,7 +144,7 @@ PACK(typedef struct {
|
||||
int8_t swtch;
|
||||
uint8_t func;
|
||||
PACK(union {
|
||||
char name[LEN_CFN_NAME];
|
||||
char name[10];
|
||||
struct {
|
||||
int16_t val;
|
||||
int16_t ext1;
|
||||
@@ -193,7 +193,7 @@ PACK(typedef struct {
|
||||
int8_t points[NUM_POINTS];
|
||||
|
||||
LogicalSwitchData_v215 customSw[NUM_CSW];
|
||||
CustomFnData_v215 funcSw[NUM_CFN];
|
||||
CustomFnData_v215 funcSw[32];
|
||||
SwashRingData swashR;
|
||||
PhaseData_v215 phaseData[MAX_PHASES];
|
||||
|
||||
@@ -575,7 +575,7 @@ void ConvertModel_215_to_216(ModelData &model)
|
||||
}
|
||||
|
||||
if (fn.func == FUNC_PLAY_TRACK || fn.func == FUNC_BACKGND_MUSIC) {
|
||||
memcpy(fn.play.name, oldModel.funcSw[i].param.name, LEN_CFN_NAME);
|
||||
memcpy(fn.play.name, oldModel.funcSw[i].param.name, 8);
|
||||
}
|
||||
else {
|
||||
fn.all.val = oldModel.funcSw[i].param.composite.val;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
#define MAX_MIXERS 64
|
||||
#define MAX_EXPOS 64
|
||||
#define NUM_CSW 32 // number of custom switches
|
||||
#define NUM_CFN 32 // number of functions assigned to switches
|
||||
#define NUM_CFN 64 // number of functions assigned to switches
|
||||
#define MAX_SCRIPTS 3
|
||||
#define MAX_INPUTS 32
|
||||
#elif defined(CPUARM)
|
||||
@@ -84,7 +84,7 @@
|
||||
#define MAX_MIXERS 64
|
||||
#define MAX_EXPOS 32
|
||||
#define NUM_CSW 32 // number of custom switches
|
||||
#define NUM_CFN 32 // number of functions assigned to switches
|
||||
#define NUM_CFN 64 // number of functions assigned to switches
|
||||
#elif defined(CPUM2560) || defined(CPUM2561)
|
||||
#define MAX_MODELS 30
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
@@ -806,7 +806,7 @@ enum AdjustGvarFunctionParam {
|
||||
|
||||
#if defined(CPUARM)
|
||||
#if defined(PCBTARANIS)
|
||||
#define LEN_CFN_NAME 10
|
||||
#define LEN_CFN_NAME 8
|
||||
#else
|
||||
#define LEN_CFN_NAME 6
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user