From 3d7afaafbd5559cdc8030736de8b04c93775e5a4 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 20 Dec 2017 15:49:48 -0500 Subject: [PATCH] launchdetection use BlockParamBool for LAUN_ALL_ON --- src/lib/launchdetection/LaunchDetector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/launchdetection/LaunchDetector.h b/src/lib/launchdetection/LaunchDetector.h index 1c0f0122a3..98af290aae 100644 --- a/src/lib/launchdetection/LaunchDetector.h +++ b/src/lib/launchdetection/LaunchDetector.h @@ -61,7 +61,7 @@ public: void update(float accel_x); LaunchDetectionResult getLaunchDetected(); - bool launchDetectionEnabled() { return launchdetection_on.get() == 1; } + bool launchDetectionEnabled() { return launchdetection_on.get(); } /* Returns a maximum pitch in deg. Different launch methods may impose upper pitch limits during launch */ float getPitchMax(float pitchMaxDefault); @@ -77,7 +77,7 @@ private: LaunchMethod *launchMethods[1]; - control::BlockParamInt launchdetection_on; + control::BlockParamBool launchdetection_on; }; } // namespace launchdetection