diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-28 07:58:42 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-28 16:31:41 +0100 |
commit | 2d124852c1881d5b993b3c2ec9f7a79e1e03da1b (patch) | |
tree | e8ef94b9255f78418d4da12d206b024cb2abfcff /src/modules/mavlink/mavlink_receiver.cpp | |
parent | 01835a51a8a3a0b0f7e7362cdc25475bd029a9a8 (diff) | |
download | px4-firmware-2d124852c1881d5b993b3c2ec9f7a79e1e03da1b.tar.gz px4-firmware-2d124852c1881d5b993b3c2ec9f7a79e1e03da1b.tar.bz2 px4-firmware-2d124852c1881d5b993b3c2ec9f7a79e1e03da1b.zip |
propagate uorb contants change through all modules/drivers
Diffstat (limited to 'src/modules/mavlink/mavlink_receiver.cpp')
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 2e28a6d2c..b1ba91cac 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -617,7 +617,7 @@ MavlinkReceiver::handle_message_set_position_target_local_ned(mavlink_message_t pos_sp_triplet.previous.valid = false; pos_sp_triplet.next.valid = false; pos_sp_triplet.current.valid = true; - pos_sp_triplet.current.type = SETPOINT_TYPE_POSITION; //XXX support others + pos_sp_triplet.current.type = position_setpoint_s::SETPOINT_TYPE_POSITION; //XXX support others /* set the local pos values if the setpoint type is 'local pos' and none * of the local pos fields is set to 'ignore' */ @@ -986,10 +986,10 @@ MavlinkReceiver::handle_message_timesync(mavlink_message_t *msg) } else if (tsync.tc1 > 0) { - int64_t offset_ns = (tsync.ts1 + now_ns - tsync.tc1*2)/2 ; + int64_t offset_ns = (tsync.ts1 + now_ns - tsync.tc1*2)/2 ; int64_t dt = _time_offset - offset_ns; - if (dt > 10000000LL || dt < -10000000LL) { // 10 millisecond skew + if (dt > 10000000LL || dt < -10000000LL) { // 10 millisecond skew _time_offset = offset_ns; warnx("[timesync] Hard setting offset."); } else { |