Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

Hi Mole,

 

I'll look more closely tonight and compare with my setup but I noticed two things:

1. Pin RX on your Nano looks like it has a bad soldering. It may very well just be the picture that cheats me.

2. On the Mega Master I cannot see the jumper between MAX487 pin 2&3 (RE and DE). Please check that is jumped so that Pin 2 on the Mega Master triggers both at the same pins on the MAX487. Similar to the wiring on the Nano

 

Cheers¨

Hans

Link to comment
Share on other sites

Hi Hans,

 

Pin 2 & 3 on the master’s max487 are cross soldered beneath the board, but I will look again and test again. I might even just solder up a new board and socket for it. I have 2 Nanos shown, but I will check them both.

 

I really am not sure why this is not working, but it is bound to be bad soldering/wiring!:music_whistling::music_whistling:

 

Mole

 

Hi Mole,

 

I'll look more closely tonight and compare with my setup but I noticed two things:

1. Pin RX on your Nano looks like it has a bad soldering. It may very well just be the picture that cheats me.

2. On the Mega Master I cannot see the jumper between MAX487 pin 2&3 (RE and DE). Please check that is jumped so that Pin 2 on the Mega Master triggers both at the same pins on the MAX487. Similar to the wiring on the Nano

 

Cheers¨

Hans

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to comment
Share on other sites

Hallo friends.

I also risked an eye to Mole's installation:

 

There are two remarks (from my own experiences):

1. the whole installation (if I see that right) runs on 5V provided just by the USB on the MEGA. Maybe(!) this is some kind of weak. If the voltage drops too far, the Max (also: maybe) can't interprete logical level safe. Try to add somewhat of 7V to 12V to the Vin-Pin there (or to the Vin-Plug).

2. Sometimes (I never examined the reason) it depends on the order which DCS and socat have been started. One day works nothing, other day communication just runs in one direction...

 

Good luck!

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

Hi Tekkx, my DCS-BIOS experience has been more forgiving, it doesn't matter when I start socat, I can leave it running between sessions, restart it mid flight, it always reconnects with the sim. Also, though I have a 5V Reg, my entire right hand console doesn't and it's happily running a bunch nano's off the Mega's 5V regulator. So I'm wondering if it comes down to the quality of the Mega and the components within. It sounds like I may have been really lucky with DCS-BIOS, took less than 15 mins to first test master/slave (mega/nano). The issues that people are having must come down to the hardware or maybe electrical noise. A DSO would be useful.

 

cheers

 

John

 

Hallo friends.

I also risked an eye to Mole's installation:

 

There are two remarks (from my own experiences):

1. the whole installation (if I see that right) runs on 5V provided just by the USB on the MEGA. Maybe(!) this is some kind of weak. If the voltage drops too far, the Max (also: maybe) can't interprete logical level safe. Try to add somewhat of 7V to 12V to the Vin-Pin there (or to the Vin-Plug).

2. Sometimes (I never examined the reason) it depends on the order which DCS and socat have been started. One day works nothing, other day communication just runs in one direction...

 

Good luck!

Link to comment
Share on other sites

Hi There, I'm at the beginnings of creating a set of switches and buttons using DCS-BIOS and and Arduino Due (I know, I had it already)... Anyway, I downloaded the latest arduino library 0.2.17 from the DCSFlightpanels branch, but the sketch fails to compile with the following error

 

Arduino: 1.8.9 (Windows 10), Board: "Arduino Due (Programming Port)"

In file included from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/DcsBios.h:108:0,

                from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\examples\DefaultSerial\DefaultSerial.ino:12:

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:64:92: error: ISO C++ forbids declaration of 'ActionButton' with no type [-fpermissive]

   ActionButton(const char* msg, const char* arg, char argRow, char argCol, char* argMatrix) {

                                                                                           ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:73:4: error: declaration of 'int DcsBios::MatActionButton::ActionButton(const char*, const char*, char, char, char*)' [-fpermissive]

   }  

   ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:7:8: error: changes meaning of 'ActionButton' from 'class DcsBios::ActionButton' [-fpermissive]

 class ActionButton : PollingInput {

       ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h: In member function 'virtual void DcsBios::MatActionButton::pollInput()':

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:53:34: error: invalid types 'char[char]' for array subscript

    char state = *matrix[row][col];

                                 ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h: In member function 'int DcsBios::MatActionButton::ActionButton(const char*, const char*, char, char, char*)':

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:67:5: error: 'pin_' was not declared in this scope

    pin_ = pin;

    ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:67:12: error: 'pin' was not declared in this scope

    pin_ = pin;

           ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Buttons.h:72:34: error: invalid types 'char[char]' for array subscript

    lastState_ = *matrix[row][col];

                                 ^

In file included from C:\Users\Azza\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:44:0,

                from sketch\DefaultSerial.ino.cpp:1:

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h: In member function 'char DcsBios::Matrix3Pos::readState()':

C:\Users\Azza\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/wiring_constants.h:33:14: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default]

#define true 0x1

             ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h:218:49: note: in expansion of macro 'true'

    if (swPanel.GetSwitchState(rowA_, colA_) == true) return 0;

                                                ^

C:\Users\Azza\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/wiring_constants.h:33:14: note: candidate 1: operator==(int, int) <built-in>

#define true 0x1

             ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h:218:49: note: in expansion of macro 'true'

    if (swPanel.GetSwitchState(rowA_, colA_) == true) return 0;

                                                ^

In file included from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h:6:0,

                from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/DcsBios.h:109,

                from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\examples\DefaultSerial\DefaultSerial.ino:12:

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/SwitchMatrix.h:87:13: note: candidate 2: bool operator==(SwitchState, bool)

inline bool operator== (SwitchState lhs, bool rhs)

            ^

In file included from C:\Users\Azza\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/Arduino.h:44:0,

                from sketch\DefaultSerial.ino.cpp:1:

C:\Users\Azza\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/wiring_constants.h:33:14: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [enabled by default]

#define true 0x1

             ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h:219:49: note: in expansion of macro 'true'

    if (swPanel.GetSwitchState(rowB_, colB_) == true) return 2;

                                                ^

C:\Users\Azza\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\cores\arduino/wiring_constants.h:33:14: note: candidate 1: operator==(int, int) <built-in>

#define true 0x1

             ^

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h:219:49: note: in expansion of macro 'true'

    if (swPanel.GetSwitchState(rowB_, colB_) == true) return 2;

                                                ^

In file included from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Switches.h:6:0,

                from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/DcsBios.h:109,

                from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\examples\DefaultSerial\DefaultSerial.ino:12:

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/SwitchMatrix.h:87:13: note: candidate 2: bool operator==(SwitchState, bool)

inline bool operator== (SwitchState lhs, bool rhs)

            ^

In file included from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/DcsBios.h:114:0,

                from C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\examples\DefaultSerial\DefaultSerial.ino:12:

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Dimmer.h: In member function 'void DcsBios::Dimmer::SetControl(const char*)':

C:\Users\Azza\Documents\Arduino\libraries\dcs-bios-arduino-library\src/internal/Dimmer.h:28:6: error: 'msg_' was not declared in this scope

     msg_ = msg;

     ^

exit status 1
Error compiling for board Arduino Due (Programming Port).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

 

I am using the Default Serial example. I have tried by including a switch from the control reference and without.

 

I notice that the Switchmatrix example compiles, but I don't understand why that compiles and the others don't. I can understand code a little but the syntax and error message baffle me at the moment.

 

Does this mean with this version of dcs-bios I need to use a switch matrix? I have tried earlier version (back to 0.2.15) but it still has the same errors.

 

I was partially successful with the latest of Ians libraries (0.2.11) but I had problems with a pot where the board didn't run if I defined a pot, but worked fine with a switch.

 

I would like to use the latest version, but it's not working for me. Is there something i'm missing?

 

oh, using Arduino IDE 1.8.9.

 

Thanks


Edited by Azza276
Link to comment
Share on other sites

**** EDIT ***

 

Hans has pointed out that this may be posted in the wrong thread, as it is not a DCS BIOS specific issue - apologies, please feel free to move it or delete it if that is indeed the case, I will copy the question to another thread ****

 

Gents, I am pretty sure I have made some errors in my wiring, probably as a result of misinterpreting the diagrams with regards to setting up gauges with stepper motors.

 

While I can make individual stepper motors work running off USB connected Nanos, when i come to set up for the RS485 setup, I am burning out EasyDriver boards. Essentially, as the MAX487 chip needs to be connected to the Nano, and the Nano is not connected via USB, I see the 12V supply (that I am using for the EasyDriver) is used to power the VIN input for the Nano as well. I am also using a common ground for the VIN. The stepper is then connected using teh GND on the other side of the Nano, then pins 11 and 10 for Step and DIR respectively.

 

I am wondering whether the 12v supply to the Nano is the cause of the EasyDrivers burning out?

 

If someone has a complete schematic for the Mega, Nanos, Max487 chips, EasyDrivers and steppers I can look at I would be grateful

 

Cheers

 

Les


Edited by lesthegrngo
Link to comment
Share on other sites

 

Does this mean with this version of dcs-bios I need to use a switch matrix? I have tried earlier version (back to 0.2.15) but it still has the same errors.

 

I was partially successful with the latest of Ians libraries (0.2.11) but I had problems with a pot where the board didn't run if I defined a pot, but worked fine with a switch.

 

I would like to use the latest version, but it's not working for me. Is there something i'm missing?

 

oh, using Arduino IDE 1.8.9.

 

Thanks

 

 

I have the same problem, 0.2.11 compiles, .15,.16 & .17 does not.

/F

Link to comment
Share on other sites

I have the same problem, 0.2.11 compiles, .15,.16 & .17 does not.

/F

 

Phew, I'm glad I'm glad I'm not the only one... but also sorry to hear you have the same problem.

 

I did a little experimenting and basically took 0.2.11 and added the header (.h) files from later versions (minding the changes) then editing the header files to comment out sections/other headers, I was missing/didn't need. That way I get some of the features...

 

But the problem I have with Pots remains... It may be related to the DUE (any other DUE owners here?) so I have a Mega on order to see if it also has problems.

 

That being said, I have looked into the DUE information and from a code/sketch POV it is compatible with all other Arduino code (well at least the Mega as it is almost a drop in replacement). There are some extra commands to increase the ADC resolution, but the default resolution it 10bit just like the mega, as it is essentially a drop in, in relation to the code. I have tried ensuring/forcing the resolution to 10bit to make sure, but no change to the result of no data from the board.

I was intending of updating the Potentiometers.h to take full advantage of the 12 bit resolution of the DUE is I could get it to work... but no luck so far.

Link to comment
Share on other sites

Phew, I'm glad I'm glad I'm not the only one... but also sorry to hear you have the same problem.

 

 

 

I did a little experimenting and basically took 0.2.11 and added the header (.h) files from later versions (minding the changes) then editing the header files to comment out sections/other headers, I was missing/didn't need. That way I get some of the features...

 

.

 

 

I had to use the .11 button.h and exclude the dimmer.h in DcsBios.h to get it to work.

The buttonmatrix and the dimmer wasn’t liked by my Arduino IDE :)

 

Cheers

Link to comment
Share on other sites

After I can't test the library. Can you wrote me the problems an you solutions. So I can isolate what makes the problems?

So maybe we get the whole thing to Work.

 

Hi Warlord,

 

the issue we are having is that DCS-BIOS will not compile. I included the error messages that I was receiving in my initial post a few above (or here https://forums.eagle.ru/showpost.php?p=3930808&postcount=984). But the initial error is

ISO C++ forbids declaration of 'ActionButton' with no type [-fpermissive]

which I think flows onto the next few errors.

 

Unfortunately we have no solutions, we have just been taking older versions of the header files that have worked for us and swapping them out... so not a solution.

 

Cheers

Azza

Link to comment
Share on other sites

I can’t copy paste but I can try to write here, I get errors in Button.h & Dimmer.h

 

..Buttons.h:64:17 error: expected ‘)’ before ‘const’

 

..Buttons.h: in member function ‘virtual void DcsBios::MatActionButton::pollInput()’:

 

..Buttons.h:53:34 error: invalid types ‘char[char]’ for array subscript

char state = *matrix[row][col];

 

..Dimmer.h: In member function ‘void DcsBios::Dimmer::SetControl(const char*)’;

 

..Dimmer.h:28:6: error: ‘msg_’ was not declared in this scope

msg_ = msg;

 

So I used the Button.h from .11 and the commented out Dimmer.h in DcsBios.h

Link to comment
Share on other sites

Otherwise let me know Mole. I can solder up a few sockets here, test and ship if you run into a dead end

 

Cheers

Hans

 

Thank you Hans, a very kind offer!

 

But I am determined to get it working myself. I am concerned it’s the Master board at fault. It is (of course) an Arduino clone from China. Do you recommend only using genuine Arduino?

 

I soldered up a new max487 mount board, checked all soldering, all seems well. Connected it to Master again, still the same. But... I plugged in a 12 v supply to the Mega’s socket, and the Nano started smoking! So the Nano maybe compromised....

 

It’s very frustrating!

 

Mole

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to comment
Share on other sites

Mole, check out the master board pins.

My arduino clone, that is similar to yours, has the RX1 and TX1 pins swapped.

 

This is the original Arduino

original.jpg.e85c5200159da8c6bcc623186ca9da67.jpg

 

And this the clone

clone.jpg.a07f62e47b6ae9be451e22dabf137e4e.jpg

 

I also had this headache with all correctly wired and nothing working then, as soon as i found that, all went up and running (and, i have to admin, i was a little upset!)

 

Just my 2 cents in case you didn't watched into it

Link to comment
Share on other sites

Mole, check out the master board pins.

My arduino clone, that is similar to yours, has the RX1 and TX1 pins swapped.

 

This is the original Arduino

[ATTACH]211218[/ATTACH]

 

And this the clone

[ATTACH]211219[/ATTACH]

 

I also had this headache with all correctly wired and nothing working then, as soon as i found that, all went up and running (and, i have to admin, i was a little upset!)

 

Just my 2 cents in case you didn't watched into it

 

Hi Jester,

 

Yes I saw that.... But are they swapped or wrongly labelled? I have tried connecting other way, but still. I am going to put my 2 working panels back to serial and keep trying with a single switch as a slave to test.

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to comment
Share on other sites

In my case just inverting RX and TX lines made all working so i think they're only wrongly labelled.

If you watch the "clone" description, it says that pin 18 is "Serial Port 1 TXD" while the serigraphy says "RX1" so who to believe? :(

I reversed them trusting the description, keeping in mind that all the other RX-TX couples are inverted.

BTW, i also had to try almost by chance to make them work :doh:

Link to comment
Share on other sites

Alright @BlackLibrary,

 

I've looked into the errors, learnt a little C++ and talked to a mate.

 

The Dimmer.h looks like msg_ was not defined, so I defined it.

This is my version of Dimmer.h (just added const char* msg_; under char pin_; error went away).

#ifndef __DCSBIOS_DIMMER_H
#define __DCSBIOS_DIMMER_H

#include "Arduino.h"
#include "ExportStreamListener.h"

namespace DcsBios {

class Dimmer : public Int16Buffer {
	private:
		void onDcsBiosFrameSync();
		char pin_;
		const char* msg_;
	public:
		Dimmer(unsigned int address, char pin) : Int16Buffer(address){
			pin_ = pin;
		}
		virtual void loop() {
			if (hasUpdatedData()) {
				analogWrite(pin_, getData()/255);
				} 
			}
			
		//////////////////////////////////////////
		//	Inserted Code
		//
			void SetControl( const char* msg )
			{
				msg_ = msg;
			}

		};

}

#endif

 

As for Buttons.h, the offending code is part of the Button matrix definitions added I believe circa v0.2.14. I was able to fix it to a point. What I found was that under the MatActionButton Class, the ?object? was called ActionButton, (line 64) which is probably for the other (original) class in this file. I think it was getting a little confused. So I changed Line 64 ActionButton to MatActionButton to match the class name... Next was pin_ was still defined, but not used in the MatActionButton > Public class (line 67) so I deleted that. This got it working to a point, but in the MatAction class, it was still complaining of error: invalid types 'char[char]' for array subscript, for both rows 53 and 71 (70 after pins line deleted.). This is about the extent of my knowledge. So I have just commented out the entire MatActionButton class and it appears to compile, but soft errors remain form the switch matrices (I'm assuming this is due to not fully defining them at the moment.)

I hope this helps narrow it down a bit.

 

Cheers

Azza

 

p.s. If you would like me to post the Button.h file content let me know... didn't want to clog this post up too much.

Link to comment
Share on other sites

Hey Guys, i need help.

 

I have the files to make the new FW-190A8 work with bios.

 

But i need the correct name as screenshot.

like in this post:

https://forums.eagle.ru/showpost.php?p=3857185&postcount=948

 

so if anybody can help, that would be nice

Link to comment
Share on other sites

I'm improving on this, I have some 16 X 2 LCD panels working fine, however I'm now trying to get an LCD panel that is working with a backpack to do the same.

 

I'm compiling the sketch by essentially cannibalising previous working ones and splicing in the code, but have run up against a problem I am not experienced enough to understand.

 

Despite the same code being in a different sketch, at the end I have

 

void setup() {

 

lcd.begin(16, 2);

lcd.setBacklightPin(3,POSITIVE);

lcd.setBacklight(HIGH);

DcsBios::setup();

 

}

 

void loop() {

DcsBios::loop();

 

 

When compiling, it says 'setup' is not a member of 'DcsBios' and 'loop' is not a member of 'DscBios'

 

Can anyone de-mystify this for me?

 

Thanks!

 

Les

Link to comment
Share on other sites

  • Recently Browsing   0 members

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