Fix backtick back button to work reliably, improve Terminal Shell responsiveness, enhance HID Injector feedback

This commit is contained in:
Claude
2026-09-26 00:12:22 +00:00
parent b76f016bcd
commit c6dfc19578
3 changed files with 12 additions and 8 deletions

View File

@@ -21,12 +21,13 @@ public:
void onEnter() override {
active = false;
sent = 0;
say("HID ready, plug USB host");
say("HID ready");
#ifdef HAVE_TINYSB
if (tud_mounted()) {
active = true;
sent = 0;
say("Host detected - injecting");
say("Host detected!");
say("Injecting...");
}
#endif
}

View File

@@ -43,10 +43,13 @@ public:
void tick() override {
if (!connected) return;
while (ser.available()) {
uint32_t start = millis();
while (ser.available() && millis() - start < 10) {
char c = ser.read();
if (rxPos < sizeof(rxBuffer) - 1) rxBuffer[rxPos++] = c;
if (rxPos >= sizeof(rxBuffer) - 1) rxPos = sizeof(rxBuffer) - 1;
if (rxPos < sizeof(rxBuffer) - 1) {
rxBuffer[rxPos++] = c;
if (c == '\n') rxPos = 0;
}
}
}