aboutsummaryrefslogtreecommitdiff
path: root/source/HoverBitController.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/HoverBitController.h')
-rw-r--r--source/HoverBitController.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/HoverBitController.h b/source/HoverBitController.h
index 4963cd1..477e96e 100644
--- a/source/HoverBitController.h
+++ b/source/HoverBitController.h
@@ -27,7 +27,9 @@ DEALINGS IN THE SOFTWARE.
#include <MicroBit.h>
-#define BATTERY_LOW_LIMIT 3500
+#define BATTERY_LOW_LIMIT 3500
+#define FSAFE_TLIM_THROTTLE 1000 // When to cut the throttle
+#define FSAFE_TLIM_ARM 5000 // When to disarm
class HoverBitController {
private:
@@ -40,16 +42,17 @@ class HoverBitController {
int pitch;
int yaw;
int throttle;
- int failSafeC;
+ unsigned long receiveTime;
bool mainController;
bool batteryEmpty;
int batteryMilliVolt;
float batteryFactor;
+ bool failSafe(void);
+
public:
void init(MicroBit* _uBit);
- void failSafe(void);
unsigned int getBatteryVoltage(void);
void AirBit(int Pitch,int Arm,int Roll,int Throttle,int Yaw,int Aux1,int Aux2);
void HoverControl();