Apoth Posted November 13, 2022 Posted November 13, 2022 Hello guys! I working on my MiG-21 home cockpit, and just realized a problem on the DCS-BIOS side. I just wiring the main AZS panel (right side switches) and i experiencing problems on some buttons. Seems like the DCS-BIOS not alwys send the events in few buttons, eg.: DcsBios::Switch2Pos conePwr("CONE_PWR", 22); // Always stable DcsBios::Switch2Pos emrHydPump("EMR_HYD_PUMP", 24); // Sends 1-2 events on 10 up-down clicks DcsBios::Switch2Pos trmPwr("TRM_PWR", 26); // Sends 5-6 events in 10 up-down clicks DcsBios::Switch2Pos sauPitchPwr("SAU_PITCH_PWR", 42); // Always stable DcsBios::Switch2Pos arcPwr("ARC_PWR", 30); // Sends very few events, some times turn on and off immediately on up click DcsBios::Switch2Pos raltPwr("RALT_PWR", 32); // Sends very few events, some times turn on and off immediately on up click I double checked all wiring from the switches to the arduino. Someone experienced this (or similar) problem? This is solvable somehow? Thanks a lot! Apoth
Apoth Posted November 13, 2022 Author Posted November 13, 2022 UPDATE! I looking the Serial Monitor, and see this: // Trim Power SW turn on 16:48:28.557 -> TRM_PWR 1 16:48:28.557 -> TRM_PWR 0 16:48:28.592 -> TRM_PWR 1 16:48:28.592 -> TRM_PWR 0 16:48:28.592 -> TRM_PWR 1 // Trim Power SW turn off 16:50:22.311 -> TRM_PWR 0 Seems like some kind of hysteresis during the change of the switch?
Apoth Posted November 13, 2022 Author Posted November 13, 2022 Ok, i solved the problem. Ugly, but seems work void loop() { DcsBios::loop(); delay(20); } Later i will change the delay to some timer based solution. Thanks! Apoth
Recommended Posts