[chronojump/michrolab: 53/57] Added header ForceSensor.h




commit 15a28b6ad36dcda83358af352f4ac4c45494b402
Author: xpadulles <x padulles gmail com>
Date:   Tue May 24 11:20:00 2022 +0200

    Added header ForceSensor.h

 arduino/ForceSensorTFT/ForceSensorTFT.h   | 7 +++++++
 arduino/ForceSensorTFT/ForceSensorTFT.ino | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/arduino/ForceSensorTFT/ForceSensorTFT.h b/arduino/ForceSensorTFT/ForceSensorTFT.h
new file mode 100644
index 000000000..4ddaa451d
--- /dev/null
+++ b/arduino/ForceSensorTFT/ForceSensorTFT.h
@@ -0,0 +1,7 @@
+typedef void (*functionPointer) (void);
+
+struct menuEntry {
+    String title;
+    String description;
+    functionPointer function;
+};
diff --git a/arduino/ForceSensorTFT/ForceSensorTFT.ino b/arduino/ForceSensorTFT/ForceSensorTFT.ino
index de06c28d5..7394b6a26 100644
--- a/arduino/ForceSensorTFT/ForceSensorTFT.ino
+++ b/arduino/ForceSensorTFT/ForceSensorTFT.ino
@@ -1857,7 +1857,7 @@ void showMenu()
     if (redButton.fallingEdge())
     {
       PcControlled = false;
-      currentMenu[currentMenuIndex].function(true);
+      currentMenu[currentMenuIndex].function();
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]