A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol
C arduinobluetoothcan-busdebuggingeepromesp32flipperzerogpiohardware-hackingi2cjtagopenocdprotocolspwmradiorfidspisubghzuartwifi
rework stick input
Geo8ae27cdf38a6
diff --git a/src/Inputs/StickInput.cpp b/src/Inputs/StickInput.cppindex 12ffe9a5..5d06ce32 100644--- a/src/Inputs/StickInput.cpp+++ b/src/Inputs/StickInput.cpp@@ -1,3 +1,5 @@+#ifdef DEVICE_M5STICK+#include "StickInput.h"StickInput::StickInput() {@@ -8,7 +10,8 @@ char StickInput::mapButton() {M5.update();if (M5.BtnA.wasPressed()) return KEY_OK;- if (M5.BtnB.wasPressed()) return KEY_RETURN_CUSTOM;+ if (M5.BtnB.wasPressed()) return KEY_ARROW_LEFT;+ if (M5.BtnPWR.wasPressed()) return KEY_ARROW_RIGHT;return KEY_NONE;}@@ -30,3 +33,5 @@ void StickInput::waitPress() {delay(10);}}++#endif\ No newline at end of filediff --git a/src/Inputs/StickInput.h b/src/Inputs/StickInput.hindex 7180efcf..f4459ad5 100644--- a/src/Inputs/StickInput.h+++ b/src/Inputs/StickInput.h@@ -1,11 +1,14 @@#pragma once+#ifdef DEVICE_M5STICK++#include <M5Unified.h>#include <Arduino.h>#include "Interfaces/IInput.h"#include "InputKeys.h"-// Classe pour gérer les entrées sur M5Stick (BtnA / BtnB)+// M5Stick C PLUS 2 inputsclass StickInput : public IInput {public:StickInput();@@ -17,3 +20,5 @@ public:private:char mapButton(); // Associe un bouton à une touche logique};++#endif\ No newline at end of file