refactor(cpn): Support JSON radio hardware definitions (#4406)
This commit is contained in:
@@ -252,18 +252,9 @@ void OpenTxSimulator::setInputValue(int type, uint8_t index, int16_t value)
|
||||
switch (type) {
|
||||
case INPUT_SRC_ANALOG :
|
||||
case INPUT_SRC_STICK :
|
||||
setAnalogValue(index, value);
|
||||
break;
|
||||
case INPUT_SRC_KNOB :
|
||||
setAnalogValue(index + adcGetInputOffset(ADC_INPUT_FLEX), value);
|
||||
break;
|
||||
case INPUT_SRC_SLIDER :
|
||||
// TODO redo this when Companion refactored to use radio json adc files
|
||||
//setAnalogValue(index + adcGetInputOffset(ADC_INPUT_FLEX), value);
|
||||
static const int slideroffset = adcGetInputIdx("SL1", 3);
|
||||
//qDebug() << "SL1:" << slideroffset;
|
||||
if (slideroffset >= 0)
|
||||
setAnalogValue(index + slideroffset, value);
|
||||
setAnalogValue(index, value);
|
||||
break;
|
||||
case INPUT_SRC_TXVIN :
|
||||
if (adcGetMaxInputs(ADC_INPUT_VBAT) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user