January 21, 20188 yr I'm trying to make the radio stack tune in 1 KHz increments, but I have failed. I tried changing the 5 to a 1 thinking that was it in this line. <Macro Name="C1Set">(G:Var8) 6 == (G:Var3) 10 == && if{ (G:Var5) 4096 * (G:Var4) 256 * + (G:Var2) 16 * + (G:Var1) 2 * 10 / flr 5 * + (>K:COM_STBY_RADIO_SET) @CLEAR }</Macro> Here is the radiostack code. Anyone know how to do this? https://app.box.com/s/bqfct0p9qy1j2xdr94pkgqmd7cdxs5vt Bryan Ludwig
January 21, 20188 yr I'm not familiar with the radio stack coding, however if you want to pass the unrounded frequency to K:COM_STBY_RADIO_SET then you should remove the " 2 * 10 / flr 5 * " bit
January 21, 20188 yr Hmm, don't remember if FS even supports a 1Khz inc/dec. IIRC it doesn't, maybe only 8.33 kHz spaced channels. In any case by using the WIKI examples below you could test it out. This small test should prove it. <Click>(A:COM1 STANDBY FREQUENCY, Mhz) 0.001 + 0.00001 + (>L:COM1_STBY_Freq, Mhz) (L:COM1_STBY_Freq, Frequency BCD16) (>K:COM_STBY_RADIO_SET)</Click> <String>%((A:COM1 STANDBY FREQUENCY, Mhz))%!6.3f!% Mhz</String> The bottom example in this FSDev WIKI page will do the trick for you, much easier than calculating, or using a macro to calculate, the binary coded decimal. For ADF's use this FSDev WIKI page. Let FS do the conversions for you! BTW - This topic should have, or any future ones with the same subject should be posted in the AVSIM's MSFS Aircraft and Panel Design Forum. Have fun, good luck! FS RTWR SHRS F-111 JoinFS Little Navmap
January 22, 20188 yr Author I don't know where in the XML file I need to add that code. I don't know XML. Bryan Ludwig
January 22, 20188 yr This might get you in the right direction //--------------------COM------------------------------- <Element> <Position X="0" Y="0"/> <MaskImage Name="COM_NAV_MASK.bmp" ImageSizes="252,150"> <Axis X="50" Y="24"/> </MaskImage> <Image Name="NUMBER_ROLL_6.bmp" ImageSizes="11,153" Luminous="1"> <Axis X="0" Y="139"/> </Image> <Shift> <Value>(A:COM1 ACTIVE FREQUENCY,MHz) 100 * 1000 / 10 % flr</Value> <Nonlinearity> <Item Value="0" X="0" Y="0"/> <Item Value="10" X="0" Y="139"/> </Nonlinearity> </Shift> </Element> <Element> <Position X="0" Y="0"/> <MaskImage Name="COM_NAV_MASK.bmp" ImageSizes="252,150"> <Axis X="62" Y="24"/> </MaskImage> <Image Name="NUMBER_ROLL_6.bmp" ImageSizes="11,153" Luminous="1"> <Axis X="0" Y="139"/> </Image> <Shift> <Value>(A:COM1 ACTIVE FREQUENCY,MHz) 100 * 100 / 10 % flr</Value> <Nonlinearity> <Item Value="0" X="0" Y="0"/> <Item Value="10" X="0" Y="139"/> </Nonlinearity> </Shift> </Element> <Element> <Position X="0" Y="0"/> <MaskImage Name="COM_NAV_MASK.bmp" ImageSizes="252,150"> <Axis X="74" Y="24"/> </MaskImage> <Image Name="NUMBER_ROLL_7.bmp" ImageSizes="17,153" Luminous="1"> <Axis X="0" Y="139"/> </Image> <Shift> <Value>(A:COM1 ACTIVE FREQUENCY,MHz) 0.001 + 100 * 10 / 10 % flr</Value> <Nonlinearity> <Item Value="0" X="0" Y="0"/> <Item Value="10" X="0" Y="139"/> </Nonlinearity> </Shift> </Element> <Element> <Position X="0" Y="0"/> <MaskImage Name="COM_NAV_MASK.bmp" ImageSizes="252,150"> <Axis X="92" Y="24"/> </MaskImage> <Image Name="NUMBER_ROLL_6.bmp" ImageSizes="11,153" Luminous="1"> <Axis X="0" Y="139"/> </Image> <Shift> <Value>(A:COM1 ACTIVE FREQUENCY,MHz) 0.001 + 100 * 10 % flr</Value> <Nonlinearity> <Item Value="0" X="0" Y="0"/> <Item Value="10" X="0" Y="139"/> </Nonlinearity> </Shift> </Element> Super VC10 into LOWI with PF3 at a cinema near you https://www.youtube.com/watch?v=298UDyNmgUA
January 23, 20188 yr Author I still don't understand. I don't even see a NUMBER_ROLL_6.bmp in my code. If someone could just tell me what to copy and replace that would be great. I thought that line in my first post was the line I had to edit. It looks like that line is what controls the frequency input. Bryan Ludwig
January 23, 20188 yr There's a lot of things that would need to be modified in that code in order to get a 1Khz tune. 1) The digital display only allows to the 10Khz range (easy to fix) 2) (G:Var8) is the "press" code - how many presses have been made? Including the decimal point. Currently its limit is 6, XXX.XX . Need a rework of the whole <!--==== NUM BUTTONS ====--> , <!--==== CLEAR ====-->, & <!--==== ENTER BUTTONS ====--> sections. (lines 490 thru 572) 3) The associations of G:Vars#s 2, 3 & 7 in the Macro's need to be delved into a little further. 4) The good news is that (G:Var9) is still available for use.That would be the 1Khz register. 5) Still need to confirm that FS will even accept a 1Khz frequency. (Will test this today and edit this post with results) Regards to the above there is no way to go around it blindly without testing. 1st need a working gauge to see how it works as a reference. Is this a downloadable panel/plane package? If so, where? Payware? Otherwise - Will need the full gauge including all the bitmaps to look at it further but only if it is from a freeware package. (or authors consent) FS RTWR SHRS F-111 JoinFS Little Navmap
January 24, 20188 yr Author It's the Virtavia F-22A Raptor. I can upload the whole gauge cab file if you want. I modified the cockpit a little and I manged to edit some XML to input 65000' MSL and 2.42 mach. But that was easy. This Com radio thing I have no idea about. I don't know XML or any code for that matter. Bryan Ludwig
January 24, 20188 yr Downloaded the aircraft & working on it. AIrcraft is nice in a simple kind of way - fly it. Coding like this goes well with the morning coffee ;-) FS RTWR SHRS F-111 JoinFS Little Navmap
January 24, 20188 yr On 23/01/2018 at 4:47 AM, F22Simpilot said: I still don't understand. I don't even see a NUMBER_ROLL_6.bmp in my code. NUMBER_ROLL_6.bmp just refers to the image file. It is a strip usualy vertical with a black background and the respective numbers in white. The coding then points to the relevant number on the strip. Super VC10 into LOWI with PF3 at a cinema near you https://www.youtube.com/watch?v=298UDyNmgUA
January 24, 20188 yr F22, Give this a go... The code was updated to: - (REQUESTED) allow direct 10/25Khz entries on the comm radios. If the frequency is out of range or completely invalid FS will either round the inputted frequency or completely reject it. FS does not allow 8.33Khz or 1Khz entries. This may the best you can get. - (ADDED FEATURE, FOR INFORMATION) added tooltip information to the freq swap mouse spots on comm1 and comm2 to show what was originally keyed in - (ADDED FEATURE) allow a 4 press (decimal point included) up to a 7 press (decimal point included) prior to entry on the comm radios E.G. 124. or 124.1 or 124.15 or 124.125 then "Enter" - (ADDED FEATURE) allow a 4 press (decimal point included) up to a 6 press (decimal point included) prior to entry on the nav radios E.G. same as above except to 2 decimal points - (FIXED) a fix on the "global" (nav1, dme, adf, marker) audio toggle where if loaded from a saved flight, or, switched from a different aircraft, the audio output may not be aligned. This will re-align the audio outputs as originally intended in this code. - (ADDED FEATURE, !!! SIM SAFETY !!!) a "right" click on the "CLR" button for a comm and nav frequency reset so when switching to a different aircraft from this one -and- the new aircraft has a XXX.XX type radio in it, the commands are available for stock frequency increase / decrease. Otherwise all frequencies on the new aircraft will be upset by the spacing. - (INFO) frequencies are held in a saved flight in XXX.XXX format for comm radios FS RTWR SHRS F-111 JoinFS Little Navmap
January 25, 20188 yr Author Thanks. It seems to work. If I can remember I wasn't able to tune the AWOS at Midway Island and now I can. I noticed that the altitude and mach numbers were set as default again. So I changed those back. The mach should be 2.42 and the altitude should be FL650. Bryan Ludwig
January 25, 20188 yr Outstanding! Yeah, I downloaded the aircraft and went directly from there.. Sorry 'bout that.. You have your mods put back in so no worries. FS RTWR SHRS F-111 JoinFS Little Navmap
Archived
This topic is now archived and is closed to further replies.