Merge pull request #3278 from erikd/driver_framework

Driver framework
This commit is contained in:
Lorenz Meier 2015-11-27 08:15:51 +01:00
commit 2341d56927
3 changed files with 14 additions and 11 deletions

View File

@ -1183,8 +1183,7 @@ MavlinkReceiver::handle_message_heartbeat(mavlink_message_t *msg)
tstatus.heartbeat_time = tstatus.timestamp;
if (_telemetry_status_pub == nullptr) {
int multi_instance;
_telemetry_status_pub = orb_advertise_multi(ORB_ID(telemetry_status), &tstatus, &multi_instance, ORB_PRIO_HIGH);
_telemetry_status_pub = orb_advertise_multi(ORB_ID(telemetry_status), &tstatus, NULL, ORB_PRIO_HIGH);
} else {
orb_publish(ORB_ID(telemetry_status), _telemetry_status_pub, &tstatus);
@ -1837,10 +1836,12 @@ MavlinkReceiver::receive_thread(void *arg)
}
}
/* count received bytes */
/* count received bytes (nread will be -1 on read error) */
if (nread > 0) {
_mavlink->count_rxbytes(nread);
}
}
}
return NULL;
}

View File

@ -380,6 +380,7 @@ int position_estimator_inav_thread_main(int argc, char *argv[])
orb_advert_t vehicle_global_position_pub = NULL;
struct position_estimator_inav_params params;
memset(&params, 0, sizeof(params));
struct position_estimator_inav_param_handles pos_inav_param_handles;
/* initialize parameter handles */
inav_parameters_init(&pos_inav_param_handles);

View File

@ -542,6 +542,7 @@ Sensors::Sensors() :
memset(&_rc, 0, sizeof(_rc));
memset(&_diff_pres, 0, sizeof(_diff_pres));
memset(&_parameters, 0, sizeof(_parameters));
memset(&_rc_parameter_map, 0, sizeof(_rc_parameter_map));
/* basic r/c parameters */