Minor tweaks and command parsing debugging

This commit is contained in:
Lorenz Meier
2012-08-16 20:57:38 +02:00
parent 8575d8cd49
commit 73286f3262
6 changed files with 11 additions and 26 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
APPNAME = commander
PRIORITY = SCHED_PRIORITY_MAX - 30
STACKSIZE = 2048
STACKSIZE = 4096
INCLUDES = $(TOPDIR)/../mavlink/include/mavlink
+3 -5
View File
@@ -425,7 +425,6 @@ static void *receiveloop(void *arg)
/* Handle packet with parameter component */
mavlink_pm_message_handler(MAVLINK_COMM_0, &msg);
msg.msgid = -1;
}
}
@@ -967,7 +966,6 @@ void handleMessage(mavlink_message_t *msg)
*/
// printf("\n HIL ENABLED?: %s \n",(mavlink_hil_enabled)?"true":"false");
#define DEG2RAD ((1.0/180.0)*M_PI)
if (mavlink_hil_enabled) {
@@ -1270,13 +1268,13 @@ int mavlink_main(int argc, char *argv[])
pthread_attr_t receiveloop_attr;
pthread_attr_init(&receiveloop_attr);
pthread_attr_setstacksize(&receiveloop_attr, 4096);
pthread_attr_setstacksize(&receiveloop_attr, 2048);
pthread_create(&receive_thread, &receiveloop_attr, receiveloop, NULL);
pthread_attr_t uorb_attr;
pthread_attr_init(&uorb_attr);
/* Set stack size, needs more than 5000 bytes */
pthread_attr_setstacksize(&uorb_attr, 7000);
/* Set stack size, needs more than 4000 bytes */
pthread_attr_setstacksize(&uorb_attr, 4096);
pthread_create(&uorb_receive_thread, &uorb_attr, uorb_receiveloop, NULL);
/* initialize waypoint manager */
+1 -1
View File
@@ -37,6 +37,6 @@
APPNAME = attitude_estimator_bm
PRIORITY = SCHED_PRIORITY_MAX - 10
STACKSIZE = 8000
STACKSIZE = 12000
include $(APPDIR)/mk/app.mk
+1 -1
View File
@@ -852,7 +852,7 @@ int sensors_main(int argc, char *argv[])
if (ADC_BATTERY_VOLATGE_CHANNEL == buf_adc.am_channel1) {
/* Voltage in volts */
raw.battery_voltage_v = (BAT_VOL_LOWPASS_1 * (raw.battery_voltage_v + BAT_VOL_LOWPASS_2 * (uint16_t)(buf_adc.am_data1 * battery_voltage_conversion)));
raw.battery_voltage_v = (BAT_VOL_LOWPASS_1 * (raw.battery_voltage_v + BAT_VOL_LOWPASS_2 * (buf_adc.am_data1 * battery_voltage_conversion)));
if ((buf_adc.am_data1 * battery_voltage_conversion) < VOLTAGE_BATTERY_IGNORE_THRESHOLD_VOLTS) {
raw.battery_voltage_valid = false;
+4 -4
View File
@@ -126,10 +126,10 @@ struct vehicle_status_s
uint32_t onboard_control_sensors_present;
uint32_t onboard_control_sensors_enabled;
uint32_t onboard_control_sensors_health;
uint16_t load;
uint16_t voltage_battery;
int16_t current_battery;
int8_t battery_remaining;
float load;
float voltage_battery;
float current_battery;
float battery_remaining;
uint16_t drop_rate_comm;
uint16_t errors_comm;
uint16_t errors_count1;