Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

Ian Thx for the replay '

 

how can i check my DCS Bios Library version?

Start your Arduino IDE, open Menue Sketch / add Library / manage Libraries (menue items may be some different cause my version is in German)

 

If you did so, a new window pops up: Library Management (I assume)

 

To prevent endless scroll and search use the filter function (top right) and write "DCS-BIOS" there.

E.g. if I do so, a single library is shown: dcs-bios-arduino-library-0.2.5 ...

 

@Ian: Some day we have to raise a Monument to you.

It's not only your impressive work on DCS-BIOS, it's especially your patient kind of explaining things. No matter which level the problem is or how often the problem occures.

Thank You.

Manual for my version of RS485-Hardware, contact: tekkx@dresi.de

Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.

Link to comment
Share on other sites

I just spotted a bug in the DEFAULT_SERIAL implementation that can lead to undefined behavior. Try the following sketch, which uses IRQ_SERIAL mode instead. IRQ_SERIAL mode is much better than DEFAULT_SERIAL anyway and should always be used unless your Arduino board features a controller where it doesn't work (something other than the ATMega328 or ATMega2560).

 

#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

/* paste code snippets from the reference documentation here */
DcsBios::Switch2Pos hydContSwToggle("HYD_CONT_SW", 10);
DcsBios::LED clD1(0x1414, 0x2000, 13);

void setup() {
 DcsBios::setup();
}

void loop() {
 DcsBios::loop();
}

 

If that doesn't work, I'll build the circuit and try to reproduce the problem once I get back to my apartment in a few days (I am currently on the train ride to home to eat some delicious cake :P).

Link to comment
Share on other sites

Ian;2920240']I just spotted a bug in the DEFAULT_SERIAL implementation that can lead to undefined behavior. Try the following sketch, which uses IRQ_SERIAL mode instead. IRQ_SERIAL mode is much better than DEFAULT_SERIAL anyway and should always be used unless your Arduino board features a controller where it doesn't work (something other than the ATMega328 or ATMega2560).

 

#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

/* paste code snippets from the reference documentation here */
DcsBios::Switch2Pos hydContSwToggle("HYD_CONT_SW", 10);
DcsBios::LED clD1(0x1414, 0x2000, 13);

void setup() {
 DcsBios::setup();
}

void loop() {
 DcsBios::loop();
}

 

If that doesn't work, I'll build the circuit and try to reproduce the problem once I get back to my apartment in a few days (I am currently on the train ride to home to eat some delicious cake :P).

 

ITS WORK !!!!

[sIGPIC][/sIGPIC]

 

IAF Bell205

IAF Anafa

 

-----------------------

DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR

-----------------------

My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.

-------------

Link to comment
Share on other sites

Ok last question for today

i update my code to use 1 On/Off Toggle for Hyd also a Red Led .

and connect 3 Way ON/OFF/ON Toggle to use as Reset / Test For Master Caution.

The Led's Work just fine .

but the # way toggle not work

 

i use this code...

#define DCSBIOS_IRQ_SERIAL

 

#include "DcsBios.h"

 

/* paste code snippets from the reference documentation here */

const byte clpResetTestSwPins[3] = {12, 11, 8};

DcsBios::SwitchMultiPos clpResetTestSw("CLP_RESET_TEST_SW", clpResetTestSwPins, 3);

DcsBios::Switch2Pos hydContSwToggle("HYD_CONT_SW", 10);

DcsBios::LED clD1(0x1414, 0x2000, 13);

DcsBios::LED masterCautionInd(0x1416, 0x0100, 2);

 

 

void setup() {

DcsBios::setup();

}

 

void loop() {

DcsBios::loop();

}

[sIGPIC][/sIGPIC]

 

IAF Bell205

IAF Anafa

 

-----------------------

DCS World Modules: A-10C, FC3, MiG-21BiS, F-86, P-51, KA-50, UH-1H Huey, Mi-8, M2000K, Gazal, Bf109, Mig-15, Hawk and NTTR

-----------------------

My System - ASUS Maximus HERO iiiv, CoolMaster 120 Sadion Plus, I7 -6700K @4.0, G.Skill ddr4 16GB ram, Gigabyte GTX 1070 G1 , PSU Seasonic X-650W, OCZ 150 500Gb ssd drive X2, Seagate 7200 1T X2.

-------------

Link to comment
Share on other sites

Ian, I need your help! :)

I download latest version DCS-BIOS from github (0.2.5 and 0.5).

In arduino 2560 I upload sketch from example:

 

 

 

#define DCSBIOS_RS485_MASTER
#define UART1_TXENABLE_PIN 2
#include "DcsBios.h"

void setup() {
 DcsBios::setup();
}

void loop() {
 DcsBios::loop();
}

 

 

 

In slave arduino nano:

 

 

 


#define DCSBIOS_RS485_SLAVE 1
#define TXENABLE_PIN 2
#include "DcsBios.h"

DcsBios::Switch2Pos lampTestBtn("LAMP_TEST_BTN", 10);
DcsBios::LED nmspIlsLed(0x1112, 0x0020, 13);

void setup() {
 DcsBios::setup();
}

void loop() {
 DcsBios::loop();
}

 

 

 

 

Demo scheme:

d8cac86634cf440ba894e48303bfa696.png

 

Problem:

 

If use two jumper: with master and with slave RS485, then DATA don't send from master to slave and back. Master is freeze after some second (2-3). I see in debug log on PC:

 

c9fd4aca28cb4e1bb65707a015436ed2.png

 

 

If I remove any jumper, then master normal send data to slave, and lamp Master Caution is work. But not work control from slave to master. In log:

 

c23351c4498b45e59555ed4fdb2293d3.png

 

 

What I did wrong? And why don't work with two jumpers?

My cockpit A-10C

Строю кокпит A-10C

i7 7700k, 32Gb RAM, SSD NVMe, GTX 1080, Hotas Warthog, HTC Vive.

-----------------

With love from Russia

Link to comment
Share on other sites

I wonder if this is related to the bootloader on the MEGA. We had with my setup? I had to remove the bootloader on the MEGA for the RS485 bus to work properly. It worked fine at startup but if I paused the program and then restarted it, nothing would work.

 

I suspect Ian can verify if this is the problem.

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to comment
Share on other sites

The problem that Warhog is referring to is the following:

when the Arduino Mega is started up (or reset), it will look for a new sketch upload on the serial port. Only once it has not received any data for a certain amount of time, it will end the bootloader and start your sketch. So when the connect-serial-port.cmd script is started while DCS is already running, the Mega will be reset and immediately be flooded with data so it will never leave the bootloader. The workaround is to pause DCS, press the reset button on the Mega, wait a few seconds, then unpause DCS.

A solution to the problem is to upload the sketch to the Mega with an ISP programmer (such as the USBTinyISP), which removes the bootloader.

Curiously, we did not observe this behavior on other Arduino boards; I assume their bootloaders exit when they receive unexpected data.

 

I don't think the bootloader is the (only) problem in this case, because your debug output clearly shows that the RS485Master sketch has started up and is polling the bus. I have no idea why it stops sending anything at all after a few seconds (even if there are errors in the received data, the state machine should time out and continue no matter what). It might even work as intended, but some other error could cause another device (either the Nano or the RS-485 adapter connected to the PC for debugging) to try to drive the bus, thus making anything that is sent unreadable.

 

From what I can tell, the circuit you have built should just work with both jumpers connected.

 

Reasoning about the behavior when a jumper is missing is difficult without knowing the schematic of the RS485 adapter modules. The unconnected pins could be floating, which would lead to undefined behavior. More likely, the pins have pull-up or pull-down resistors connected to them. I found this schematic which allegedly belongs to such a module, and after looking at a few high-res pictures of those modules on eBay I think it is correct. It shows a pull-up resistor connected to both the "driver enable" and the "/receiver enable" lines, which would but the module into TX mode by default (receiver disabled, transmitter enabled). I would be very surprised if anything still worked when removing the jumper on the Nano side.

 

And of course there could still be errors in the actual code, since it hasn't received a lot of testing yet, although I am pretty sure that the two example sketches were one of the things I used to verify functionality.

 

Then there is the possibility of a broken RS-485 module. It's unlikely, but it can happen. Warhog had an entire batch of bad MAX487 chips.

 

A recording of the DE, DI, RE and RO signals for both RS-485 modules would help to narrow this down. You can get cheap 8-channel logic analyzers for less than $10 on eBay. They won't come with any software or documentation, but they work with the open-source sigrok software (http://sigrok.org). This page on the sigrok wiki links to other devices like this.

Link to comment
Share on other sites

Hi.

I have what I hope is an easy Question.

I have panels with encoders on and have noticed that the ordinary small encoders work fine but I have a couple of larger dual encoders that when I turn them they move a place in dcs every 2 clicks.

how can i adjust the ILS script on A10 to change this to 1 click per place in DCS.

thanks.

AMD A8-5600K @ 4GHz, Radeon 7970 6Gig, 16 Gig Ram, Win 10 , 250 gig SSD, 40" Screen + 22 inch below, Track Ir, TMWH, Saitek combat pedals & a loose nut behind the stick :thumbup:

Link to comment
Share on other sites

how can i adjust the ILS script on A10 to change this to 1 click per place in DCS.

 

The number of steps per detent for rotary encoders is currently hard-coded into DCS-BIOS. There is no good reason for that, so I'll add a constructor argument in the next release. Sounds like your encoders use two steps per detent.

 

(There are several bad reasons for hardcoding it: it saves one byte of memory per rotary encoder. When I wrote the thing two years ago, I did anything I could to save RAM because I never actually did the math. I have since figured out that assuming we need half the memory for rx/tx buffers, stack and other housekeeping, a typical Arduino board will have about 10 bytes per GPIO pin. RAM is scarce, but not as scarce as I thought. Another reason is lazyness: if I don't add a feature, I don't have to explain it in the documentation. I knew that encoders with different steps per detent exist -- common values are one, two or four steps per detent --, but every single encoder I had ever seen was of the four steps variety.)

Link to comment
Share on other sites

hello every body

 

hi there i just started making a home cockpit for the L-39za, and a wanted to know is it possible to make the real intruments work with the DCS BIOS ? i m a noob in programing this is my thread https://forums.eagle.ru/showthread.php?t=175443

 

there every one could see why i m asking about the real intruments :)

 

waiting for help

 

thank s

With respect

_________________

Kadda

_________________

My works

TL-39 (NewGen) project (Ру)/(EN)

Link to comment
Share on other sites

DCSBIOS is not able to drive real instruments in its present form. Mostly because real instruments and their internal mechanical systems rely on the actual movement and/or location or attitude of the aircraft to actually register information. I'm referring to gauges such as the altimeter, the speed indicator, AOA, VVI, etc. If you want to simulate the gauges without tearing apart the real gauges you can duplicate their faceplates and pointers and use a stepper motor or servo to move the pointer. DCSBIOS is more than capable of making that happen.

 

I've torn apart a real ADI and added stepper motors to it. The ADI will be capable of moving in sync with the DCS A10 ADI all because of Ian's fabulous DCSBIOS. Since you have the real gauges already, I would use those. Open them up, remove the parts you don't need and place stepper motors or servos inside them. I know it seems like sacrolidge to ruin real instruments, but this isn't a real plane, although after seeing your rig I wasn't so sure. :smilewink:

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to comment
Share on other sites

DCSBIOS is not able to drive real instruments in its present form. Mostly because real instruments and their internal mechanical systems rely on the actual movement and/or location or attitude of the aircraft to actually register information. I'm referring to gauges such as the altimeter, the speed indicator, AOA, VVI, etc. If you want to simulate the gauges without tearing apart the real gauges you can duplicate their faceplates and pointers and use a stepper motor or servo to move the pointer. DCSBIOS is more than capable of making that happen.

 

I've torn apart a real ADI and added stepper motors to it. The ADI will be capable of moving in sync with the DCS A10 ADI all because of Ian's fabulous DCSBIOS. Since you have the real gauges already, I would use those. Open them up, remove the parts you don't need and place stepper motors or servos inside them. I know it seems like sacrolidge to ruin real instruments, but this isn't a real plane, although after seeing your rig I wasn't so sure. :smilewink:

 

Thanks for answering

 

I m totally un accord with you, un reallity it s "réal" instruments becaise i got thème from an old sim. So i m ready to modify i was just wondering if It will work and how i have to do to make work un my case...

With respect

_________________

Kadda

_________________

My works

TL-39 (NewGen) project (Ру)/(EN)

Link to comment
Share on other sites

Hi guys.

 

As many of you know I am working on low-cost hi-quality instruments and hotas solutions.

 

DCS-bios is very interesting to me because it was the very thing missing, and stopping me from moving forward on the machinery needed to produce replica flight instruments in large quantities. Now that it's here, and kicking but, it's time to go big or go home :) I have parts for a large industrial 2x3 meters laser cutter, and 2x1 meters plasma cutter arriving in a few months, so I've done my part.

 

Now, using cheap mini servos is no problem, and a done deal, as far as I know?

But, many of the instruments use continuous rotation, or at least a couple of full rotations, which the cheap servos can't rally provide at decent resolutions.

So stepper motors would really be a big improvement. I know they require additional drivers along with an arduino, and that arduino can can't control as many steppers as servos, but these are still very cheap and would open doors to some amazing and affordable hardware.

As I understand stepper implementation would require an arduino library to make it work? I'm no programmer but if someone is willing to hassle the task I would be happy to supply him with anything from my lineup of products, in any quantity.

 

With stepper motors implemented, I would also be able to do Force Feedback, or to be more precise Force loading on my joysticks and rudder pedals, through DCS-bios. Also a very hi quality, yet very cheap system that doesn't rely on DirectX and expensive controller boards and software, but on lua export of speed, altitude and some other parameters that dictate flight control "stiffness". But this requires arduino stepper motors.

 

Or Ian, if it's within your capabilities, and would make it worth your time, I would be interested in a commercial license, with a fee involved for every unit sold.

 

I am also open to the possibility of making all the instrument designs open source, so one could take the files to their local laser cutter, thus saving even more $$ and bringing the 10$ per instrument dream closer to reality.

 

So if there's anyone willing to hassle the job of making the arduino library for stepper implementation, speak up. If there's more of you, even better.

 

 

 

hi

 

i'm very interested to know how can i do to do that ... :thumbup:

With respect

_________________

Kadda

_________________

My works

TL-39 (NewGen) project (Ру)/(EN)

Link to comment
Share on other sites

kadda: If I understand correctly, you don't have real instruments (as in "intended to be installed in a real plane") but real simulator instruments, as in "intended to be installed in a professional simulator". Since these already are designed to be driven by electrical signals (instead of air pressure), you probably won't have to modify their inner workings.

 

You will have to find out how they work and come up with a circuit that allows you to control them from an Arduino (probably using additional ICs such as op amps and DACs).

 

You will also have to add L-39 support to DCS-BIOS.

 

Once DCS-BIOS has L-39 support, you will need to write an Arduino sketch that takes a numeric value that DCS-BIOS provides and translates it into the correct control signals for your instrument.

 

If you want more specific help, it would help to know more about your instruments and your background in programming and electronics.

Link to comment
Share on other sites

I'm a bit confused by my latest project. I have built a new caution light panel to replace my old version. It took a couple of months so I don't recall if my old CLP had the same behavior but now as soon I power up the arduino all the LEDs default to ON. Once I start a mission everything works perfectly. I don't remember my old panel doing this and I thought i was using the same sketch (but I have been wrong before!).

 

Here's the sketch (Ian's work. I do not take any credit)

 

#define DCSBIOS_IRQ_SERIAL

#include <LedControl.h>
#include <DcsBios.h>

//pin 10 is connected to the DataIn 
//pin 11 is connected to the CLK 
//pin 12 is connected to LOAD
LedControl lc=LedControl(12,11,10,1);//DIN,CLK,LOAD,# OF IC's

DcsBios::ProtocolParser parser;

void loop() {
 DcsBios::loop();
 
unsigned char cl_row_map[48] = {
0, 0, 0, 0,
 1, 1, 1, 1,
 2, 2, 2, 2,
 3, 3, 3, 3,
 4, 4, 4, 4,
 5, 5, 5, 5,
 0, 0, 0, 0,
 1, 1, 1, 1,
 2, 2, 2, 2,
 3, 3, 3, 3,
 4, 4, 4, 4,
 5, 5, 5, 5 
 };
#define SEG_DP (1<<7)
#define SEG_A (1<<6)
#define SEG_B (1<<5)
#define SEG_C (1<<4)
#define SEG_D (1<<3)
#define SEG_E (1<<2)
#define SEG_F (1<<1)
#define SEG_G (1<<0)
unsigned char cl_mask_map[48]= {
 SEG_DP, SEG_B, SEG_D, SEG_F,
 SEG_DP, SEG_B, SEG_D, SEG_F,
 SEG_DP, SEG_B, SEG_D, SEG_F,
 SEG_DP, SEG_B, SEG_D, SEG_F,
 SEG_DP, SEG_B, SEG_D, SEG_F,
 SEG_DP, SEG_B, SEG_D, SEG_F,
 SEG_A, SEG_C, SEG_E, SEG_G,
 SEG_A, SEG_C, SEG_E, SEG_G,
 SEG_A, SEG_C, SEG_E, SEG_G,
 SEG_A, SEG_C, SEG_E, SEG_G,
 SEG_A, SEG_C, SEG_E, SEG_G,
 SEG_A, SEG_C, SEG_E, SEG_G
 };
 
unsigned char max7219_rows[8];

void setup() 
 DcsBios::setup();
 memset(max7219_rows, 0xff, sizeof(max7219_rows));

 lc.shutdown(0,false); //turn on the display
 lc.setIntensity(0,15);//set the brightness
 lc.clearDisplay(0); //clear rthe display and get ready for new data
}
 
void updateCautionLights(unsigned int address, unsigned int data) {
   unsigned char clp_row = (address - 0x10d4) * 2;
   unsigned char start_index = clp_row * 4;
   unsigned char column = 0;
   unsigned char i;

   bool is_on;
   for (i=0; i<16; i++) {
       is_on = data & 0x01;
       // set caution light state (clp_row, column, is_on)
       if (is_on) {
         max7219_rows[cl_row_map[start_index+i]] |= cl_mask_map[start_index+i];
       } else {
         max7219_rows[cl_row_map[start_index+i]] &= ~(cl_mask_map[start_index+i]);
       }
       data >>= 1;
       column++;
       if (column == 4) {
          clp_row++;
          column = 0;
       }
   }
}
void onDcsBiosWrite(unsigned int address, unsigned int data) {
   if (address >= 0x10d4 && address <= 0x10d8) {
      updateCautionLights(address, data);
   }
   if (address == 0xfffe) { 
      // update MAX7219
      unsigned char i;
      for (i=0; i<8; i++) {
        lc.setRow(0, i, max7219_rows[i]);
      }
   }
}

 

I have read the MAX7219 datasheet and the only thing I came up with was changing lc.clearDisplay to 1 which,in the end, made no difference.

 

Is there a way to make leds default to off on power up?

 

Thanks!

Link to comment
Share on other sites

Ian;2926703']kadda: If I understand correctly, you don't have real instruments (as in "intended to be installed in a real plane") but real simulator instruments, as in "intended to be installed in a professional simulator". Since these already are designed to be driven by electrical signals (instead of air pressure), you probably won't have to modify their inner workings.

 

You will have to find out how they work and come up with a circuit that allows you to control them from an Arduino (probably using additional ICs such as op amps and DACs).

 

You will also have to add L-39 support to DCS-BIOS.

 

Once DCS-BIOS has L-39 support, you will need to write an Arduino sketch that takes a numeric value that DCS-BIOS provides and translates it into the correct control signals for your instrument.

 

If you want more specific help, it would help to know more about your instruments and your background in programming and electronics.

 

:pilotfly:

 

Thanks Ian for answering, yes the intruments are for pro. simulater and work with 115V all the inner mechanics are metalic and good for use, i m just thinking to change the motors to make it work with steppers and only the motors, i already openned two of them the accelerometer and the RSBN indicator.

 

now i m reading( and i think that understood how to add L-39 to dcs bios, about my knowledg in programming electronics i m noob so i ll read all what i can to understand how to make steppers work and really hope on every help or advices from forum

 

:pilotfly:

With respect

_________________

Kadda

_________________

My works

TL-39 (NewGen) project (Ру)/(EN)

Link to comment
Share on other sites

ClayM:

 

In setup(), change this line:

memset(max7219_rows, 0xff, sizeof(max7219_rows));

to this:

memset(max7219_rows, 0x00, sizeof(max7219_rows));

 

I think I added that line at some point during debugging to confirm that all rows and columns are working without having to start DCS. (Removing that line would probably work as well, but it's cleaner to explicitly initialize the contents to zero; otherwise, they will be undefined.)

Link to comment
Share on other sites

Look at the output of the list_indication function given different numbers as a parameter.

 

For example,

return list_indication(0)

results in

-----------------------------------------
glass

-----------------------------------------
TFOV

-----------------------------------------
TFOV2

-----------------------------------------
VTH_center

children are {
-----------------------------------------
vth_fpm

children are {
-----------------------------------------
Accel_Z

children are {
}
-----------------------------------------
wp_trackerror_to

}
}
-----------------------------------------
tape_begin

-----------------------------------------
tape_hdg

-----------------------------------------
tape_end

-----------------------------------------
hdg_ind

-----------------------------------------
Pitch_Ladder_center

children are {
-----------------------------------------
pl_p90_line

-----------------------------------------
pl_p85_line

-----------------------------------------
pl_p80_line

-----------------------------------------
pl_p75_line

-----------------------------------------
pl_p70_line

-----------------------------------------
pl_p65_line

-----------------------------------------
pl_p60_line

-----------------------------------------
pl_p55_line

-----------------------------------------
pl_p50_line

-----------------------------------------
pl_p45_line

-----------------------------------------
pl_p40_line

-----------------------------------------
pl_p35_line

-----------------------------------------
pl_p30_line

-----------------------------------------
pl_p25_line

-----------------------------------------
pl_p20_line

-----------------------------------------
pl_p15_line

-----------------------------------------
pl_p10_line

-----------------------------------------
pl_p05_line

-----------------------------------------
pl_hor_line

-----------------------------------------
pl_m05_line

-----------------------------------------
pl_m10_line

-----------------------------------------
pl_m15_line

-----------------------------------------
pl_m20_line

-----------------------------------------
pl_m25_line

-----------------------------------------
pl_m30_line

-----------------------------------------
pl_m35_line

-----------------------------------------
pl_m40_line

-----------------------------------------
pl_m45_line

-----------------------------------------
pl_m50_line

-----------------------------------------
pl_m55_line

-----------------------------------------
pl_m60_line

-----------------------------------------
pl_m65_line

-----------------------------------------
pl_m70_line

-----------------------------------------
pl_m75_line

-----------------------------------------
pl_m80_line

-----------------------------------------
pl_m85_line

-----------------------------------------
pl_m90_line

}
-----------------------------------------
route_bearing

-----------------------------------------
FOV_center

-----------------------------------------
txt_asi
425
-----------------------------------------
txt_mach
0.74
-----------------------------------------
txt_balt
74
-----------------------------------------
txt_balt_H
60
-----------------------------------------
wp_dist11NM
24 N 01

which looks like the HUD.

 

Assuming you want the mach number, you can then grab it like this:

return BIOS.util.parse_indication(0)["txt_mach"]

 

As far as I can figure it out:

list_indication(0): HUD

list_indication(1): VTB

list_indication(3): ECM (remaining chaff)

list_indication(4): ECM (remaining flares)

list_indication(5): that display on the right, maybe fuel flow (I have no idea how this aircraft works, but the fly-by-wire system was nice enough to keep me from crashing during testing xD)

list_indication(6): displays to the left of the VTB, top row

list_indication(7): displays to the left of the VTB, bottom row

list_indication(8): displays to the right of the VTB

list_indication(9): UHF radio frequencies

list_indication(10): right console, top right corner

list_indication(11)L right console, the other stuff on the top panel

Link to comment
Share on other sites

Ian;2927275']Look at the output of the list_indication function given different numbers as a parameter.

 

For example,

return list_indication(0)

results in

-----------------------------------------
glass

-----------------------------------------
TFOV

-----------------------------------------
TFOV2

-----------------------------------------
VTH_center

children are {
-----------------------------------------
vth_fpm

children are {
-----------------------------------------
Accel_Z

children are {
}
-----------------------------------------
wp_trackerror_to

}
}
-----------------------------------------
tape_begin

-----------------------------------------
tape_hdg

-----------------------------------------
tape_end

-----------------------------------------
hdg_ind

-----------------------------------------
Pitch_Ladder_center

children are {
-----------------------------------------
pl_p90_line

-----------------------------------------
pl_p85_line

-----------------------------------------
pl_p80_line

-----------------------------------------
pl_p75_line

-----------------------------------------
pl_p70_line

-----------------------------------------
pl_p65_line

-----------------------------------------
pl_p60_line

-----------------------------------------
pl_p55_line

-----------------------------------------
pl_p50_line

-----------------------------------------
pl_p45_line

-----------------------------------------
pl_p40_line

-----------------------------------------
pl_p35_line

-----------------------------------------
pl_p30_line

-----------------------------------------
pl_p25_line

-----------------------------------------
pl_p20_line

-----------------------------------------
pl_p15_line

-----------------------------------------
pl_p10_line

-----------------------------------------
pl_p05_line

-----------------------------------------
pl_hor_line

-----------------------------------------
pl_m05_line

-----------------------------------------
pl_m10_line

-----------------------------------------
pl_m15_line

-----------------------------------------
pl_m20_line

-----------------------------------------
pl_m25_line

-----------------------------------------
pl_m30_line

-----------------------------------------
pl_m35_line

-----------------------------------------
pl_m40_line

-----------------------------------------
pl_m45_line

-----------------------------------------
pl_m50_line

-----------------------------------------
pl_m55_line

-----------------------------------------
pl_m60_line

-----------------------------------------
pl_m65_line

-----------------------------------------
pl_m70_line

-----------------------------------------
pl_m75_line

-----------------------------------------
pl_m80_line

-----------------------------------------
pl_m85_line

-----------------------------------------
pl_m90_line

}
-----------------------------------------
route_bearing

-----------------------------------------
FOV_center

-----------------------------------------
txt_asi
425
-----------------------------------------
txt_mach
0.74
-----------------------------------------
txt_balt
74
-----------------------------------------
txt_balt_H
60
-----------------------------------------
wp_dist11NM
24 N 01

which looks like the HUD.

 

Assuming you want the mach number, you can then grab it like this:

return BIOS.util.parse_indication(0)["txt_mach"]

 

As far as I can figure it out:

list_indication(0): HUD

list_indication(1): VTB

list_indication(3): ECM (remaining chaff)

list_indication(4): ECM (remaining flares)

list_indication(5): that display on the right, maybe fuel flow (I have no idea how this aircraft works, but the fly-by-wire system was nice enough to keep me from crashing during testing xD)

list_indication(6): displays to the left of the VTB, top row

list_indication(7): displays to the left of the VTB, bottom row

list_indication(8): displays to the right of the VTB

list_indication(9): UHF radio frequencies

list_indication(10): right console, top right corner

list_indication(11)L right console, the other stuff on the top panel

 

 

 

Thank you Ian for your reply....

i didnt quite understand what you meant though...

i would prefer if you could help me telling me the arguments of the 7segment

as you did in this example

https://forums.eagle.ru/showpost.php?p=2626815&postcount=181

 

for the leds...was fantastic

Link to comment
Share on other sites

Thank you Ian for your reply....

i didnt quite understand what you meant though...

i would prefer if you could help me telling me the arguments of the 7segment

as you did in this example

https://forums.eagle.ru/showpost.php?p=2626815&postcount=181

 

There are no cockpit arguments for those displays (because they are not implemented as an animation in the 3D model). They are implemented with a different mechanism. As far as I can tell, "indications" are a way for cockpit devices to place graphic elements (including text) on a texture in the cockpit. Export.lua provides the list_indication() function, which takes one integer parameter (might be a cockpit device id?) and returns a string that contains the internal identifier of each indication (such as "txt_mach") and, if the indication is a text element, also the text that is displayed.

 

DCS-BIOS provides the function BIOS.util.parse_indication, which will call list_indication() and return a Lua table that maps the indication IDs to their associated text.

 

Just try out the code snippets I posted in the Lua console. You'll see how it works after playing around for a while and comparing the result of, for example, "return list_indication(0)" to what you see on the HUD in your virtual cockpit.

Link to comment
Share on other sites

Ian;2926703']kadda: If I understand correctly, you don't have real instruments (as in "intended to be installed in a real plane") but real simulator instruments, as in "intended to be installed in a professional simulator". Since these already are designed to be driven by electrical signals (instead of air pressure), you probably won't have to modify their inner workings.

 

You will have to find out how they work and come up with a circuit that allows you to control them from an Arduino (probably using additional ICs such as op amps and DACs).

 

You will also have to add L-39 support to DCS-BIOS.

 

Once DCS-BIOS has L-39 support, you will need to write an Arduino sketch that takes a numeric value that DCS-BIOS provides and translates it into the correct control signals for your instrument.

 

If you want more specific help, it would help to know more about your instruments and your background in programming and electronics.

 

help please with adding...

With respect

_________________

Kadda

_________________

My works

TL-39 (NewGen) project (Ру)/(EN)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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