MAVLink: Code style

This commit is contained in:
Lorenz Meier
2016-08-26 23:43:33 +02:00
parent e67a6bdfc2
commit 720c445f21
17 changed files with 922 additions and 627 deletions
@@ -80,6 +80,7 @@ MavlinkOrbSubscription::update(uint64_t *time, void *data)
// if topic was published between orb_stat and orb_copy calls.
uint64_t time_topic;
if (orb_stat(_fd, &time_topic)) {
/* error getting last topic publication time */
time_topic = 0;
@@ -90,11 +91,13 @@ MavlinkOrbSubscription::update(uint64_t *time, void *data)
/* error copying topic data */
memset(data, 0, _topic->o_size);
}
return false;
} else {
/* data copied successfully */
_published = true;
if (time_topic != *time) {
*time = time_topic;
return true;
@@ -115,6 +118,7 @@ bool
MavlinkOrbSubscription::update_if_changed(void *data)
{
bool updated;
if (orb_check(_fd, &updated)) {
return false;
}
@@ -128,6 +132,7 @@ MavlinkOrbSubscription::update_if_changed(void *data)
/* error copying topic data */
memset(data, 0, _topic->o_size);
}
return false;
}