diff --git a/gui/dialogs/radios.xml b/gui/dialogs/radios.xml index 3b3a0b4f2..ec45cb5ed 100644 --- a/gui/dialogs/radios.xml +++ b/gui/dialogs/radios.xml @@ -26,6 +26,18 @@ } } + var updateTransponderCode = func { + var goodcode = 1; + var code = 0; + for (var i = 3; i >= 0 ; i -= 1) + { + goodcode = goodcode and (num(getprop("/instrumentation/transponder/inputs/digit[" ~ i ~ "]")) != nil) ; + code = code * 10 + (num(getprop("/instrumentation/transponder/inputs/digit[" ~ i ~ "]")) or 0); + } + setprop('/instrumentation/transponder/goodcode', goodcode); + setprop('/instrumentation/transponder/id-code', code); + } + ]]> @@ -630,6 +642,14 @@ dialog-apply Tponder-1 + + nasal + + @@ -650,6 +670,14 @@ dialog-apply Tponder-2 + + nasal + + Tponder-3 @@ -669,6 +697,14 @@ dialog-apply Tponder-3 + + nasal + + Tponder-4 @@ -688,6 +724,14 @@ dialog-apply Tponder-4 + + nasal + +