A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol
C arduinobluetoothcan-busdebuggingeepromesp32flipperzerogpiohardware-hackingi2cjtagopenocdprotocolspwmradiorfidspisubghzuartwifi
Make the same change to handleMeasure as made to handleSniff
fdufnews6bf934a7da92
diff --git a/src/Controllers/DioController.cpp b/src/Controllers/DioController.cppindex 11de199e..4eb03b5b 100644--- a/src/Controllers/DioController.cpp+++ b/src/Controllers/DioController.cpp@@ -252,7 +252,24 @@ void DioController::handleMeasure(const TerminalCommand& cmd) {terminalView.println("DIO EdgeCount: Sampling pin " + std::to_string(pin) +" for " + std::to_string(durationMs) + " ms...");- pinService.setInput(pin);+ PinService::pullType pull = pinService.getPullType(pin);++ switch (pull)+ {+ case PinService::NOPULL:+ pinService.setInput(pin);+ break;+ case PinService::PULL_UP:+ pinService.setInputPullup(pin);+ break;+ case PinService::PULL_DOWN:+ pinService.setInputPullDown(pin);+ break;++ default:+ break;+ }+int last = pinService.read(pin);uint32_t rising = 0, falling = 0;@@ -453,4 +470,4 @@ bool DioController::isPinAllowed(uint8_t pin, const std::string& context) {}return true;-}\ No newline at end of file+}