From d4e6a9d7a1e448a5cc55436c0bb5f951694bc46e Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 17 Oct 2012 15:10:04 +0200 Subject: Minor code style fixes, removed dead code --- apps/mavlink/orb_listener.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'apps/mavlink/orb_listener.c') diff --git a/apps/mavlink/orb_listener.c b/apps/mavlink/orb_listener.c index 39358922d..63a39e4ee 100644 --- a/apps/mavlink/orb_listener.c +++ b/apps/mavlink/orb_listener.c @@ -141,12 +141,6 @@ l_sensor_combined(struct listener *l) last_sensor_timestamp = raw.timestamp; - /* send raw imu data */ - // mavlink_msg_raw_imu_send(MAVLINK_COMM_0, last_sensor_timestamp, raw.accelerometer_raw[0], - // raw.accelerometer_raw[1], raw.accelerometer_raw[2], raw.gyro_raw[0], - // raw.gyro_raw[1], raw.gyro_raw[2], raw.magnetometer_raw[0], - // raw.magnetometer_raw[1], raw.magnetometer_raw[2]); - /* mark individual fields as changed */ uint16_t fields_updated = 0; static unsigned accel_counter = 0; @@ -161,19 +155,19 @@ l_sensor_combined(struct listener *l) } if (gyro_counter != raw.gyro_counter) { - /* mark first three dimensions as changed */ + /* mark second group dimensions as changed */ fields_updated |= (1 << 3) | (1 << 4) | (1 << 5); gyro_counter = raw.gyro_counter; } if (mag_counter != raw.magnetometer_counter) { - /* mark first three dimensions as changed */ + /* mark third group dimensions as changed */ fields_updated |= (1 << 6) | (1 << 7) | (1 << 8); mag_counter = raw.magnetometer_counter; } if (baro_counter != raw.baro_counter) { - /* mark first three dimensions as changed */ + /* mark last group dimensions as changed */ fields_updated |= (1 << 9) | (1 << 11) | (1 << 12); baro_counter = raw.baro_counter; } @@ -187,8 +181,6 @@ l_sensor_combined(struct listener *l) raw.baro_pres_mbar, 0 /* no diff pressure yet */, raw.baro_alt_meter, raw.baro_temp_celcius, fields_updated); - /* send pressure */ - //mavlink_msg_scaled_pressure_send(MAVLINK_COMM_0, raw.timestamp / 1000, raw.baro_pres_mbar, raw.baro_alt_meter, raw.baro_temp_celcius * 100); sensors_raw_counter++; } @@ -631,8 +623,7 @@ uorb_receive_start(void) pthread_attr_init(&uorb_attr); /* Set stack size, needs more than 8000 bytes */ - /* XXX verify, should not need anything like this much unless MAVLink really sucks */ - pthread_attr_setstacksize(&uorb_attr, 8192); + pthread_attr_setstacksize(&uorb_attr, 4096); pthread_t thread; pthread_create(&thread, &uorb_attr, uorb_receive_thread, NULL); -- cgit v1.2.3