Results 1 to 4 of 4
Thread: Question for Nico !
-
05-19-2008, 11:26 AM #1
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Question for Nico !
Hi Nico!
I need your help urgend!
I`m Betatester for new flightdecksoftware from www.flightdecksoftware.com
I programmed the sioc script for their MCP and everything is working
except CMDB botton.
The MCP is like the PM one with their own FSUIPC Offsets.
Read only variables for CMD-LED:
CMDA Switch read only "0=off" , "1=on" $6DC4 Length 1
CMDB Switch read only "0=off" , "1=on" $6DC5 Length 1
Autopilot switch offset:
$6DB2 Length 1
Bits from left to right
1= Autopilot 1 engage
2= Autopilot 2 engage
Write bitvalue 1 to toggle . Combinations are possible , Value is reset to "0" after reading
Here is the section from my script:
Var 0084, Link FSUIPC_OUT, Offset $6DB2, Length 1 // MCP CMD OFS
Var 0087, Link FSUIPC_IN, Offset $6DC4, Length 1 // MCP CMD A LED
{
IF V0087 = 1
{
V0514 = 1
}
IF V0087 = 0
{
V0514 = 0
}
}
Var 0088, Link FSUIPC_IN, Offset $6DC5, Length 1 // MCP CMD B LED
{
IF V0088 = 1
{
V0515 = 1
}
IF V0088 = 0
{
V0515 = 0
}
}
Var 0213, Link IOCARD_SW, Input 21, Type P // Boton CMDA
{
IF V0213 = 1
{
V0084 = 1
}
ELSE
{
V0084 = 0
}
}
Var 0214, Link IOCARD_SW, Input 19, Type P // Boton CMDB
{
IF V0214 = 1
{
V0084 = 02
}
ELSE
{
V0084 = 0
}
}
Var 0514, Link IOCARD_OUT, Output 33 // Led CMDA
Var 0515, Link IOCARD_OUT, Output 35 // Led CMDB
With this constelation only CMDA is working correctly.
Can you give me a tip how to programm this?
The rest of the script works fine with the mcp software.
Thanks very much!
Greetings
Georg
-
05-19-2008, 11:53 AM #2
Hi George,
First question: are you sure the fsuipc interface is implemented correctly? this being a beta...
Second question:
What do you mean with bits from left to right? I'd expect them to be defined from right to left, or more formally, from least significant to most significant.
Normally the least significant bit is defined to be bit 0, then bit 1 and so on.
To set bit 0 to 1 you write 1, to set bit 1 to 1 you write 2, to set bit 2 to 1 you have to write 4..
Nico
-
05-19-2008, 12:38 PM #3
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Hi Nico
Thanks for the quick answer!
You are right the fsuipc offsets list says "from right to left"
So to give offset $6DB2 Length 1 the value "1" i must write "1"
and value "2" i must write "4"
I try it out and post my results!
Thanks for helping anyway
Greets
Georg
-
05-19-2008, 02:12 PM #4
- Join Date
- Aug 2007
- Location
- Schorndorf/Germany
- Posts
- 50
Me again!
Problem solved!
It was a bug in fsuipc offset.
Thanks for your advice Nico
Greetings Georg
Similar Threads
-
MyCockpit.org Welcome's to Nico Kaan
By vybhav in forum MyCockpit News and AnnouncementsReplies: 3Last Post: 04-18-2010, 07:56 PM -
ATTN NICO:Your help is needed
By iwik in forum OpenCockpits General DiscussionReplies: 2Last Post: 03-21-2009, 01:48 PM
Search Prettys Womans from your city for night
5.Sharing an Essay about PIC16F877