aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-04-28 11:41:48 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-04-28 11:41:48 +0200
commitdf8fb7d2dc645070ebb5fae3324ac6533f4ab7a3 (patch)
tree32269d8abd75d53b7e5a5531bc83fc69b079f6d6 /src/drivers
parent0745334ac46c40ed407dc11ebbb7c252e37bcb43 (diff)
parentf7065dce84118054c68aa87def70e861da73cdfd (diff)
downloadpx4-firmware-df8fb7d2dc645070ebb5fae3324ac6533f4ab7a3.tar.gz
px4-firmware-df8fb7d2dc645070ebb5fae3324ac6533f4ab7a3.tar.bz2
px4-firmware-df8fb7d2dc645070ebb5fae3324ac6533f4ab7a3.zip
Merge branch 'ekf_params' of github.com:PX4/Firmware into ekf_params
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/frsky_telemetry/frsky_data.c2
-rw-r--r--src/drivers/gps/gps.cpp6
-rw-r--r--src/drivers/mkblctrl/mkblctrl.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/frsky_telemetry/frsky_data.c b/src/drivers/frsky_telemetry/frsky_data.c
index cfcf91e3f..57a03bc84 100644
--- a/src/drivers/frsky_telemetry/frsky_data.c
+++ b/src/drivers/frsky_telemetry/frsky_data.c
@@ -225,7 +225,7 @@ void frsky_send_frame2(int uart)
float course = 0, lat = 0, lon = 0, speed = 0, alt = 0;
char lat_ns = 0, lon_ew = 0;
int sec = 0;
- if (global_pos.global_valid) {
+ if (global_pos.timestamp != 0 && hrt_absolute_time() < global_pos.timestamp + 20000) {
time_t time_gps = global_pos.time_gps_usec / 1000000;
struct tm *tm_gps = gmtime(&time_gps);
diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp
index a902bdf2f..01be80dce 100644
--- a/src/drivers/gps/gps.cpp
+++ b/src/drivers/gps/gps.cpp
@@ -276,14 +276,14 @@ GPS::task_main()
_report.timestamp_position = hrt_absolute_time();
_report.lat = (int32_t)47.378301e7f;
_report.lon = (int32_t)8.538777e7f;
- _report.alt = (int32_t)400e3f;
+ _report.alt = (int32_t)1200e3f;
_report.timestamp_variance = hrt_absolute_time();
_report.s_variance_m_s = 10.0f;
_report.p_variance_m = 10.0f;
_report.c_variance_rad = 0.1f;
_report.fix_type = 3;
- _report.eph_m = 3.0f;
- _report.epv_m = 7.0f;
+ _report.eph_m = 0.9f;
+ _report.epv_m = 1.8f;
_report.timestamp_velocity = hrt_absolute_time();
_report.vel_n_m_s = 0.0f;
_report.vel_e_m_s = 0.0f;
diff --git a/src/drivers/mkblctrl/mkblctrl.cpp b/src/drivers/mkblctrl/mkblctrl.cpp
index 705e98eea..3cb9abc49 100644
--- a/src/drivers/mkblctrl/mkblctrl.cpp
+++ b/src/drivers/mkblctrl/mkblctrl.cpp
@@ -1015,7 +1015,7 @@ MK::pwm_ioctl(file *filp, int cmd, unsigned long arg)
case PWM_SERVO_GET(0) ... PWM_SERVO_GET(_max_actuators - 1):
/* copy the current output value from the channel */
- *(servo_position_t *)arg = Motor[cmd - PWM_SERVO_SET(0)].RawPwmValue;
+ *(servo_position_t *)arg = Motor[cmd - PWM_SERVO_GET(0)].RawPwmValue;
break;