Hi 388TH_A
Sorry to hear about having to start over...oh the tedium of it all....
But welcome "back"
John
Printable View
Hi 388TH_A
Sorry to hear about having to start over...oh the tedium of it all....
But welcome "back"
John
LOL I found a working copy on my computer that I was given back in 2010 from RVDB737NG Copyright(c)2009, Rob van Dijk - www.rvdijk.nl Now im just trying to change it up and make it my own.
Phew!
I also have just about all of Robs original files..let me know if you cant find anything ...What cockpit are you working on?
John
for now im doing my radios and autopilot then might try and make it around a 737-800
Ah same here (737-800) although as I am building mine Its going in bubble wrap as we aim to move house in a few months.
John
So a couple of things
1( Working on the Pedestal the freqs will only count up when ever I turn the Rotary Knobs
2) for the 737NGX Transponder there are Five positions for the Knob but cant seem to find the offset for themCode:/*---------------------- COM1 Events ----------------------*/
case FS_COM1FREQUENCY:
Com1Fr = ((10000 + BCD2Int(val)) * 10 + 5) / 25 * 25; // rounded, units: 0.001
FsbusWrite(C_DCOM1, Com1Fr / 10); // to cockpit
break;
case FS_COM1STANDBY:
Com1FrStb = ((10000 + BCD2Int(val)) * 10 + 5) / 25 * 25;
FsbusWrite(C_DCOM1STB, Com1FrStb / 10); // to cockpit
break;
case C_RCOM1DEC:
x = Com1FrStb %1000;
x = x + 25 * val; // in steps of 0.025
if (x > 975) // upper limit: 0.975
x = 0;
else if (x < 0)
x = 975;
Com1FrStb = Com1FrStb / 1000 * 1000 + x; // units: 0.001
FsbusWrite(C_DCOM1STB, Com1FrStb / 10); // truncated to 0.01
x = Int2BCD((Com1FrStb % 100000) / 10); // stripped and truncated to 0.01
FsWrite(FS_COM1STANDBY, x); // to FS
break;
case C_RCOM1FRA:
x = Com1FrStb / 1000; // ahead of dec point
x = x + val; // in steps of 1.000
if (x > 136)
x = 118;
else if (x < 118)
x = 136;
Com1FrStb = x * 1000 + (Com1FrStb % 1000);
FsbusWrite(C_DCOM1STB, Com1FrStb / 10);
x = Int2BCD((Com1FrStb % 100000) / 10);
FsWrite(FS_COM1STANDBY, x);
break;
case C_SCOM1SWAP:
if(val==0)
FsWrite (FS_RADIOUSESTBYTOGGLE,0x08); // toggle bit 3 (COM1)
break;
case C_SCOM1TEST:
break;
Code:case C_SXPNDRIDENT: break;
case C_SXPNDRCTRL1:
break;
case C_SXPNDRCTRL2:
break;
case C_SXPNDRCTRL3:
break;
case C_SXPNDRCTRL4:
break;
case C_SXPNDRCTRL5:
break;
3) The ADF1STBY Freq doesnt seem to show the correct Freq. And the Value I do get is 0x0000
Code:MkFsObject(FS_EXTENDEDADF1, "OID", EventHandler, 0x0356, 2, TP_UI16, FS_NORMAL);
case FS_ADF1FREQUENCY:
ADF1 = (ADF1 / 10000) * 10000 + BCD2Int(val) * 10 + ADF1 % 10;
FsbusWrite(C_DADF1, ADF1);
if (bSynchronised == false)
{
ADF1Stb = ADF1;
FsbusWrite(C_DADF1STB, ADF1Stb);
}
break;
case FS_EXTENDEDADF1:
ADF1 = BCD2Int(val >> 8) * 10000 + ((ADF1/10)%1000)*10 + BCD2Int(val & 0x00FF);
FsbusWrite(C_DADF1, ADF1);
if (bSynchronised == false)
{
ADF1Stb = ADF1;
FsbusWrite(C_DADF1STB, ADF1Stb);
}
break;
case C_RADF_100:
x = ADF1Stb / 1000; // hundreds
x = x + val; // update 100s
if (x > 17)
x = 1; // wrap
else if (x < 1)
x = 17; // wrap
ADF1Stb = x * 1000 + ADF1Stb % 1000; // new 100s
FsbusWrite(C_DADF1STB, ADF1Stb);
break;
case C_RADF_10:
x = (ADF1Stb % 1000) / 10; // tens + units
x = x + val; // update 10s
if (x > 99)
x = 0; // wrap
else if (x < 0)
x = 99; // wrap
ADF1Stb = (ADF1Stb / 1000) * 1000 + x * 10 + ADF1Stb % 10; // new 10s
FsbusWrite(C_DADF1STB, ADF1Stb);
break;
case C_RADF_1:
x = ADF1Stb % 10; // .1 units
x = x + val; // update 10s
if (x > 9)
x = 0; // wrap
else if (x < 0)
x = 9; // wrap
ADF1Stb = (ADF1Stb / 10) * 10 + x;
FsbusWrite(C_DADF1STB, ADF1Stb);
break;
case C_SADFSWAP:
if (val == 0)
{
x = ADF1Stb; // save
ADF1Stb = ADF1; // swap
ADF1 = x; // swap
x = Int2BCD(ADF1); // convert to bcd
FsWrite(FS_EXTENDEDADF1, ((x & 0x0F0000) >> 8) | (x & 0x00000F));
FsWrite(FS_ADF1FREQUENCY, (x & 0x00FFF0) >> 4);
FsbusWrite(C_DADF1STB, ADF1Stb);
}
break;
case FS_ADF1MORSE:
break;
bump bump__
I did find this
http://fsuipc.simflight.com/beta/Off...PMDG737NGX.pdfCode:65CB 1 BYTE XPDR_XpndrSelector_2; false: 1 true: 265CC 1 BYTE XPDR_AltSourceSel_2 false: 1 true: 2
65CD 1 BYTE XPDR_ModeSel 0: STBY
1: ALT RPTG OFF
...
4: TA/RA
65CE 1 BYTE XPDR_annunFAIL Boolean
Been away from building for a long... long time. Great to see this thread still going and helping people out. Don't forget to share your work (if you wish to) so that it helps others.
Cheers,
David
im still stuck
388TH_A
Is your issue the rotary encoders only counting up regardless of direction of rotation?
(I have had this)
If so there's a better than average change that they are either wired/connected incorrectly or the wrong type of switch is selected in the setup admin. If memory serves I also had to make sure also that one of the pairs the encoder uses has not already been assigned a rotary switch type (ie clear them back to basic toggles then assign em!)
John
Appreciate you sharing, great forum.Much thanks again. Whipkey
ok so Back to where I was my knobs for my com1, com2 etc doesnt matter if you turn them to the left or right it makes the freq count up. And it does this for the FRA and DEC place.
Quote:
MkFsbusObject(BTP_ROTARY, C_RCOM1DEC, "OID", EventHandler, 29, 5);
MkFsbusObject(BTP_ROTARY, C_RCOM1FRA, "OID", EventHandler, 29, 3);
/*---------------------- COM1 Events ----------------------*/
case FS_COM1FREQUENCY:
Com1Fr = ((10000 + BCD2Int(val)) * 10 + 5) / 25 * 25; // rounded, units: 0.001
FsbusWrite(C_DCOM1, Com1Fr / 10); // to cockpit
break;
case FS_COM1STANDBY:
Com1FrStb = ((10000 + BCD2Int(val)) * 10 + 5) / 25 * 25;
FsbusWrite(C_DCOM1STB, Com1FrStb / 10); // to cockpit
break;
case C_RCOM1DEC:
x = Com1FrStb %1000;
x = x + 25 * val; // in steps of 0.025
if (x > 975) // upper limit: 0.975
x = 0;
else if (x < 0)
x = 975;
Com1FrStb = Com1FrStb / 1000 * 1000 + x; // units: 0.001
FsbusWrite(C_DCOM1STB, Com1FrStb / 10); // truncated to 0.01
x = Int2BCD((Com1FrStb % 100000) / 10); // stripped and truncated to 0.01
FsWrite(FS_COM1STANDBY, x); // to FS
break;
case C_RCOM1FRA:
x = Com1FrStb / 1000; // ahead of dec point
x = x + val; // in steps of 1.000
if (x > 136)
x = 118;
else if (x < 118)
x = 136;
Com1FrStb = x * 1000 + (Com1FrStb % 1000);
FsbusWrite(C_DCOM1STB, Com1FrStb / 10);
x = Int2BCD((Com1FrStb % 100000) / 10);
FsWrite(FS_COM1STANDBY, x);
break;
case C_SCOM1SWAP:
if(val==0)
FsWrite (FS_RADIOUSESTBYTOGGLE,0x08); // toggle bit 3 (COM1)
break;
case C_SCOM1TEST:
break;
Ill look into that but I know im missing something because at one point in time I had everything working back when before I had to start over
So went threw all of the code and looks like theres isnt any doubles of anything for the IDs
So I worked on my stuff for a bit and then stopped for yrs and now im working on them again from time to time. So looks like on my IO board some of the connections might be touching for example you can have a switch on 00 but when you flip the switch 00 and 16 will be effected. This is also the same for 32,48 08,24 and 40,56. The other issue I found was I have to go to ever switch and rotary and Define it in the FSBUS Admin screen in the CDK in order for them to work like they should. If I dont then for example the Rotary will only count up. After fixing it, it will then count up and down so there for it was never the C++ like I thought.
Do you guys know of other ways to fix the rotarys with out going to each one and defining them in that Admin screen?
Why would an air conditioning company ask hvac techs what problems they are having with their heaters? Strange.