A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol
C arduinobluetoothcan-busdebuggingeepromesp32flipperzerogpiohardware-hackingi2cjtagopenocdprotocolspwmradiorfidspisubghzuartwifi
add a way to stop I2C scan in case it is stuck
Geo3ad69d317669
diff --git a/src/Controllers/I2cController.cpp b/src/Controllers/I2cController.cppindex 25b5d546..c409f934 100644--- a/src/Controllers/I2cController.cpp+++ b/src/Controllers/I2cController.cpp@@ -50,11 +50,17 @@ void I2cController::handleInstruction(const std::vector<ByteCode>& bytecodes) {}void I2cController::handleScan() {- terminalView.println("I2C Scan: Scanning I2C bus...");+ terminalView.println("I2C Scan: Scanning I2C bus... Press ENTER to stop");terminalView.println("");bool found = false;for (uint8_t addr = 1; addr < 127; ++addr) {+ char key = terminalInput.readChar();+ if (key == '\r' || key == '\n') {+ terminalView.println("I2C Scan: Cancelled by user.");+ return;+ }+i2cService.beginTransmission(addr);if (i2cService.endTransmission() == 0) {std::stringstream ss;