mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 09:13:32 +08:00
Minor tweaks and command parsing debugging
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
APPNAME = commander
|
||||
PRIORITY = SCHED_PRIORITY_MAX - 30
|
||||
STACKSIZE = 2048
|
||||
STACKSIZE = 4096
|
||||
|
||||
INCLUDES = $(TOPDIR)/../mavlink/include/mavlink
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -37,6 +37,6 @@
|
||||
|
||||
APPNAME = attitude_estimator_bm
|
||||
PRIORITY = SCHED_PRIORITY_MAX - 10
|
||||
STACKSIZE = 8000
|
||||
STACKSIZE = 12000
|
||||
|
||||
include $(APPDIR)/mk/app.mk
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user