Merge remote-tracking branch 'upstream/master' into dev_ros

This commit is contained in:
Thomas Gubler
2014-12-02 12:25:03 +01:00
2 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -121,7 +121,7 @@ private:
/* for now, we only support one RGBLED */ /* for now, we only support one RGBLED */
namespace namespace
{ {
RGBLED *g_rgbled; RGBLED *g_rgbled = nullptr;
} }
void rgbled_usage(); void rgbled_usage();
@@ -680,14 +680,14 @@ rgbled_main(int argc, char *argv[])
ret = ioctl(fd, RGBLED_SET_MODE, (unsigned long)RGBLED_MODE_OFF); ret = ioctl(fd, RGBLED_SET_MODE, (unsigned long)RGBLED_MODE_OFF);
close(fd); close(fd);
exit(ret); /* delete the rgbled object if stop was requested, in addition to turning off the LED. */
}
if (!strcmp(verb, "stop")) { if (!strcmp(verb, "stop")) {
delete g_rgbled; delete g_rgbled;
g_rgbled = nullptr; g_rgbled = nullptr;
exit(0); exit(0);
} }
exit(ret);
}
if (!strcmp(verb, "rgb")) { if (!strcmp(verb, "rgb")) {
if (argc < 5) { if (argc < 5) {
@@ -263,7 +263,7 @@ int do_accel_calibration_measurements(int mavlink_fd, float accel_offs[3], float
const int samples_num = 2500; const int samples_num = 2500;
float accel_ref[6][3]; float accel_ref[6][3];
bool data_collected[6] = { false, false, false, false, false, false }; bool data_collected[6] = { false, false, false, false, false, false };
const char *orientation_strs[6] = { "front", "back", "left", "right", "top", "bottom" }; const char *orientation_strs[6] = { "back", "front", "left", "right", "up", "down" };
int sensor_combined_sub = orb_subscribe(ORB_ID(sensor_combined)); int sensor_combined_sub = orb_subscribe(ORB_ID(sensor_combined));
@@ -294,12 +294,12 @@ int do_accel_calibration_measurements(int mavlink_fd, float accel_offs[3], float
/* inform user which axes are still needed */ /* inform user which axes are still needed */
mavlink_log_info(mavlink_fd, "pending: %s%s%s%s%s%s", mavlink_log_info(mavlink_fd, "pending: %s%s%s%s%s%s",
(!data_collected[0]) ? "front " : "", (!data_collected[5]) ? "down " : "",
(!data_collected[1]) ? "back " : "", (!data_collected[0]) ? "back " : "",
(!data_collected[1]) ? "front " : "",
(!data_collected[2]) ? "left " : "", (!data_collected[2]) ? "left " : "",
(!data_collected[3]) ? "right " : "", (!data_collected[3]) ? "right " : "",
(!data_collected[4]) ? "up " : "", (!data_collected[4]) ? "up " : "");
(!data_collected[5]) ? "down " : "");
/* allow user enough time to read the message */ /* allow user enough time to read the message */
sleep(3); sleep(3);