mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:23:33 +08:00
Merge branch 'master' of github.com:PX4/Firmware into fixedwing_io_mixing_adc
This commit is contained in:
@@ -112,6 +112,9 @@ endef
|
||||
|
||||
$(foreach BUILTIN, $(CONFIGURED_APPS), $(eval $(call ADD_BUILTIN,$(BUILTIN))))
|
||||
|
||||
# EXTERNAL_APPS is used to add out of tree apps to the build
|
||||
INSTALLED_APPS += $(EXTERNAL_APPS)
|
||||
|
||||
# The external/ directory may also be added to the INSTALLED_APPS. But there
|
||||
# is no external/ directory in the repository. Rather, this directory may be
|
||||
# provided by the user (possibly as a symbolic link) to add libraries and
|
||||
|
||||
@@ -103,6 +103,9 @@ ORB_DECLARE(output_pwm);
|
||||
/** disarm all servo outputs (stop generating pulses) */
|
||||
#define PWM_SERVO_DISARM _IOC(_PWM_SERVO_BASE, 1)
|
||||
|
||||
/** set update rate in Hz */
|
||||
#define PWM_SERVO_SET_UPDATE_RATE _IOC(_PWM_SERVO_BASE, 2)
|
||||
|
||||
/** set a single servo to a specific value */
|
||||
#define PWM_SERVO_SET(_servo) _IOC(_PWM_SERVO_BASE, 0x20 + _servo)
|
||||
|
||||
|
||||
@@ -510,6 +510,10 @@ HIL::pwm_ioctl(file *filp, int cmd, unsigned long arg)
|
||||
// up_pwm_servo_arm(false);
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET_UPDATE_RATE:
|
||||
g_hil->set_pwm_rate(arg);
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET(2):
|
||||
case PWM_SERVO_SET(3):
|
||||
if (_mode != MODE_4PWM) {
|
||||
|
||||
@@ -509,6 +509,10 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg)
|
||||
up_pwm_servo_arm(false);
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET_UPDATE_RATE:
|
||||
set_pwm_rate(arg);
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET(2):
|
||||
case PWM_SERVO_SET(3):
|
||||
if (_mode != MODE_4PWM) {
|
||||
|
||||
@@ -709,6 +709,11 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
|
||||
_send_needed = true;
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET_UPDATE_RATE:
|
||||
// not supported yet
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
|
||||
case PWM_SERVO_SET(0) ... PWM_SERVO_SET(_max_actuators - 1):
|
||||
|
||||
/* fake an update to the selected 'servo' channel */
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "mavlink_log.h"
|
||||
|
||||
@@ -51,7 +52,7 @@ void mavlink_logbuffer_init(struct mavlink_logbuffer *lb, int size) {
|
||||
}
|
||||
|
||||
int mavlink_logbuffer_is_full(struct mavlink_logbuffer *lb) {
|
||||
return lb->count == lb->size;
|
||||
return lb->count == (int)lb->size;
|
||||
}
|
||||
|
||||
int mavlink_logbuffer_is_empty(struct mavlink_logbuffer *lb) {
|
||||
@@ -77,4 +78,4 @@ int mavlink_logbuffer_read(struct mavlink_logbuffer *lb, struct mavlink_logmessa
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ struct vehicle_gps_position_s
|
||||
uint16_t counter_pos_valid; /**< is only increased when new lat/lon/alt information was added */
|
||||
uint16_t eph; /**< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 //LOGME */
|
||||
uint16_t epv; /**< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 */
|
||||
float s_variance; // XXX testing
|
||||
float p_variance; // XXX testing
|
||||
float s_variance; /**< speed accuracy estimate cm/s */
|
||||
float p_variance; /**< position accuracy estimate cm */
|
||||
uint16_t vel; /**< GPS ground speed (m/s * 100). If unknown, set to: 65535 */
|
||||
float vel_n; /**< GPS ground speed in m/s */
|
||||
float vel_e; /**< GPS ground speed in m/s */
|
||||
@@ -84,7 +84,6 @@ struct vehicle_gps_position_s
|
||||
|
||||
/* flags */
|
||||
float vel_ned_valid; /**< Flag to indicate if NED speed is valid */
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user