examples fix code style

This commit is contained in:
Daniel Agar
2015-03-19 23:49:36 +01:00
committed by Lorenz Meier
parent 0eaf41a048
commit 662ec3f62f
11 changed files with 201 additions and 188 deletions
+11 -1
View File
@@ -267,18 +267,27 @@ int rover_steering_control_thread_main(int argc, char *argv[])
/* subscribe to topics. */
int att_sub = orb_subscribe(ORB_ID(vehicle_attitude));
int global_pos_sub = orb_subscribe(ORB_ID(vehicle_global_position));
int manual_sp_sub = orb_subscribe(ORB_ID(manual_control_setpoint));
int vstatus_sub = orb_subscribe(ORB_ID(vehicle_status));
int att_sp_sub = orb_subscribe(ORB_ID(vehicle_attitude_setpoint));
int param_sub = orb_subscribe(ORB_ID(parameter_update));
/* Setup of loop */
struct pollfd fds[2];
fds[0].fd = param_sub;
fds[0].events = POLLIN;
fds[1].fd = att_sub;
fds[1].events = POLLIN;
while (!thread_should_exit) {
@@ -371,6 +380,7 @@ int rover_steering_control_thread_main(int argc, char *argv[])
for (unsigned i = 0; i < (sizeof(actuators.control) / sizeof(actuators.control[0])); i++) {
actuators.control[i] = 0.0f;
}
actuators.timestamp = hrt_absolute_time();
orb_publish(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_pub, &actuators);
@@ -421,7 +431,7 @@ int rover_steering_control_main(int argc, char *argv[])
SCHED_PRIORITY_MAX - 20,
2048,
rover_steering_control_thread_main,
(argv) ? (char *const *)&argv[2] : (char *const *)NULL);
(argv) ? (char * const *)&argv[2] : (char * const *)NULL);
thread_running = true;
exit(0);
}