Sign in to follow this  
Guest Patrick_Waugh

FS9 to FS X

Recommended Posts

As I mentioned, I use code like this:wstring RadioPage::GetCom1Active(){ lookup_var(&m_com_frequency); lookup_var(&m_com_radio_25_khz_tunable); UINT32 bcd = m_com_frequency.var_value.d; m_Com1Freq[0] = '1'; m_Com1Freq[1] = ((bcd >> 12) & 0xF) + 0x30; m_Com1Freq[2] = ((bcd >> 8) & 0xF) + 0x30; m_Com1Freq[3] = '.'; m_Com1Freq[4] = ((bcd >> 4) & 0xF) + 0x30; m_Com1Freq[5] = ((bcd) & 0xF) + 0x30; if(m_Com1Freq[5] == '2' || m_Com1Freq[5] == '7') { m_Com1Freq[6] = '5'; m_Com1Freq[7] = '0'; // NULL Terminator } else { m_Com1Freq[6] = '0'; // NULL Terminator } m_Com1Freq[7] = '0'; // NULL Terminator return m_Com1Freq;}to get COM1 into a wstring I can use with GDI+.Funny thing is that while it works perfect in FS9, when I run it under FS X (using the same FS X header for both btw), I get garbage in the frequencies. My code still swaps active/stby correctly, but I'm not seeing the frequencies make it into the vars.Are these: MODULE_VAR m_com_frequency; MODULE_VAR m_com_stby_frequency; = COM_FREQUENCY; = COM_STBY_FREQUENCY;out of date?I'm going to have another look at the .h file.

Share this post

Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this