If someone would be so kind as to commit this, I think it will come in handy in more cases than just the ch53e. It seems that many military TACAN sets adjust the channel as one big number, and not by the individual digits. This will allow that with a single Nasal call.
Josh 359a363,386 > ## > # TACAN utility functions > # > tacanChan1 = ''; > tacanChan2 = ''; > tacanChan3 = ''; > tacanInit = func { > tacanChan1 = props.globals.getNode('/instrumentation/tacan/frequencies/selected-channel[1]', 1); > tacanChan2 = props.globals.getNode('/instrumentation/tacan/frequencies/selected-channel[2]', 1); > tacanChan3 = props.globals.getNode('/instrumentation/tacan/frequencies/selected-channel[3]', 1); > } > settimer(tacanInit, 0); > adjustTacanChannel = func(increment) { > tacanChannel = tacanChan1.getValue() * 100 + tacanChan2.getValue() * 10 + tacanChan3.getValue(); > # business part > tacanChannel += increment; > if (tacanChannel > 126) {tacanChannel = 126;} > if (tacanChannel < 0) {tacanChannel = 0;} > # convert back > tacanChannel = sprintf("%03.3d", tacanChannel); > tacanChan1.setValue(chr(tacanChannel[0])); > tacanChan2.setValue(chr(tacanChannel[1])); > tacanChan3.setValue(chr(tacanChannel[2])); > } _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel