Commit Graph

24394 Commits

Author SHA1 Message Date
Silvan Fuhrer 3ad901e51d Wind Estimator: use time_literals
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer cad7851774 AirspeedSelector: add _CAS_scale_validated to airspeed_wind for logging
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
Silvan Fuhrer 625f556b0e AirspeedSelector: airspeed scale estimation improvements and robustification
- run airspeed scale estimation always, not in dedicated mode
- add option to apply scale automatically, with extra feasibility check
- add airspeed scale for all 3 possible airspeed instances
- clean up parameters
- add check for data stuck (non-changing airspeed data)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-22 17:00:35 +02:00
RomanBapst 8e8c6efd66 Mission block: do not care for altitdue acceptance when approaching backtransition point
Not accepting the waypoint causes the vehicle to perform a sharp turn after passing
the land waypoint and this causes worse unexected behavior.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-10-22 15:37:10 +02:00
bresch 78fe6e2152 VelocitySmoothing: fix issue when delta vel is the same on all axes
When the change in velocity is exactly the same on several axes, the T1
of the recumputed trajectories after time sync was set to 0 because it
was skipping both if and else if.
2021-10-22 10:54:36 +02:00
mcsauder 9301288d1f Add parameter and logic to set RTL heading mode. 2021-10-22 09:28:30 +02:00
Daniel Agar 6fb1c79ef0 mixer_module: reject mixer load and reset when dynamic mixing is enabled 2021-10-21 11:27:33 -07:00
Daniel Agar ea9c64dcd9 drivers/uavcan: add new UAVCAN_SUB_* parameters to enable subscriptions
- only GPS and mag are enabled by default
2021-10-21 09:55:04 -04:00
Silvan Fuhrer fd96bbf9b9 Mavlink: bump MAX_REMOTE_COMPONENTS to 16
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-10-21 07:48:50 +02:00
Daniel Agar 4247e1320b px4io: allow switching to rate ctrl wq 2021-10-20 09:56:42 -04:00
Beat Küng 8a2b310b83 topic_listener: avoid code generation, use existing metadata at runtime
This reduces flash size for v5 by ~110KB, the topic listener now only adds
about 1.2KB.
2021-10-20 08:10:05 +02:00
Beat Küng a0e72b35a4 replay: ignore ULogMessageType::PARAMETER_DEFAULT messages 2021-10-20 08:10:05 +02:00
Beat Küng 4c73ac3805 uorb: use single byte for internal types in o_fields metadata
Reduces flash usage by ~9KB.
2021-10-20 08:10:05 +02:00
mcsauder 21163d859e Whitespace cleanup. 2021-10-19 13:29:26 -04:00
Daniel Agar 4cf8eb8226 ekf2: EKF vehicle_at_rest always require some rotation in addition to vibration metrics 2021-10-18 21:39:40 -04:00
Daniel Agar 33954a904f lib/tunes: never play tunes if circuit breaker is set 2021-10-18 21:37:09 -04:00
Tia 6e3e6846f4 Fix srf05 driver. 2021-10-18 21:00:59 -04:00
bazooka joe b35dd86d04 mc_pos_control: remove unused var 2021-10-18 20:37:18 -04:00
bazooka joe c8d6f8f5e5 remove proto for unused function limit_thrust_during_landing() 2021-10-18 20:37:18 -04:00
Daniel Agar 9d7c4596f7 navigator: increase stack 1800 -> 1864 bytes 2021-10-18 20:31:35 -04:00
Beat Küng da1df5352c fix pwm: only update oneshot timers owned by the current pwm_out instance
This fixes the case where oneshot was enabled with multi-instance pwm_out,
triggering oneshot updates too close to each other and as a result could
lead to spinning motors while disarmed.
2021-10-18 18:45:19 -04:00
Beat Küng f1686b1abf px4io: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 837a1066e0 px4io, pwm_out: update pwm default checking
The defaults changed in the previous commit for per-channel params,
so we make sure that the overall params are still used as long as the
per-channel params are default.
2021-10-18 18:45:19 -04:00
Beat Küng ab1d76ae7d params: use PWM_MAIN_* instead of PWM_FMU_* 2021-10-18 18:45:19 -04:00
Beat Küng 183ab8bbe7 control_allocator: avoid default argument for virtual method getEffectivenessMatrix
clang tidy error:
/__w/PX4-Autopilot/PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessMultirotor.cpp:50:34: error: default arguments on virtual or override methods are prohibited [google-default-arguments,-warnings-as-errors]
ActuatorEffectivenessMultirotor::getEffectivenessMatrix(matrix::Matrix<float, NUM_AXES, NUM_ACTUATORS> &matrix,
2021-10-18 18:45:19 -04:00
Beat Küng 8b3ab7e36d fix pwm_out: ensure up_pwm_servo_arm() is never continuously called
This happened with multi-instance, when the second instance did not load
a mixer. Then the first instance would always return false in
update_pwm_out_state, and continuously call up_pwm_servo_arm.
This led to irregular pulses, e.g. with an output set to fixed 1500us, I
saw pulses of e.g. 1800us occationally (they were in a range of
[1500-2100]).
2021-10-18 18:45:19 -04:00
Beat Küng 44bbe87165 pwm_out_sim: use PWM_FMU for sitl and HIL_ACT for hitl
We might want to change this later, but for now it allows to use the same
airframe configs for sitl/real, and independent hitl configuration.
2021-10-18 18:45:19 -04:00
Beat Küng 21c1671693 pwm_out_sim: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 0871b7974d uavcan_v1: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng ae15ad14a8 tap_esc: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 35ce6d1b73 pca9685_pwm_out: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 955179e992 linux_pwm_out: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng c1e5e666f0 pwm_out, dshot: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 3ff6014a3c uavcan: implement servo outputs 2021-10-18 18:45:19 -04:00
Beat Küng 07fa8c5295 uavcan: reduce sensor status output verbosity 2021-10-18 18:45:19 -04:00
Beat Küng 49f8131f82 uavcan: add dynamic mixing support 2021-10-18 18:45:19 -04:00
Beat Küng 5f0781b6e9 output modules: add param prefix argument to MixingOutput 2021-10-18 18:45:19 -04:00
Beat Küng f5fbcb0770 dshot: handle telemetry index correctly when dynamic mixer is used 2021-10-18 18:45:19 -04:00
Beat Küng 916447e804 params: add script to parse timer_config.cpp for timer group info
This allows to generate pwm params in the form of:
module_name: PWM Output
actuator_output:
  output_groups:
    - generator: pwm
      param_prefix: PWM_FMU
      channel_labels: ['PWM Main', 'PWM Capture']
      standard_params:
        disarmed: { min: 800, max: 2200, default: 900 }
        min: { min: 800, max: 1400, default: 1000 }
        max: { min: 1600, max: 2200, default: 2000 }
        failsafe: { min: 800, max: 2200 }
      extra_function_groups: [ pwm_fmu ]
      pwm_timer_param:
        description:
            short: Output Protocol Configuration for ${label}
            long: |
                Select which Output Protocol to use for outputs ${label}.

                Custom PWM rates can be used by directly setting any value >0.
        type: enum
        default: 400
        values:
            -5: DShot150
            -4: DShot300
            -3: DShot600
            -2: DShot1200
            -1: OneShot
            50: PWM50
            100: PWM100
            200: PWM200
            400: PWM400
        reboot_required: true
2021-10-18 18:45:19 -04:00
Beat Küng 6f01b69f49 mixer_module: add param generation for disarmed, min, max, failsafe 2021-10-18 18:45:19 -04:00
Beat Küng 15daded6b0 refactor output_limit: split output_limit_calc_single into separate function 2021-10-18 18:45:19 -04:00
Beat Küng c55626d2d6 refactor Tools/serial: move non-serial param generation into separate script 2021-10-18 18:45:19 -04:00
Beat Küng a65533b469 mixer_module: add output functions for servos, landing gear, parachute, RC passthrough & gimbal 2021-10-18 18:45:19 -04:00
Beat Küng 4b37a3d017 mixer_module: generate output_functions header from yaml file 2021-10-18 18:45:19 -04:00
Beat Küng fd76e5488e mixer_module: add output functions 2021-10-18 18:45:19 -04:00
Beat Küng ab3fe77f46 mavlink_receiver: publish MAV_CMD_DO_SET_ACTUATOR command 2021-10-18 18:45:19 -04:00
Beat Küng 38fa65a47e control_allocator: remove direct mixer, add actuator_{motors,servos} instead 2021-10-18 18:45:19 -04:00
Beat Küng a51c465b54 control allocation: introduce parameter SYS_CTRL_ALLOC & unify build targets 2021-10-18 18:45:19 -04:00
Beat Küng 0c5a79d84d fix mixer_module: use PRIx32 for debug printf 2021-10-18 18:45:19 -04:00
Beat Küng ad1bcfd77c commander: correct lockdown CLI description 2021-10-18 18:45:19 -04:00