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
Printable View
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
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;
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.
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.
StefanCode: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
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;
???
Glad I could help.
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?
You can use that.
What are your intentions with that Offset?
I use them to switch off my cockpit.
Stefan
The same was wanting to add it into the C++ to turn off my radio stack only