GoFlight MFR false = 2) activeChannel = 0; updateActive(); } # map decimal digits 0..9 to standard 7-segment LCD pattern var translateDigitToSevenSegment = [0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f]; var formatFrequency = func(freqMhz) { var s = sprintf("%.3f", freqMhz); var padCount = 6 - size(s); var r = ""; while (padCount > 0) { r ~= chr(0); padCount -=1; } for (var i=0; i < size(s); i += 1) { if (s[i] == `.`) { # set the high bit to correspond to the decimal var lastIndex = size(r) - 1; r[lastIndex] = r[lastIndex] + 0x80; } else { var digitCode = s[i] - `0`; r ~= chr(translateDigitToSevenSegment[digitCode]); } } return r; } var standbyAlphanumeric = func() { return formatFrequency(standbyNode.getValue()); } var selectedAlphanumeric = func() { return formatFrequency(selectedNode.getValue()); } updateActive(0); ]]> rel-dial-0 property-adjust /input/goflight/mfr/standby-mhz 108.0 117.95 true 00 11 22 34 48 rel-dial-1 property-adjust /input/goflight/mfr/standby-mhz 0.025 108.0 117.95 true 00 11 22 34 48 3 /input/goflight/mfr/active /instrumentation/nav[0]/frequencies/selected-mhz /instrumentation/nav[1]/frequencies/selected-mhz selectedAlphanumeric 5 /input/goflight/mfr/active /instrumentation/nav[0]/frequencies/standby-mhz /instrumentation/nav[1]/frequencies/standby-mhz standbyAlphanumeric led-misc-1 1 /input/goflight/mfr/active 0 0 /input/goflight/mfr/active 0 led-misc-2 1 /input/goflight/mfr/active 1 0 /input/goflight/mfr/active 1 display-brightness /input/goflight/mfr/brightness Transfer Button button-1 property-swap /input/goflight/mfr/standby-mhz /input/goflight/mfr/selected-mhz Nav 1 Button button-2 nasal Nav 2 Button button-3 nasal