Kenpilot Posted March 28 Share Posted March 28 Building the A10 CMSP and for the display, I copied the sketch from DCS Bios and its giving me an error code when I try to compile the sketch. error: 'onCmsp1Change' was not declared in this scope DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); error: 'onCmsp2Change' was not declared in this scope DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); I'm not familiar with the coding and language in the sketches, I just copy and paste, so please be gentle. Thanks! Windows 10 ASRock Z370 Extreme4 LGA 1151 (300 Series) MOBO intel i7-8700k (Not overclocked) 16 GB Ram EVGA GeForce GTX 108ti SC Black Edition SSD Trackir Link to comment Share on other sites More sharing options...
Vinc_Vega Posted March 28 Share Posted March 28 (edited) Hi Ken, to output the data, you cannot use the simplified code fragments. Unfortunately, it's a bit trickier. Within the sketch header you have to declare the display driver and then initialize it in the setup loop. If you don't know how to do this, please provide us with your display description (kind of driver) and how it is connected to your microcontroller (the wiring). For a simple 2x16 character LCD module the ->LiquidCrystal library<- should do most things for us. Please try the examples to ensure that the display works correctly for you. That kind of display mostly is initialized by the "lcd" object and you may print to either the first (0) or the second (1) line. The Arduino code in the DcsBios section than should look something like this: // ----- print CMSP Display Line 1 to the LCD display ----- void onCmsp1Change(char* newValue) { lcd.setCursor(0,0); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change); // ----- print CMSP Display Line 2 to the LCD display ----- void onCmsp2Change(char* newValue) { lcd.setCursor(0,1); lcd.print(newValue); } DcsBios::StringBuffer<19> cmsp2Buffer(0x1014, onCmsp2Change); Regards, Vinc Edited March 28 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
No1sonuk Posted March 28 Share Posted March 28 You need the whole box of code: void onCmsp1Change(char* newValue) { /* your code here */ } DcsBios::StringBuffer<19> cmsp1Buffer(A_10C_CMSP1_A, onCmsp1Change); The "void..." etc. part is what the "DcsBios::StringBuffer<19> cmsp1Buffer(0x1000, onCmsp1Change);" is looking for. BTW, it looks like you're using an old version of the library - did you see mine has "A_10C_CMSP1_A" in it? That's a new thing to make code updates easier. Link to comment Share on other sites More sharing options...
Vinc_Vega Posted March 28 Share Posted March 28 (edited) @No1sonuk How can we tell Bort to use the new library? Edit: I found no way to tell Bort to use the Addresses, instead of that control-reference seems to use those names: .../Saved Games/DCS.openbeta/Scripts/DCS-BIOS/doc/control-reference.html Regards, Vinc Edited March 28 by Vinc_Vega Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
No1sonuk Posted March 28 Share Posted March 28 @Vinc_Vega It's apparently not possible. Or at least, I didn't find a way to do it - I've raised an issue with the Bort dev. 1 Link to comment Share on other sites More sharing options...
Recommended Posts