No1sonuk Posted September 29, 2021 Posted September 29, 2021 Hey all. Any ideas if sendDcsBiosMessage works with FP's DCS-BIOS and the Mosquito? I've been trying to debug some code and am trying to these to indicate the state of a flag in my code: sendDcsBiosMessage("PORT_RAD_FLAP","1"); sendDcsBiosMessage("PORT_RAD_FLAP","0"); I know there's a simple switch function for the port radiator flaps, and that works, but this function is not what I need. I'm trying to use sendDcsBiosMessage for another function, and I wanted to use that switch as an in-game indication that my code is working. The problem is that the switch in-game doesn't respond to either of those lines. Am I using that function incorrectly? It's not specifically documented anywhere, and What I've tried is gleaned from "passing comments" on this forum.
No1sonuk Posted October 1, 2021 Author Posted October 1, 2021 UPDATE: It seems I am using it correctly. I've tried sendDcsBiosMessage on a few other Mosquito functions as well and they don't work either. These DO work on the P-51: sendDcsBiosMessage("BAT","1"); sendDcsBiosMessage("BAT","0"); And this works on the Mosquito: DcsBios::Switch2Pos portRadFlap("PORT_RAD_FLAP", PIN); So it seems it is a bug with sendDcsBiosMessage on the Mosquito. I've reported it on Discord (I'm not signed up to Github).
BlackLibrary Posted October 2, 2021 Posted October 2, 2021 (edited) Mossie itself works with sendBIOS also i tested some switches they work too. like STBD_RAD_FLAP, FUEL_PUMP_SW and 2 others were i forgot the name Mossie motors running on parkspot nothing changed, latest release of FP fork also tested P-51D-25 and F-14B full sketch: #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> void onAcftNameChange(char* newValue) { // Change of Aircraft DcsBios::resetAllStates(); } DcsBios::StringBuffer<24> AcftNameBuffer(0x0000, onAcftNameChange); void setup() { DcsBios::setup(); } void loop() { sendDcsBiosMessage("PORT_RAD_FLAP","0"); delay(500); sendDcsBiosMessage("PORT_RAD_FLAP","1"); delay(500); } Edited October 2, 2021 by BlackLibrary aka WarLord DCSFlightpanels DCS-BIOS Fork DCSFlightpanels arduino-library DCSFlightpanels DCSFlightpanels-Profiles DCS FP / BIOS Discord Server
No1sonuk Posted October 2, 2021 Author Posted October 2, 2021 Thanks. I figured out I was calling the sendDcsBiosMessage function repeating too quickly. With a bit of delay between calls it works fine.
Recommended Posts