November 19, 200619 yr 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; m_com_frequency.id = COM_FREQUENCY; m_com_stby_frequency.id = COM_STBY_FREQUENCY;out of date?I'm going to have another look at the .h file.
Create an account or sign in to comment