diff options
-rw-r--r-- | apps/commander/Makefile | 2 | ||||
-rw-r--r-- | apps/mavlink/mavlink.c | 8 | ||||
-rw-r--r-- | apps/px4/attitude_estimator_bm/Makefile | 2 | ||||
-rw-r--r-- | apps/sensors/sensors.c | 2 | ||||
-rw-r--r-- | apps/uORB/topics/vehicle_status.h | 8 | ||||
-rw-r--r-- | nuttx/configs/px4fmu/src/up_nsh.c | 15 |
6 files changed, 11 insertions, 26 deletions
diff --git a/apps/commander/Makefile b/apps/commander/Makefile index d12697274..f2972ac4e 100644 --- a/apps/commander/Makefile +++ b/apps/commander/Makefile @@ -37,7 +37,7 @@ APPNAME = commander PRIORITY = SCHED_PRIORITY_MAX - 30 -STACKSIZE = 2048 +STACKSIZE = 4096 INCLUDES = $(TOPDIR)/../mavlink/include/mavlink diff --git a/apps/mavlink/mavlink.c b/apps/mavlink/mavlink.c index c151d791b..9fc987910 100644 --- a/apps/mavlink/mavlink.c +++ b/apps/mavlink/mavlink.c @@ -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 */ diff --git a/apps/px4/attitude_estimator_bm/Makefile b/apps/px4/attitude_estimator_bm/Makefile index 172940115..2c1cfc510 100644 --- a/apps/px4/attitude_estimator_bm/Makefile +++ b/apps/px4/attitude_estimator_bm/Makefile @@ -37,6 +37,6 @@ APPNAME = attitude_estimator_bm PRIORITY = SCHED_PRIORITY_MAX - 10 -STACKSIZE = 8000 +STACKSIZE = 12000 include $(APPDIR)/mk/app.mk diff --git a/apps/sensors/sensors.c b/apps/sensors/sensors.c index 1506dee1d..5e93f180f 100644 --- a/apps/sensors/sensors.c +++ b/apps/sensors/sensors.c @@ -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; diff --git a/apps/uORB/topics/vehicle_status.h b/apps/uORB/topics/vehicle_status.h index 8b2b6525c..2cd179da0 100644 --- a/apps/uORB/topics/vehicle_status.h +++ b/apps/uORB/topics/vehicle_status.h @@ -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; diff --git a/nuttx/configs/px4fmu/src/up_nsh.c b/nuttx/configs/px4fmu/src/up_nsh.c index 6e092e3b4..d089f2df3 100644 --- a/nuttx/configs/px4fmu/src/up_nsh.c +++ b/nuttx/configs/px4fmu/src/up_nsh.c @@ -236,19 +236,6 @@ int nsh_archinitialize(void) if (acc_fail) message("[boot] FAILED to attach BMA180 accelerometer\r\n"); - int mpu_attempts = 0; - int mpu_fail = 0; - - while (mpu_attempts < 1) - { - mpu_fail = mpu6000_attach(spi1, PX4_SPIDEV_MPU); - mpu_attempts++; - if (mpu_fail == 0) break; - up_udelay(200); - } - - if (mpu_fail) message("[boot] FAILED to attach MPU 6000 gyro/acc\r\n"); - /* initialize I2C2 bus */ i2c2 = up_i2cinitialize(2); @@ -320,7 +307,7 @@ int nsh_archinitialize(void) if (eeprom_fail) message("[boot] FAILED to attach FMU EEPROM\r\n"); /* Report back sensor status */ - if (acc_fail || gyro_fail || mag_fail || baro_fail || eeprom_fail) + if (gyro_fail || mag_fail || baro_fail || eeprom_fail) { up_ledon(LED_AMBER); } |