

byteman59
Members-
Posts
120 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by byteman59
-
Yes, have that. Thanks Vinc
-
Thanks for the addtional info!
-
I see, which should i be using for the Thumb wheels? Control References do not mention SwitchMultiPosBCD.
-
Btw, what is the difference between SwitchMultiPosBCD vs SwitchMultiPos?
-
Will do, thanks Les! Will post results.
-
Thanks Les, will have a look!
-
Hi all, First off, I apologize if these questions have been answered elsewhere. Running into a couple of problems coding the IFF panel. 1st is with the Reply and Test LED's I am using 3.3v LED's + connected to the Arduino 3.3v and the - connected to the signal PIN. //IFF REPLY Light (green) LED OUTPUT DcsBios::LED iffReply(0x12d2, 0x0002, 37); //IFF TEST Light (green) LED OUTPUT DcsBios::LED iffTest(0x12d2, 0x0004, 39); Problem is the LED's are constantly on. 2nd, Is there a way to code the //IFF Code: ZERO - B - A - (HOLD) same way as the //IFF Master: OFF - STBY - LOW - NORM - EMER const byte iffMasterPins[9] = {PIN_0, PIN_1, PIN_2, PIN_3, PIN_4} DcsBios::SwitchMultiPos iffMaster("IFF_MASTER", iffMasterPins, 9); Lastly, I'm using these wheel switchs from PC Flights Along with the following code. Does not seem to be working correctly. Two clicks for every change in game. Am i doing something wrong? //Mode-3A Wheel 1 ROTARY ENCODER const byte iffMode3aWheel1Pins[3] = {54, 55, 56}; DcsBios::SwitchMultiPos iffMode3aWheel1("IFF_MODE3A_WHEEL1", iffMode3aWheel1Pins, 3); //Mode-3A Wheel 2 ROTARY ENCODER const byte iffMode3aWheel2Pins[3] = {60, 59, 58}; DcsBios::SwitchMultiPos iffMode3aWheel2("IFF_MODE3A_WHEEL2", iffMode3aWheel2Pins, 3); //Mode-3A Wheel 3 ROTARY ENCODER const byte iffMode3aWheel3Pins[3] = {63, 64, 65}; DcsBios::SwitchMultiPos iffMode3aWheel3("IFF_MODE3A_WHEEL3", iffMode3aWheel3Pins, 3); //Mode-3A Wheel 4 ROTARY ENCODER const byte iffMode3aWheel4Pins[3] = {66, 67, 68}; DcsBios::SwitchMultiPos iffMode3aWheel4("IFF_MODE3A_WHEEL4", iffMode3aWheel4Pins, 3); Thank you all in advance! Bob
-
It worked great, thank you! pinMode(PIM, OUTPUT) needs to be set as well, in setup
-
btw No1sonuk, how does one know all the commands in DCS-Bios? Is all the code possible available in hte DCS-Bios Reference Chart? I want to learn as much as i can about the programming of DCS-Bios. Thanks
-
got it, i will give it a try later on and report the result.
-
Great, it would be a real pain, I'm also using 3.3v instead of 5v. Didn't know if this would cause a problem as well. Regardless, would this code be correct for the Left Elevator Idicator LED? would it go in the main, setup or loop section? Example: Left Elevator EMER DISENG Indicator (yellow) void onLElevatorEmerDisengageChange(unsigned int newValue) { if (newValue == 1){digitalWrite(LEDPIN, LOW);} else{digitalWrite(LEDPIN,HIGH);} } DcsBios::IntegerBuffer lElevatorEmerDisengageBuffer(0x10da, 0x0100, 8, onLElevatorEmerDisengageChange);
-
Ouch! That is going to be a pain. will need to switch wires and re-solder. will give it a try.
-
Hmm, i am currently using Active Low. Can i use your code to switch?
-
Here is my Fight Control Panel. On the back i created a connector that connects to the Intercom panel Arduino. Still need to 3D print cap for Flt Ctl Switch. The 2-wire connector is for back lighting that will be connected to 12V though out sim. Special thanks to The Warthog Project for the panel files. On to the Aux Lights Panel!
-
My applogy for the misunderstanding and mistake. So if my LED is doing the opposite of what is expected, while using the LED code, i can use the IntegerBuffer code and have it do the opposite? For example, my LED's for Aileron and Elevator are on by default, and when switches are moved, then they turn off.
-
What is the difference between using the following to light up an LED? LED DcsBios::LED efcpMrfcs(0x110c, 0x0800, PIN); IntegerBuffer void onEfcpTrimOverrideChange(unsigned int newValue) { /* your code here */ } DcsBios::IntegerBuffer efcpTrimOverrideBuffer(0x110c, 0x0004, 2, onEfcpTrimOverrideChange);
-
Thanks, On to the next panel, 5 Emergency Flight Control. Hopefuly this one will not take me as long, as i have material and little bit of experience.
-
I tried again using numbers but no luck, will try again using DEC and INC. In the meantime, i did get the desired results using the following settings. For some reason the AIM volume control moves in fewer increments than the other volume controls, reason why i needed to set at 3640 DcsBios::RotaryEncoder intAimVol("INT_AIM_VOL", "-3640", "+3640", 0, 1); DcsBios::RotaryEncoder intIffVol("INT_IFF_VOL", "-910", "+910", 16, 17); DcsBios::RotaryEncoder intFmVol("INT_FM_VOL", "-910", "+910", 11, 12); DcsBios::RotaryEncoder intFmVol("INT_FM_VOL", "-910", "+910", 11, 12); DcsBios::RotaryEncoder intIntVol("INT_INT_VOL", "-910", "+910", 13, 7); DcsBios::RotaryEncoder intTcnVol("INT_TCN_VOL", "-910", "+910", 42, 40); DcsBios::RotaryEncoder intUhfVol("INT_UHF_VOL", "-910", "+910", 62, 66); DcsBios::RotaryEncoder intVhfVol("INT_VHF_VOL", "-910", "+910", 63, 59);
-
That did not seem to work. My server is still using DCSBIOS older version, not flighpanels. But i am able to adjust the default "3200" to get the desired effect. DcsBios::RotaryEncoder intAimVol("INT_AIM_VOL", "-2400", "+2400", 0, 1); As for syncronization: found the following code that works. https://github.com/DCSFlightpanels/dcs-bios-arduino-library/tree/master/examples/Synchronization *************************************************************** DcsBios::ProtocolParser parser; unsigned long lastTickMillis; void setup() { DcsBios::setup(); lastTickMillis = millis(); } void timerTick() { // The timer has expired. Issue a mass reset to all controls. Safe, but may generate additional traffic if you have many controls. DcsBios::resetAllStates(); } void loop() { DcsBios::loop(); unsigned long now = millis(); if(now - lastTickMillis > 10000) { timerTick(); lastTickMillis = now; } } *********************************************************
-
Thank as always, will give it try.
-
I think my solution to the syncing issue is somewhere in this file. https://github.com/DCSFlightpanels/dcs-bios-arduino-library/tree/master/examples/Synchronization Going to give them a try and see what happens.
-
I totally understand. I will see if you code can get me started. Thanks!
-
Thanks, fairly new to arduino and DCS-BIOS. How would i incorporate your code with mine?
-
Switch sync: just to be clear, using the Dial Knob. When i start game play, my dial would be on INT, but DCS shows that it is on VHF until I move dial once, then they sync. Encoders: Thanks for searching.