Fix backtick back button to work reliably, improve Terminal Shell responsiveness, enhance HID Injector feedback
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user