electricaltill Posted August 20, 2019 Share Posted August 20, 2019 (edited) I am just starting out with the 0.2.18 Arduino library, but I can't compile my sketch as the IDE is saying there is an error in the library itself: In file included from C:\Users\David\Desktop\f14\f14.ino:1:0: C:\Users\David\Documents\Arduino\libraries\dcs-bios-arduino-library-0.2.18\src/DcsBios.h: In function 'bool DcsBios::sendDcsBiosMessage(const char*, const char*)': C:\Users\David\Documents\Arduino\libraries\dcs-bios-arduino-library-0.2.18\src/DcsBios.h:136:10: error: 'tryToSendDcsBiosMessage' is not a member of 'DcsBios' while(!DcsBios::tryToSendDcsBiosMessage(msg, arg)); ^ C:\Users\David\Documents\Arduino\libraries\dcs-bios-arduino-library-0.2.18\src/DcsBios.h:136:10: note: suggested alternative: In file included from C:\Users\David\Documents\Arduino\libraries\dcs-bios-arduino-library-0.2.18\src/DcsBios.h:15:0, from C:\Users\David\Desktop\f14\f14.ino:1: C:\Users\David\Documents\Arduino\libraries\dcs-bios-arduino-library-0.2.18\src/internal/PollingInput.h:6:6: note: 'tryToSendDcsBiosMessage' bool tryToSendDcsBiosMessage(const char* msg, const char* args);I tried looking for the error message but didn't get anywhere. I have some programming knowledge but this is my first time using whatever language this is so I'm still trying to unpick it. The key bit seems to be 'tryToSendDcsBiosMessage' is not a member of 'DcsBios'. I've tried to usual restart the program, restart windows, remove the library and reinstall but it hasn't helped. EDIT: fixed by adding missing definition for DCSBIOS_DEFAULT_SERIAL Edited August 20, 2019 by electricaltill Link to comment Share on other sites More sharing options...
raptor909 Posted November 1, 2019 Share Posted November 1, 2019 Can you share code please ?? Hi I have the same issue but after adding missing definition for DCSBIOS_DEFAULT_SERIAL the issue remain. I try to make this but the Arduino IDE give me always error after compiling. Can you help me plz? This is my code #include <Wire.h> #include <Servo.h> #include <LiquidCrystal_I2C.h> #include <DcsBios.h> #define LED_PIN 3 #define DCSBIOS_DEFAULT_SERIAL LiquidCrystal_I2C lcd(0x27, 16, 2); void onUhfFrequencyChange(char* newValue) { lcd.setCursor(0, 0); lcd.print(newValue); } DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange); void onClockHhChange(char* newValue) { lcd.setCursor(0, 1); lcd.print(newValue); } DcsBios::StringBuffer<2> clockHhBuffer(0x10fe, onClockHhChange); void onClockMmChange(char* newValue) { lcd.setCursor(3, 1); lcd.print(newValue); } DcsBios::StringBuffer<2> clockMmBuffer(0x1100, onClockMmChange); void onClockSsChange(char* newValue) { lcd.setCursor(6, 1); lcd.print(newValue); } DcsBios::StringBuffer<2> clockSsBuffer(0x1102, onClockSsChange); void onClockEtcChange(char* newValue) { lcd.setCursor(9, 1); lcd.print(newValue); } DcsBios::StringBuffer<3> clockEtcBuffer(0x1104, onClockEtcChange); DcsBios::ProtocolParser parser; void setup() { Serial.begin(500000); lcd.backlight(); pinMode(LED_PIN, OUTPUT); analogWrite(LED_PIN, 50); lcd.init(); lcd.clear(); // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: } A-10C | A-10C II | F/A-18C | F16C | AV-8B | FW-190 A-8 | MB339 | A-4E | CA [sIGPIC][/sIGPIC] https://simitaliagames.com/dcs/ Link to comment Share on other sites More sharing options...
FSFIan Posted November 1, 2019 Share Posted November 1, 2019 The #define for the communication mode (DCSBIOS_DEFAULT_SERIAL etc.) needs to be placed before the "#include <DcsBios.h>" line. If you are on an Arduino board with an ATMega328 or ATMega2560 (Uno, Nano, Pro Mini, many others), use DCSBIOS_IRQ_SERIAL instead, it is much more reliable. DEFAULT_SERIAL mode is for compatibility with "Arduino-compatible" boards and needs a faster CPU to be reliable when your loop() is doing a lot of work. It might make sense if you need to drive a large graphical display and want to use a board with an ARM processor or something. For the vast majority of use cases, it's best to stick with boards that can use DCSBIOS_IRQ_SERIAL mode. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
raptor909 Posted November 2, 2019 Share Posted November 2, 2019 (edited) Code ok but ... First of all Hi and thanks for your patience. So with DCSBIOS_DEFAULT_SERIAL mode before #include <DcsBios.h>" line, the sketch is ok and uploaded correctly to board but appears nothing on display :(:(:( - see image attached. With DCSBIOS_IRQ_SERIAL mode give me this error: HardwareSerial0.cpp.o (symbol from plugin): In function `Serial': (.text+0x0): multiple definition of `__vector_18' C:\Users\...\AppData\Local\Temp\buildf609cf24e499ea4eca143c471bfeee27.tmp\sketch\i2c_dcsbios.ino.ino.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here collect2.exe: error: ld returned 1 exit status I tried different speed baud rate (115k, 250k) but the issue remain I use an Arduino One not original but an Elegoo compatible and a I2C board. I tried with switch 2 or 3 pos and is ok, tried with servo and potentiometers and is ok. I try to upload a simple sketch like "Hello World" and appear correctly on display. I have big problem with display. Can you help me again plz. Thanks a lot ___________________________________________ SOLVED !!! Just delete line Serial.begin(500000); ___________________________________________ Edited November 3, 2019 by raptor909 A-10C | A-10C II | F/A-18C | F16C | AV-8B | FW-190 A-8 | MB339 | A-4E | CA [sIGPIC][/sIGPIC] https://simitaliagames.com/dcs/ Link to comment Share on other sites More sharing options...
Recommended Posts