Results 211 to 220 of 737
Thread: Progamming help with FSBus dll
-
12-10-2009, 03:06 AM #211
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
Hi,
that code was a sample, but that don´t work correct.
The first thin is you cant work with the full frequenz, the FS dont understand that.
118.000 = wrong
18.000 = right
Use my working Code from my post.
Stefan
-
12-10-2009, 08:56 AM #212
Re: Progamming help with FSBus dll
your code didnt work for me it helped but didnt work. So then i tried instead and now i only get 14*.** so yeah
case C_COM1DISPLAY:
x = BCD2Int(COM1);
x += val*5;
if (x > 3697)
x = 3697;
if (x < 1800)
x = 1800;
COM1 = Int2BCD(x);
FsWrite (FS_RADIOSTACKCOM1, (COM1));
FsbusWrite (C_COM1DISPLAY, x);
break;
case FS_RADIOSTACKCOM1:
// main 3 digits, in Binary Coded Decimal.
// A frequency of 1234.5 will have 0x0234 here
// and 0x0105 in offset 0356.
x = val;
COM1 = (COM1) | (x);
FsbusWrite (C_COM1DISPLAY, BCD2Int(COM1)+10000);
break;
-
12-10-2009, 09:22 AM #213
Re: Progamming help with FSBus dll
ok so playing with it more looks like if i start out with
FS Freq FSBUS Dis Freq
118.00 118.00
118.02 118.02
118.00 118.02
118.05 118.05
118.00 118.05
118.10 118.15
118.17 118.17
122.20 140.97
Seems like the highest digit that it shows it will only display that but wont ever go lower. But then when i went to the 122 freqs it jumped to the 140 freq range so yeah im not sure on where to go from here.
-
12-10-2009, 04:52 PM #214
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
Hi,
that part of the code has one error.
x += val*5;
The COM Radion has no 5 as stepsize. It is 25. Your code if for NAV.
Code like that will fix that.
Code:x2=comstby/10; x2=x2*10; x1=comstby-x2; comstby = comstby *10; if((x1==2) | (x1==7)) comstby+= 5; comstby += val * 25; x3=comstby; x3/=10; comstby=x3
-
12-12-2009, 10:14 PM #215
Re: Progamming help with FSBus dll
Hi:
I don't know much about FSBus, but I do know a little about C++, so I'll have a little stab at this for you. There is a line that makes me a little suspicious about the fault that you report. The fault that I think you're reporting is that when you increase from 118.00 to 118.02 and then go back to 118.00 the display stays at 118.02. The line I am suspicious of is
COM1 = (COM1) | (x);
In this statement, you are logically ORing the new value with the old value. Without going into a lesson on boolean logic, I think this line is preserving the higher values. What happens if you just use
COM1 = x;
???Regards: Scott Hendry
www.scotthendry.com
-
Post Thanks / Like - 2 Thanks, 0 Likes, 0 Dislikes
-
12-13-2009, 05:33 AM #216
-
12-13-2009, 03:39 PM #217
Re: Progamming help with FSBus dll
Glad I could help.
Regards: Scott Hendry
www.scotthendry.com
-
12-16-2009, 12:21 PM #218
Re: Progamming help with FSBus dll
For the Avionics Bus Volt. 0x2850 FLT64 8 Bit Do you know if i can use this in my project? In FS Interrogate I can get it to show the value that its getting from the FS but it also says in it that NOT FSUIPC SUPPORTED but yet it does get a value from the FS so again do you know if i can use this or not?
-
12-16-2009, 02:21 PM #219
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
You can use that.
What are your intentions with that Offset?
I use them to switch off my cockpit.
Stefan
-
12-16-2009, 11:01 PM #220
Re: Progamming help with FSBus dll
The same was wanting to add it into the C++ to turn off my radio stack only
Similar Threads
-
Fsbus ng io
By Davral in forum I/O Interfacing Hardware and SoftwareReplies: 1Last Post: 10-19-2024, 05:19 PM -
Need Help Getting My FSBUS NG I/O Going Again..
By JBRoberts in forum I/O Interfacing Hardware and SoftwareReplies: 15Last Post: 10-19-2024, 11:37 AM -
Help FSBUS
By cesarfsim in forum I/O Interfacing Hardware and SoftwareReplies: 3Last Post: 08-27-2024, 02:22 PM -
Fsbus CDK
By flyandre in forum General Builder Questions All Aircraft TypesReplies: 4Last Post: 12-27-2014, 12:58 PM -
Fsbus 2.4.3
By Anderson/SBSP in forum I/O Interfacing Hardware and SoftwareReplies: 9Last Post: 11-30-2008, 04:25 PM
Casual Encounters Made Simple in Your City Pretty Girls from your city for night...
P3D V4 FMGS B47 Aircraft issue