Jump to content

Recommended Posts

Posted (edited)

Yeah. The Flightpanels fork is actively maintained. The "Hub" version (v0.10 etc.) isn't. 

That's likely the cause of your problems. 

Edited by No1sonuk
Posted
On 5/28/2023 at 7:41 PM, No1sonuk said:

Yeah. The Flightpanels fork is actively maintained. The "Hub" version (v0.10 etc.) isn't. 

That's likely the cause of your problems. 

 

Thanks.  I will follow this video in the coming days and see what happens.  I will post here what happens here and if I get the magnetic compass to work.

Thanks

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Posted

I'm writing the sketch for my CMDS counters and having an issue with the syntax of the snipets. Where and how should this code be entered? I get compiling errors no matter where I paste it.

Screenshot 2023-06-01 105032.png

GD ViperWorks - YouTube

F-16CM Block 50 Replica Sim Pit Construction

  • 2 weeks later...
Posted

Hello!

I building a MiG-21 cockpit and using DCS-BIOS. I just noticed a few issuewith the "chicken head" light control knobs, and here the fix:

Original:

definePotentiometer("TXT_LIGHT", 46, 3231, 612, {0, 1}, "Right Horizontal Aft Panel", "Text Backlights")
definePotentiometer("GAUGE_LIGHT", 46, 3232, 156, {0, 1}, "Right Horizontal Aft Panel", "Gauge Backlights")

The fixed one:

definePotentiometer("TXT_LIGHT", 46, 3231, 612, {-1, 1}, "Right Horizontal Aft Panel", "Text Backlights")
definePotentiometer("GAUGE_LIGHT", 46, 3232, 156, {-1, 1}, "Right Horizontal Aft Panel", "Gauge Backlights")

BTW iam a developer and would like to join to the project if possible 🙂

Regards!

Posted
52 minutes ago, Msiipola said:

Is it possible to connect several Ardunio's to DCS-BIOS (flightpanel fork)?

Yes.  You can use several USB ports, or even an RS485 network hanging off an Arduino Mega.

  • Like 1
Posted
10 hours ago, No1sonuk said:

Yes.  You can use several USB ports, or even an RS485 network hanging off an Arduino Mega.

Does this mean that every Arduino will have it own COM-port (using Windows) and do I have to start several connect-serial-port.cmd, each indicating a different COM-port for each Arduino?

Posted
1 hour ago, Msiipola said:

Does this mean that every Arduino will have it own COM-port (using Windows) and do I have to start several connect-serial-port.cmd, each indicating a different COM-port for each Arduino?

Yes and no.

Each will need it's own COM port, but there's a multi-port connect cmd where you add the numbers as a list.

  • Like 1
Posted
11 hours ago, No1sonuk said:

Yes and no.

Each will need it's own COM port, but there's a multi-port connect cmd where you add the numbers as a list.

Thanks for the information. It's very valuable to me as an new user of DCS-BIOS.
I also found the multiple-com-ports.cmd file. I wasn't aware of this before.

Posted

Folks, is there an easy way to detect whether Arduino is connected to DCS BIOS? I.e. I want the sketch to do different things if it's not connected to DCS. Looking at the library, there doesn't seem to be a simple function that does this.

Posted
15 minutes ago, markom said:

Folks, is there an easy way to detect whether Arduino is connected to DCS BIOS? I.e. I want the sketch to do different things if it's not connected to DCS. Looking at the library, there doesn't seem to be a simple function that does this.

IIRC, there's time information in the metadata section.

I don't know what changes and when, but you could have a look there and compare values to look for a change.

Posted
13 hours ago, markom said:

Folks, is there an easy way to detect whether Arduino is connected to DCS BIOS? I.e. I want the sketch to do different things if it's not connected to DCS. Looking at the library, there doesn't seem to be a simple function that does this.

After some to and fro on Discord, here's an example of using the aircraft name to detect if you're in a mission or not:
 

#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

int inMission = 0;     // Variable to carry the current status
int lastInMission = 0; // Variable to use for checking if the status has changed

void onAcftNameChange(char* newValue) {

  inMission = strcmp(newValue, "")!=0;
}
DcsBios::StringBuffer<24> AcftNameBuffer(0x0000, onAcftNameChange);

void setup() {

  DcsBios::setup();

pinMode(13, OUTPUT);    // sets the digital pin 13 (built in LED) as output

}

void loop() {

  DcsBios::loop();

  checkStatus();  //  Call the status checking function

}

void checkStatus() {
  if (inMission != lastInMission){  // Check if the state has changed from last time
    digitalWrite(13,inMission);   // Set the built in LED to the value of inMission

    // You'll need to add your own code here to tell the device what to do if the inMission variable is 1 or 0

    lastInMission = inMission;  // Set the last state variable so it can be checked later
  }
 
}

 

  • Thanks 1
Posted

Heh! Was just coming over here to thank you for the help on Discord. Indeed, the above (idea of using aircraft name as the indicator) solved the particular challenge I was looking to solve.

  • Like 1
Posted (edited)
1 hour ago, amido said:

is it possible to make a single sketch for the commands of both 18 and 16?

Yes. Sort of...

Sending switch signals to multiple aircraft is easy:
This code in one sketch would send the command for both F16 and F18 master caution reset switches when a button on pin 2 is pressed.  DCS will ignore the one that's not used on that aircraft.

DcsBios::Switch2Pos masterCaution("MASTER_CAUTION", 2);  // F16 Master Caution Reset
DcsBios::Switch2Pos masterCautionResetSw("MASTER_CAUTION_RESET_SW", 2);  // F18 Master Caution Reset

Note the pin number is the same for both, meaning it uses the same switch.
If the label in quotes (e.g. "MASTER_CAUTION" ) is the same for any other aircraft, that aircraft would also respond to the same line and it doesn't need to be duplicated.
e.g.

DcsBios::Switch2Pos gearLever("GEAR_LEVER", 3); // F18 AND A10C
DcsBios::Switch2Pos gearHandle("GEAR_HANDLE", 3); // F16

"GEAR_LEVER" is used by both F18 and A10C, so both would respond to that single line, but the F16 needs "GEAR_HANDLE".

Where it gets tricky is in reading addresses for displays and LEDs, etc. because they use addresses.
You can use metadata to detect the aircraft type and change the addresses appropriately, but it could greatly simplify matters if you could use a selector switch.

 

Edited by No1sonuk
Posted

Just a few messages above, No1sonuk posted a bit of code that reads "active aircraft" in DCS. That can be used to bind and re-bind the commands for the aircraft within the sketch. Note: this is theoretical answer, I haven't actually tried this myself.

Posted

Hey Guys, my Workspace is almost complete. Got a CNC and a K50 Laser Cutter know. I want to start from scratch again building some Panels. I am already familiar with Fusion, Illustrator and KiCAD. But DCS Bios need´s a further look at. I want to built my own PCB´s for all the instruments - my idea was to use a Multiplexer directly on the PCB to save some space and use them in row with one arduino. In the "civil Flightsim World" Multiplexer and Shift Register are supported - but is there any example Sketch for DCS Bios and can they be used to save pins?


Thanks in advance 😉 

  • 2 weeks later...
  • 3 weeks later...
Posted

G'day lads

DCS-BIOS has been rock solid for me for years, but I've been struggling with constant issues recently. I think its all messed up around the ARC-210 update. DCS-BIOS seems to stop, and i have to alt-tab out of DCS and restart it to get the panels back.

I originally thought it was DCS-BIOS and Simshaker not playing well together, however ive just done a full DCS wipe and reinstall, leaving Simshaker out, and ive still got issues.

Im running up to date DCS Open Beta and the latest Flightpanels fork.

Here is the error I'm getting in the dcs log. Any ideas??

 

023-07-19 03:44:22.889 ERROR   Lua::Config (Main): Call error LuaExportAfterNextFrame:[string "C:\Users\Simulator\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\lib\A-10C.lua"]:1192: attempt to index local 'arc' (a nil value)
stack traceback:
	[C]: ?
	[string "C:\Users\Simulator\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\lib\A-10C.lua"]:1192: in function 'v'
	[string "C:\Users\Simulator\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\lib\Protocol.lua"]:175: in function 'step'
	[string "C:\Users\Simulator\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\BIOS.lua"]:139: in function <[string "C:\Users\Simulator\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\BIOS.lua"]:137>.
2023-07-19 03:44:26.661 WARNING LOG (23784): 97 duplicate message(s) skipped.
Posted

I don't know if it is related but just recently I was having loads of problems with sketches not working properly, made even more confusing by the fact that it depended on what PC you used to load the sketch. In the end it turned out to be (apparently) corrupted libraries in the Arduino Libraries folder. By deleting and redoing them I managed to drag it back

Cheers

Les 

Posted (edited)

How do you examine an aircraft module?

In DCS-BIOS Developer Guide (https://github.com/DCSFlightpanels/dcs-bios/blob/master/Scripts/DCS-BIOS/doc/developerguide.adoc), in chapter "The DCS-BIOS Lua Code", are some information about how to add a new aircraft module, but no info about how to examine an already installed module. There is a minimal example how to add a module, which give some hints how to examine a module. But I don't to understand much of this.

Are there other sources which have a more detailed description about this matter?
What tools do I need to get further?

 

Edited by Msiipola
  • 2 weeks later...
Posted
10 hours ago, byteman59 said:

Has anyone had any luck with outputting the display for the ARC210?

It's a mess at the moment. 

I've managed to get something kind of working, but it's not great.

The Flightpanels fork devs have been discussing options. 

  • Thanks 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...