November 2, 201213 yr Hello all, When i enter 125125 as comm freq i get 125.130 as a result. When i enter 125122 as comm freq i get 125.125 a result. 125127 gives 125.130 as result. Here's the code (L:DataEntry, number) 1000 / 100 * near 10000 % d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (> K:COM_RADIO_SET) How can i get this code right to show the freq i enter e.g. 125125 should result in 125.125 and 126126 should result in 126.126 Hope someone can help me out! Greetings Slammer
November 2, 201213 yr Hi, Test this and you wil see what COM frequencies come up. It is not what one expect, but that has to do with "bandwidth"? <Macro Name="BCD">100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + </Macro> <Element> <Position X="52" Y="685"/> <FormattedText X="58" Y="15" Bright="Yes" FontSize="14" Font="Quartz" Color="%('silver' 'gray' (A:CIRCUIT AVIONICS ON,bool) ?)" Adjust="Center" VerticalAdjust="Center"> <String>\{bo}%((A:Com1 active frequency,MHz))%!7.3f!</String> </FormattedText> </Element> <Element> <Position X="52" Y="715"/> <FormattedText X="58" Y="15" Bright="Yes" FontSize="14" Font="Quartz" Color="%('silver' 'gray' (A:CIRCUIT AVIONICS ON,bool) ?)" Adjust="Center" VerticalAdjust="Center"> <String>\{bo}%((L:com frequency,number))%!7.3f!</String> </FormattedText> </Element> <Area Left="50" Right="225" Top="705" Bottom="725"> <Tooltip>COM TEST, %((L:com frequency,number))%!7.3f!</Tooltip> <Cursor Type="Hand"/> <Click Kind="LeftSingle+RightSingle" Repeat="Yes"> (M:Event) 'LeftSingle' scmp 0 == if{ (L:com whole,number) 1 - 118 max (>L:com whole,number) (L:com whole,number) (L:com fract,number) + (>L:com frequency,number) (L:com frequency,number) @BCD (>K:COM_RADIO_SET) } (M:Event) 'RightSingle' scmp 0 == if{ (L:com whole,number) 1 + 136 min (>L:com whole,number) (L:com whole,number) (L:com fract,number) + (>L:com frequency,number) (L:com frequency,number) @BCD (>K:COM_RADIO_SET) } </Click> </Area> <Area Left="50" Right="225" Top="726" Bottom="755"> <Tooltip>COM TEST, %((L:com frequency,number))%!7.3f!</Tooltip> <Cursor Type="Hand"/> <Click Kind="LeftSingle+RightSingle" Repeat="Yes"> (M:Event) 'LeftSingle' scmp 0 == if{ (L:com fract,number) 0.001 - 0 max (>L:com fract,number) (L:com whole,number) (L:com fract,number) + (>L:com frequency,number) (L:com frequency,number) @BCD (>K:COM_RADIO_SET) } (M:Event) 'RightSingle' scmp 0 == if{ (L:com fract,number) 0.001 + 0.999 min (>L:com fract,number) (L:com whole,number) (L:com fract,number) + (>L:com frequency,number) (L:com frequency,number) @BCD (>K:COM_RADIO_SET) } </Click> </Area> If you want to see e.g. 121.121 in the display, you will have to use the L:Var., but that stands for a different com. freq. (125.125) May the @BCD is the problem. Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment