Merged release_v1.0.0 branch into master

This commit is contained in:
Lorenz Meier
2015-06-25 21:45:17 +02:00
73 changed files with 2726 additions and 887 deletions
+98
View File
@@ -1410,3 +1410,101 @@ PARAM_DEFINE_INT32(RC_RSSI_PWM_MIN, 2000);
* @group Sensor Enable
*/
PARAM_DEFINE_INT32(SENS_EN_LL40LS, 0);
/**
* Set the minimum PWM for the MAIN outputs
*
* IMPORTANT: CHANGING THIS PARAMETER REQUIRES A COMPLETE SYSTEM
* REBOOT IN ORDER TO APPLY THE CHANGES. COMPLETELY POWER-CYCLE
* THE SYSTEM TO PUT CHANGES INTO EFFECT.
*
* Set to 1000 for default or 900 to increase servo travel
*
* @min 800
* @max 1400
* @unit microseconds
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_MIN, 1000);
/**
* Set the maximum PWM for the MAIN outputs
*
* IMPORTANT: CHANGING THIS PARAMETER REQUIRES A COMPLETE SYSTEM
* REBOOT IN ORDER TO APPLY THE CHANGES. COMPLETELY POWER-CYCLE
* THE SYSTEM TO PUT CHANGES INTO EFFECT.
*
* Set to 2000 for default or 2100 to increase servo travel
*
* @min 1600
* @max 2200
* @unit microseconds
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_MAX, 2000);
/**
* Set the disarmed PWM for MAIN outputs
*
* IMPORTANT: CHANGING THIS PARAMETER REQUIRES A COMPLETE SYSTEM
* REBOOT IN ORDER TO APPLY THE CHANGES. COMPLETELY POWER-CYCLE
* THE SYSTEM TO PUT CHANGES INTO EFFECT.
*
* This is the PWM pulse the autopilot is outputting if not armed.
* The main use of this parameter is to silence ESCs when they are disarmed.
*
* @min 0
* @max 2200
* @unit microseconds
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_DISARMED, 0);
/**
* Set the minimum PWM for the MAIN outputs
*
* IMPORTANT: CHANGING THIS PARAMETER REQUIRES A COMPLETE SYSTEM
* REBOOT IN ORDER TO APPLY THE CHANGES. COMPLETELY POWER-CYCLE
* THE SYSTEM TO PUT CHANGES INTO EFFECT.
*
* Set to 1000 for default or 900 to increase servo travel
*
* @min 800
* @max 1400
* @unit microseconds
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_AUX_MIN, 1000);
/**
* Set the maximum PWM for the MAIN outputs
*
* IMPORTANT: CHANGING THIS PARAMETER REQUIRES A COMPLETE SYSTEM
* REBOOT IN ORDER TO APPLY THE CHANGES. COMPLETELY POWER-CYCLE
* THE SYSTEM TO PUT CHANGES INTO EFFECT.
*
* Set to 2000 for default or 2100 to increase servo travel
*
* @min 1600
* @max 2200
* @unit microseconds
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_AUX_MAX, 2000);
/**
* Set the disarmed PWM for AUX outputs
*
* IMPORTANT: CHANGING THIS PARAMETER REQUIRES A COMPLETE SYSTEM
* REBOOT IN ORDER TO APPLY THE CHANGES. COMPLETELY POWER-CYCLE
* THE SYSTEM TO PUT CHANGES INTO EFFECT.
*
* This is the PWM pulse the autopilot is outputting if not armed.
* The main use of this parameter is to silence ESCs when they are disarmed.
*
* @min 0
* @max 2200
* @unit microseconds
* @group PWM Outputs
*/
PARAM_DEFINE_INT32(PWM_AUX_DISARMED, 1000);
+10
View File
@@ -639,6 +639,12 @@ Sensors::Sensors() :
(void)param_find("SYS_PARAM_VER");
(void)param_find("SYS_AUTOSTART");
(void)param_find("SYS_AUTOCONFIG");
(void)param_find("PWM_MIN");
(void)param_find("PWM_MAX");
(void)param_find("PWM_DISARMED");
(void)param_find("PWM_AUX_MIN");
(void)param_find("PWM_AUX_MAX");
(void)param_find("PWM_AUX_DISARMED");
/* fetch initial parameter values */
parameters_update();
@@ -1293,6 +1299,10 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw)
_airspeed.true_airspeed_m_s = math::max(0.0f,
calc_true_airspeed(_diff_pres.differential_pressure_filtered_pa + raw.baro_pres_mbar * 1e2f,
raw.baro_pres_mbar * 1e2f, air_temperature_celsius));
_airspeed.true_airspeed_unfiltered_m_s = math::max(0.0f,
calc_true_airspeed(_diff_pres.differential_pressure_raw_pa + raw.baro_pres_mbar * 1e2f,
raw.baro_pres_mbar * 1e2f, air_temperature_celsius));
_airspeed.air_temperature_celsius = air_temperature_celsius;
/* announce the airspeed if needed, just publish else */