Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Direct Tune of COM1 Standby, etc.

Featured Replies

  • Moderator

I am designing an RTU4200 control head.There are two of 'em used, one strapped for COM1/NAV1 and another strapped for COM2/NAV2.FS stock key_events only allow for direct tuning of either COM1 (active) OR COM1 Standby frequency, depending on how the radio section of the aircraft.cfg is set up.I need to be able to tune the COM1 Standby directly...I'm thinking that I should be able to use the KEY_COM_STBY_RADIO_SET event to do the deed, based on the contents of my own, custom "tuning variable" but haven't been successful so far...I'm open for suggestions... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Fr. Bill,Did you try the Horner Schedule?(See FAQ Arne Bartels)XMLany frequency100 * 10000 % intd 10 % r 10 / intd 10 % r 10 / intd 10 % r 10 / int16 * +16 * +16 * +(>K:COM_STBY_RADIO_SET)Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hi Bill (L:SetValue, number) 100 * 10000 % int d 10 % r 10 / int d 10 % r 10 / int d 10 % r 10 / int 16 * + 16 * + 16 * + (>K:COM_STBY_RADIO_SET) Maybe this is what you need, It works OK for me.

Paul EGLD

  • Moderator

Thanks for the suggestions. Actually, I have managed to do the deed in C using a combination of bits and pieces from other code I've already written...The main problem was that I couldn't remember just what I'd written a year ago, and scratched my head wondering "Now why did it do that..." :-lol What makes it rather complex is that the same knob is used for all tuning functions, and what the outer and inner knob do is based on what LSK happens to be selected...Plus, the knob has to account for 'rollover' when reaching the upper or lower limits, which of course is different for COM and NAV frequencies...Anyway, I think it's done now... :)For example, NAV1 Standby direct tuning of decimals:if ( rtu_lsk1 == 6 ) { if (rtu_innerknob1 == 1 && NAV_stby < 117.95) { NAV_stby = NAV_stby + 0.025; trigger_key_event (KEY_NAV1_STBY_SET,Dec2Bcd((NAV_stby - 100)*100)); rtu_innerknob1 = 0; } else if (rtu_innerknob1 == 1 ) { NAV_stby = 118.00 ; trigger_key_event (KEY_NAV1_STBY_SET,Dec2Bcd((NAV_stby - 100)*100)); rtu_innerknob1 = 0; } if (rtu_innerknob1 == -1 && NAV_stby > 108.00) { NAV_stby = NAV_stby - 0.025; trigger_key_event (KEY_NAV1_STBY_SET,Dec2Bcd((NAV_stby - 100)*100)); rtu_innerknob1 = 0; } else if (rtu_innerknob1 == -1 ) { NAV_stby = 136.975 ; trigger_key_event (KEY_NAV1_STBY_SET,Dec2Bcd((NAV_stby - 100)*100)); rtu_innerknob1 = 0; } }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

The main problem was that I couldn't remember just what I'dwritten a year ago, and scratched my head wondering "Nowwhy did it do that..." :-lol Bill, don't scratch too hard... It could get infected.. :-lolI just had to............ :-beerchug Roman

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.