Fork to see if I can get working

Dependencies:   BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated

Fork of xDotBridge_update_test20180823 by Matt Briggs

Revision:
62:9751a8504c82
Child:
64:46c8819c07cc
diff -r 8d9efd33cac9 -r 9751a8504c82 xDotBridge/inc/UserInterface.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xDotBridge/inc/UserInterface.h	Tue Mar 14 08:32:55 2017 -0600
@@ -0,0 +1,41 @@
+/*
+ * UserInterface.h
+ *
+ *  Created on: Feb 28, 2017
+ *      Author: mbriggs
+ */
+
+#ifndef XDOTBRIDGE_INC_USERINTERFACE_H_
+#define XDOTBRIDGE_INC_USERINTERFACE_H_
+
+#include <stdint.h>
+#include "BaseboardIO.h"
+
+const float RX_PAIR_WAIT_TIME = 30.0;
+const float TX_ACCEPT_WAIT_TIME = 10.0;
+
+enum PairBtnState {
+    pairBtnShortPress,
+    pairBtnMediumPress,
+    pairBtnLongPress
+};
+
+class PairBtnInterp {
+public:
+    // Start time < press time < stop time (all time in ms)
+    static const uint16_t ShortPressStartTime = 0;
+    static const uint16_t ShortPressStopTime = 4000;
+    static const uint16_t MediumPressStartTime = 4000;
+    static const uint16_t MediumPressStopTime  = 9000;
+    // Anything longer is a LongPress
+
+    static PairBtnState read(BaseboardIO *bbio);
+};
+
+class HoldTimeSetting {
+public:
+    static uint32_t rotVal2Msec(uint8_t in);
+    static float rotVal2Sec(uint8_t in) {return rotVal2Msec(in)/1000.0;}
+};
+
+#endif /* XDOTBRIDGE_INC_USERINTERFACE_H_ */