|
|
|
@ -605,24 +605,22 @@ void Dexed::setPBController(uint8_t pb_range, uint8_t pb_step) |
|
|
|
|
Serial.println(F("Dexed::setPBController")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
pb_range %= PB_RANGE_MAX; |
|
|
|
|
pb_step %= PB_STEP_MAX; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("pb_range=")); |
|
|
|
|
Serial.println(pb_range, DEC); |
|
|
|
|
Serial.print(F("pb_step=")); |
|
|
|
|
Serial.println(pb_step, DEC); |
|
|
|
|
#endif |
|
|
|
|
*/ |
|
|
|
|
pb_range = constrain(pb_range, PB_RANGE_MIN, PB_RANGE_MAX); |
|
|
|
|
pb_step = constrain(pb_step, PB_STEP_MIN, PB_STEP_MAX); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("pb_range=")); |
|
|
|
|
Serial.println(pb_range, DEC); |
|
|
|
|
Serial.print(F("pb_step=")); |
|
|
|
|
Serial.println(pb_step, DEC); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_RANGE] = pb_range; |
|
|
|
|
controllers.values_[kControllerPitchRange] = pb_range; |
|
|
|
|
data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_PITCHBEND_STEP] = pb_step; |
|
|
|
|
controllers.values_[kControllerPitchStep] = pb_step; |
|
|
|
|
|
|
|
|
|
controllers.refresh(); |
|
|
|
|
//controllers.refresh();
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Dexed::setMWController(uint8_t mw_range, uint8_t mw_assign) |
|
|
|
@ -631,17 +629,15 @@ void Dexed::setMWController(uint8_t mw_range, uint8_t mw_assign) |
|
|
|
|
Serial.println(F("Dexed::setMWController")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
mw_range %= MW_RANGE_MAX; |
|
|
|
|
mw_assign %= MW_ASSIGN_MAX; |
|
|
|
|
mw_range = constrain(mw_range, MW_RANGE_MIN, MW_RANGE_MAX); |
|
|
|
|
mw_assign = constrain(mw_assign, MW_ASSIGN_MIN, MW_ASSIGN_MAX); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("mw_range=")); |
|
|
|
|
Serial.println(mw_range, DEC); |
|
|
|
|
Serial.print(F("mw_assign=")); |
|
|
|
|
Serial.println(mw_assign, DEC); |
|
|
|
|
#endif |
|
|
|
|
*/ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("mw_range=")); |
|
|
|
|
Serial.println(mw_range, DEC); |
|
|
|
|
Serial.print(F("mw_assign=")); |
|
|
|
|
Serial.println(mw_assign, DEC); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_MODWHEEL_RANGE] = mw_range; |
|
|
|
|
controllers.wheel.setRange(mw_range); |
|
|
|
@ -657,17 +653,15 @@ void Dexed::setFCController(uint8_t fc_range, uint8_t fc_assign) |
|
|
|
|
Serial.println(F("Dexed::setFCController")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
fc_range %= FC_RANGE_MAX; |
|
|
|
|
fc_assign %= FC_ASSIGN_MAX; |
|
|
|
|
fc_range = constrain(fc_range, FC_RANGE_MIN, FC_RANGE_MAX); |
|
|
|
|
fc_assign = constrain(fc_assign, FC_ASSIGN_MIN, FC_ASSIGN_MAX); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("fc_range=")); |
|
|
|
|
Serial.println(fc_range, DEC); |
|
|
|
|
Serial.print(F("fc_assign=")); |
|
|
|
|
Serial.println(fc_assign, DEC); |
|
|
|
|
#endif |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_FOOTCTRL_RANGE] = fc_range; |
|
|
|
|
controllers.foot.setRange(fc_range); |
|
|
|
@ -683,17 +677,15 @@ void Dexed::setBCController(uint8_t bc_range, uint8_t bc_assign) |
|
|
|
|
Serial.println(F("Dexed::setBCController")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
bc_range %= BC_RANGE_MAX; |
|
|
|
|
bc_assign %= BC_ASSIGN_MAX; |
|
|
|
|
bc_range = constrain(bc_range, BC_RANGE_MIN, BC_RANGE_MAX); |
|
|
|
|
bc_assign = constrain(bc_assign, BC_ASSIGN_MIN, BC_ASSIGN_MAX); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("bc_range=")); |
|
|
|
|
Serial.println(bc_range, DEC); |
|
|
|
|
Serial.print(F("bc_assign=")); |
|
|
|
|
Serial.println(bc_assign, DEC); |
|
|
|
|
#endif |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_BREATHCTRL_RANGE] = bc_range; |
|
|
|
|
controllers.breath.setRange(bc_range); |
|
|
|
@ -709,17 +701,15 @@ void Dexed::setATController(uint8_t at_range, uint8_t at_assign) |
|
|
|
|
Serial.println(F("Dexed::setATController")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
at_range %= AT_RANGE_MAX; |
|
|
|
|
at_assign %= AT_ASSIGN_MAX; |
|
|
|
|
at_range = constrain(at_range, AT_RANGE_MIN, AT_RANGE_MAX); |
|
|
|
|
at_assign = constrain(at_assign, AT_ASSIGN_MIN, AT_ASSIGN_MAX); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("at_range=")); |
|
|
|
|
Serial.println(at_range, DEC); |
|
|
|
|
Serial.print(F("at_assign=")); |
|
|
|
|
Serial.println(at_assign, DEC); |
|
|
|
|
#endif |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
data[DEXED_GLOBAL_PARAMETER_OFFSET + DEXED_AT_RANGE] = at_range; |
|
|
|
|
controllers.at.setRange(at_range); |
|
|
|
|