Removed debug comments

This commit is contained in:
devbharat
2016-04-18 17:14:25 +02:00
committed by Lorenz Meier
parent cf7145c8d9
commit e70804c9d0
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1345,7 +1345,7 @@ 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 = (int64_t)(tsync.ts1 + now_ns - tsync.tc1*2)/2 ;
int64_t dt = _time_offset - offset_ns;
if (dt > 10000000LL || dt < -10000000LL) { // 10 millisecond skew
@@ -1995,7 +1995,7 @@ uint64_t MavlinkReceiver::sync_stamp(uint64_t usec)
}
void MavlinkReceiver::smooth_time_offset(uint64_t offset_ns)
void MavlinkReceiver::smooth_time_offset(int64_t offset_ns)
{
/* alpha = 0.6 fixed for now. The closer alpha is to 1.0,
* the faster the moving average updates in response to
+2 -2
View File
@@ -152,7 +152,7 @@ private:
/**
* Exponential moving average filter to smooth time offset
*/
void smooth_time_offset(uint64_t offset_ns);
void smooth_time_offset(int64_t offset_ns);
/**
* Decode a switch position from a bitfield
@@ -216,7 +216,7 @@ private:
struct vehicle_attitude_setpoint_s _att_sp;
struct vehicle_rates_setpoint_s _rates_sp;
double _time_offset_avg_alpha;
uint64_t _time_offset;
int64_t _time_offset;
int _orb_class_instance;
static constexpr unsigned MOM_SWITCH_COUNT = 8;