launchdetection: rename pre takeoff throttle param and fix usage

This commit is contained in:
Thomas Gubler
2014-01-05 14:19:19 +01:00
parent d1e991f1f0
commit f387c0ccc3
4 changed files with 17 additions and 7 deletions
+2 -2
View File
@@ -44,7 +44,7 @@
LaunchDetector::LaunchDetector() :
launchdetection_on(NULL, "LAUN_ALL_ON", false),
throttle_min(NULL, "LAUN_THR_MIN", false)
throttlePreTakeoff(NULL, "LAUN_THR_PRE", false)
{
/* init all detectors */
launchMethods[0] = new CatapultLaunchMethod();
@@ -85,7 +85,7 @@ void LaunchDetector::updateParams() {
warnx(" LaunchDetector::updateParams()");
launchdetection_on.update();
throttle_min.update();
throttlePreTakeoff.update();
for (uint8_t i = 0; i < sizeof(launchMethods)/sizeof(LaunchMethod); i++) {
launchMethods[i]->updateParams();
+2 -2
View File
@@ -59,14 +59,14 @@ public:
void updateParams();
bool launchDetectionEnabled() { return (bool)launchdetection_on.get(); };
float getMinThrottle() {return throttle_min.get(); }
float getThrottlePreTakeoff() {return throttlePreTakeoff.get(); }
// virtual bool getLaunchDetected();
protected:
private:
LaunchMethod* launchMethods[1];
control::BlockParamInt launchdetection_on;
control::BlockParamFloat throttle_min;
control::BlockParamFloat throttlePreTakeoff;
};
@@ -69,4 +69,4 @@ PARAM_DEFINE_FLOAT(LAUN_CAT_T, 0.05f);
// @DisplayName Throttle setting while detecting the launch
// @Description The throttle is set to this value while the system is waiting for the takeoff
// @Range 0 to 1
PARAM_DEFINE_FLOAT(LAUN_THR_MIN, 0.0f);
PARAM_DEFINE_FLOAT(LAUN_THR_PRE, 0.0f);