diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-30 00:35:47 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-30 00:35:47 +0200 |
commit | 6f75d1a20f6c66a8bfb87032048d1369d01fbb5e (patch) | |
tree | 6bedca6af46742c7cc5742693e77a1bea53eddfc /src/modules | |
parent | 4796c0350e817d7316e8bb135df04796bc0f3330 (diff) | |
parent | 2448e2adbc22af348aa799473c30ac5f1cba9cd0 (diff) | |
download | px4-firmware-6f75d1a20f6c66a8bfb87032048d1369d01fbb5e.tar.gz px4-firmware-6f75d1a20f6c66a8bfb87032048d1369d01fbb5e.tar.bz2 px4-firmware-6f75d1a20f6c66a8bfb87032048d1369d01fbb5e.zip |
Merge pull request #1093 from DonLakeFlyer/WarningsBugs
Fix bugs found through compiler warnings
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/commander/commander.cpp | 1 | ||||
-rw-r--r-- | src/modules/ekf_att_pos_estimator/estimator.cpp | 2 | ||||
-rw-r--r-- | src/modules/ekf_att_pos_estimator/estimator.h | 2 | ||||
-rw-r--r-- | src/modules/gpio_led/gpio_led.c | 7 |
4 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 1535967b1..aa243d79b 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -603,6 +603,7 @@ bool handle_command(struct vehicle_status_s *status, const struct safety_s *safe // XXX TODO } + return true; } int commander_thread_main(int argc, char *argv[]) diff --git a/src/modules/ekf_att_pos_estimator/estimator.cpp b/src/modules/ekf_att_pos_estimator/estimator.cpp index 1320b4668..f8b9e9fbd 100644 --- a/src/modules/ekf_att_pos_estimator/estimator.cpp +++ b/src/modules/ekf_att_pos_estimator/estimator.cpp @@ -1986,7 +1986,7 @@ void AttPosEKF::calcposNED(float (&posNED)[3], double lat, double lon, float hgt posNED[2] = -(hgt - hgtRef); } -void AttPosEKF::calcLLH(float (&posNED)[3], float lat, float lon, float hgt, float latRef, float lonRef, float hgtRef) +void AttPosEKF::calcLLH(float posNED[3], float &lat, float &lon, float &hgt, float latRef, float lonRef, float hgtRef) { lat = latRef + posNED[0] * earthRadiusInv; lon = lonRef + posNED[1] * earthRadiusInv / cos(latRef); diff --git a/src/modules/ekf_att_pos_estimator/estimator.h b/src/modules/ekf_att_pos_estimator/estimator.h index e821089f2..69d8cfce8 100644 --- a/src/modules/ekf_att_pos_estimator/estimator.h +++ b/src/modules/ekf_att_pos_estimator/estimator.h @@ -301,7 +301,7 @@ static void calcvelNED(float (&velNED)[3], float gpsCourse, float gpsGndSpd, flo static void calcposNED(float (&posNED)[3], double lat, double lon, float hgt, double latRef, double lonRef, float hgtRef); -static void calcLLH(float (&posNED)[3], float lat, float lon, float hgt, float latRef, float lonRef, float hgtRef); +static void calcLLH(float posNED[3], float &lat, float &lon, float &hgt, float latRef, float lonRef, float hgtRef); static void quat2Tnb(Mat3f &Tnb, const float (&quat)[4]); diff --git a/src/modules/gpio_led/gpio_led.c b/src/modules/gpio_led/gpio_led.c index 839a7890b..7758faed7 100644 --- a/src/modules/gpio_led/gpio_led.c +++ b/src/modules/gpio_led/gpio_led.c @@ -181,16 +181,13 @@ int gpio_led_main(int argc, char *argv[]) } else { gpio_led_started = true; warnx("start, using pin: %s", pin_name); + exit(0); } - - exit(0); - - } else if (!strcmp(argv[1], "stop")) { if (gpio_led_started) { gpio_led_started = false; warnx("stop"); - + exit(0); } else { errx(1, "not running"); } |