PDA

View Full Version : TextLCD, encoders and radios



RobertoR
03-09-2005, 01:40 PM
I set up a textLCD module and two encoders to obtain the functions of NAV1 and DME1 distance.

For DME1 I added this offset:

[DME1 Distance]
Offset=0C29
Length=2
Format="DME1 "####

Problem 1: DME is displayed as 5 digit integer rather than a 00.0 format, for instance:
Actual DME: 26.1 - 22.9 - no reading
Display: 13874 - 12850 - 12336
The same happens with a format line like
Format="DME1 "000.00
or no format at all.

Problem 2: I tried to configure the encoder built in pushbutton to toggle NAV1 frequency.
What I found:

NAV1 toggle:
FSUIPC value: 2^1 = 0010
FS2Phidget INI file: Bit=2 (accordingly)
Value displayed by assign window when True: 0100 (corresponds to FSUIPC COM2 toggle)
Action from pushbutton: Toggle COM2, accoding to 0100 value

NAV2 toggle:
FSUIPC value: 2^0= 0001
FS2Phidget INI file: Bit=1 (accordingly)
Value displayed by assign window when True: 0010 (corresponds to FSUIPC NAV1 toggle)
Action from pushbutton: no action on any radio frequency as displayed on monitor screen.

Can you please help?
Thank you

Roberto

RobertoR
03-10-2005, 02:16 PM
Alan, if I'm not wrong, the software sees the DME distance four character string as a long integer.
Is there any way to make it to see as a text string?

Roberto

RobertoR
03-11-2005, 10:22 PM
I corrected a mistake of mine in the INI file section for DME distance

Length=5
(not 2)

but again distance is displayed as a long integer.
If there isn't a better solution I'll use Lcdtext 2nd line as Nav1 standby frequency.

The encoders pushbuttons started functioning with no otyher action from me.
Again, NAV2 freq. toggle must be selected to obtain the correct 0010 value for NAV1.

Roberto

alandyer
03-28-2005, 08:18 AM
Roberto,

I followed my own advice and read FSUIPC documentation :)
You are 100% correct.
0C29 - DME1 should be read as a string.

I played around with radio toggle switches.
Will have a fix for that in next release.

As mentioned to Dan in another post earlier today -
those radio toggle bits function little differently to most of the FS bitmaps.
Usually, bits represent a State.
For the the radio toggles they represent an event trigger.
The event being "swap the radio frequencies".

The short staory - I will have fixed with next release.

Regards,
Alan.

RobertoR
03-29-2005, 05:09 AM
Thank you Alan.
Actually, the frequency swap does seem to work, it only needs to act on different bits.
Will the new release include two values per row option? :)
By the way, I experimented displaying the elevator trim value, divided by 16000, multiplied by 100, and while decreasing below zero the displayed value jumps to 499. Is it acting as a signed integer? Any way to have the minus sign recognized?
Thanks so much as always
Kind regards

Roberto