You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you rapidly fire a CAG, KSP seems to just crash? Or at least that is the experiance that @TheDicko has been having.
The ideal solution would be for users to implement their own debouncing/rate limiting on the firing of CAG events. However, just to be sure, it would be best if this library were to implement such a thing, to avoid the need for users to worry about what may be causing such an odd issue in their controller, and consequentially spending many hours trying to hunt down a rather trivial bug.
The text was updated successfully, but these errors were encountered:
I could not reproduce the error to see if the debouncing corrects it.
Here is the Arduino code tested, no KSP crashed occured with KSP 1.10 and ActionGroupExtended v2.4.0.1.
The code waits for a SimPit connection and for the button connected to Arduino input 7 before spamming a toggle command for a CAG.
#include "KerbalSimpit.h"
KerbalSimpit mySimpit(Serial);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(7, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
while (!mySimpit.init()) {
delay(100);
}
digitalWrite(LED_BUILTIN, LOW);
while(digitalRead(7)){
delay(100);
}
digitalWrite(LED_BUILTIN, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
mySimpit.toggleCAG(1);
}
When you rapidly fire a CAG, KSP seems to just crash? Or at least that is the experiance that @TheDicko has been having.
The ideal solution would be for users to implement their own debouncing/rate limiting on the firing of CAG events. However, just to be sure, it would be best if this library were to implement such a thing, to avoid the need for users to worry about what may be causing such an odd issue in their controller, and consequentially spending many hours trying to hunt down a rather trivial bug.
The text was updated successfully, but these errors were encountered: