mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 10:20:34 +08:00
Merged master into ekf2
This commit is contained in:
@@ -303,7 +303,7 @@ Mission::advance_mission()
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
float
|
||||
Mission::get_absolute_altitude_for_item(struct mission_item_s &mission_item)
|
||||
{
|
||||
if (_mission_item.altitude_is_relative) {
|
||||
@@ -656,8 +656,10 @@ Mission::read_mission_item(bool onboard, bool is_current, struct mission_item_s
|
||||
for (int i = 0; i < 10; i++) {
|
||||
|
||||
if (*mission_index_ptr < 0 || *mission_index_ptr >= (int)mission->count) {
|
||||
/* mission item index out of bounds */
|
||||
mavlink_and_console_log_critical(_navigator->get_mavlink_fd(), "[wpm] err: index: %d, max: %d", *mission_index_ptr, (int)mission->count);
|
||||
/* mission item index out of bounds - if they are equal, we just reached the end */
|
||||
if (*mission_index_ptr != (int)mission->count) {
|
||||
mavlink_and_console_log_critical(_navigator->get_mavlink_fd(), "[wpm] err: index: %d, max: %d", *mission_index_ptr, (int)mission->count);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
*/
|
||||
void altitude_sp_foh_reset();
|
||||
|
||||
int get_absolute_altitude_for_item(struct mission_item_s &mission_item);
|
||||
float get_absolute_altitude_for_item(struct mission_item_s &mission_item);
|
||||
|
||||
/**
|
||||
* Read current or next mission item from the dataman and watch out for DO_JUMPS
|
||||
|
||||
@@ -74,15 +74,15 @@ static unsigned _rssi_adc_counts = 0;
|
||||
bool dsm_port_input(uint16_t *rssi, bool *dsm_updated, bool *st24_updated, bool *sumd_updated)
|
||||
{
|
||||
perf_begin(c_gather_dsm);
|
||||
uint16_t temp_count = r_raw_rc_count;
|
||||
uint8_t n_bytes = 0;
|
||||
uint8_t *bytes;
|
||||
*dsm_updated = dsm_input(r_raw_rc_values, &temp_count, &n_bytes, &bytes, PX4IO_RC_INPUT_CHANNELS);
|
||||
bool dsm_11_bit;
|
||||
*dsm_updated = dsm_input(_dsm_fd, r_raw_rc_values, &r_raw_rc_count, &dsm_11_bit, &n_bytes, &bytes,
|
||||
PX4IO_RC_INPUT_CHANNELS);
|
||||
|
||||
if (*dsm_updated) {
|
||||
r_raw_rc_count = temp_count & 0x7fff;
|
||||
|
||||
if (temp_count & 0x8000) {
|
||||
if (dsm_11_bit) {
|
||||
r_raw_rc_flags |= PX4IO_P_RAW_RC_FLAGS_RC_DSM11;
|
||||
|
||||
} else {
|
||||
|
||||
@@ -170,7 +170,6 @@ extern pwm_limit_t pwm_limit;
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4IO_V2
|
||||
|
||||
# define PX4IO_RELAY_CHANNELS 0
|
||||
# define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (_s))
|
||||
# define ENABLE_SBUS_OUT(_s) stm32_gpiowrite(GPIO_SBUS_OENABLE, !(_s))
|
||||
|
||||
# define VDD_SERVO_FAULT (!stm32_gpioread(GPIO_SERVO_FAULT_DETECT))
|
||||
|
||||
Reference in New Issue
Block a user