1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 19:40:20 +03:00

[simu][horus] Replace 2nd knob/pot with functional 6-pos switch (must be calibrated). (#4554)

This commit is contained in:
Max Paperno 2017-03-05 02:48:10 -05:00 committed by Bertrand Songis
parent c1da4b9b4f
commit 45cfcd67ff

View file

@ -117,8 +117,17 @@ Open9xSim::Open9xSim(FXApp* a):
for(int i=0; i<NUM_POTS+NUM_SLIDERS; i++){
knobs[i]= new FXKnob(hf11,NULL,0,KNOB_TICKS|LAYOUT_LEFT);
knobs[i]->setRange(-1024, 1024);
knobs[i]->setValue(0);
#if defined(PCBHORUS)
if (i == 1) { // 6-pos switch
knobs[i]->setRange(0, 2048);
knobs[i]->setIncrement(2048 / 5);
knobs[i]->setTickDelta(2048 / 5);
continue;
}
#endif
knobs[i]->setRange(-1024, 1024);
}
bmf = new FXImageFrame(this,bmp);