forked from Archive/PX4-Autopilot
Compare commits
1 Commits
main
...
pr-nuttx-h
Author | SHA1 | Date |
---|---|---|
David Sidrane | 48a1d47c8e |
|
@ -1,14 +1,6 @@
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*.{c,cpp,cc,h,hpp}]
|
||||||
insert_final_newline = false
|
|
||||||
|
|
||||||
[{*.{c,cpp,cc,h,hpp},CMakeLists.txt,Kconfig}]
|
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
tab_width = 8
|
tab_width = 8
|
||||||
# Not in the official standard, but supported by many editors
|
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
|
|
||||||
[*.yaml]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
||||||
Subproject commit 693b9e782535f12e6a4ab657c7a0c3bd92b45fb1
|
Subproject commit dfedda68436ec6bdc986dd961e95dddd539e03b6
|
|
@ -364,13 +364,6 @@ PX4IO::~PX4IO()
|
||||||
bool PX4IO::updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
|
bool PX4IO::updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
|
||||||
unsigned num_outputs, unsigned num_control_groups_updated)
|
unsigned num_outputs, unsigned num_control_groups_updated)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < num_outputs; i++) {
|
|
||||||
if (!_mixing_output.isFunctionSet(i)) {
|
|
||||||
// do not run any signal on disabled channels
|
|
||||||
outputs[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_test_fmu_fail) {
|
if (!_test_fmu_fail) {
|
||||||
/* output to the servos */
|
/* output to the servos */
|
||||||
io_reg_set(PX4IO_PAGE_DIRECT_PWM, 0, outputs, num_outputs);
|
io_reg_set(PX4IO_PAGE_DIRECT_PWM, 0, outputs, num_outputs);
|
||||||
|
|
|
@ -455,8 +455,7 @@ bool MixingOutput::update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send output if any function mapped or one last disabling sample
|
if (!all_disabled) {
|
||||||
if (!all_disabled || !_was_all_disabled) {
|
|
||||||
if (!_armed.armed && !_armed.manual_lockdown) {
|
if (!_armed.armed && !_armed.manual_lockdown) {
|
||||||
_actuator_test.overrideValues(outputs, _max_num_outputs);
|
_actuator_test.overrideValues(outputs, _max_num_outputs);
|
||||||
}
|
}
|
||||||
|
@ -464,8 +463,6 @@ bool MixingOutput::update()
|
||||||
limitAndUpdateOutputs(outputs, has_updates);
|
limitAndUpdateOutputs(outputs, has_updates);
|
||||||
}
|
}
|
||||||
|
|
||||||
_was_all_disabled = all_disabled;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,6 @@ private:
|
||||||
hrt_abstime _lowrate_schedule_interval{300_ms};
|
hrt_abstime _lowrate_schedule_interval{300_ms};
|
||||||
ActuatorTest _actuator_test{_function_assignment};
|
ActuatorTest _actuator_test{_function_assignment};
|
||||||
uint32_t _reversible_mask{0}; ///< per-output bits. If set, the output is configured to be reversible (motors only)
|
uint32_t _reversible_mask{0}; ///< per-output bits. If set, the output is configured to be reversible (motors only)
|
||||||
bool _was_all_disabled{false};
|
|
||||||
|
|
||||||
uORB::SubscriptionCallbackWorkItem *_subscription_callback{nullptr}; ///< current scheduling callback
|
uORB::SubscriptionCallbackWorkItem *_subscription_callback{nullptr}; ///< current scheduling callback
|
||||||
|
|
||||||
|
|
|
@ -191,15 +191,11 @@ TEST_F(MixerModuleTest, basic)
|
||||||
mixing_output.setAllMaxValues(MAX_VALUE);
|
mixing_output.setAllMaxValues(MAX_VALUE);
|
||||||
EXPECT_EQ(test_module.num_updates, 0);
|
EXPECT_EQ(test_module.num_updates, 0);
|
||||||
|
|
||||||
// all functions disabled: expect to get one single update to process disabling the output signal
|
// all functions disabled: not expected to get an update
|
||||||
mixing_output.update();
|
mixing_output.update();
|
||||||
mixing_output.updateSubscriptions(false);
|
mixing_output.updateSubscriptions(false);
|
||||||
mixing_output.update();
|
mixing_output.update();
|
||||||
EXPECT_EQ(test_module.num_updates, 1);
|
EXPECT_EQ(test_module.num_updates, 0);
|
||||||
mixing_output.update();
|
|
||||||
mixing_output.updateSubscriptions(false);
|
|
||||||
mixing_output.update();
|
|
||||||
EXPECT_EQ(test_module.num_updates, 1);
|
|
||||||
test_module.reset();
|
test_module.reset();
|
||||||
|
|
||||||
// configure motor, ensure all still disarmed
|
// configure motor, ensure all still disarmed
|
||||||
|
|
|
@ -180,21 +180,17 @@ mixer_tick()
|
||||||
* Run the mixers.
|
* Run the mixers.
|
||||||
*/
|
*/
|
||||||
if (source == MIX_FAILSAFE) {
|
if (source == MIX_FAILSAFE) {
|
||||||
// Set failsafe value if the PWM output isn't disabled
|
/* copy failsafe values to the servo outputs */
|
||||||
for (unsigned i = 0; i < PX4IO_SERVO_COUNT; i++) {
|
for (unsigned i = 0; i < PX4IO_SERVO_COUNT; i++) {
|
||||||
if (r_page_servos[i] != 0) {
|
|
||||||
r_page_servos[i] = r_page_servo_failsafe[i];
|
r_page_servos[i] = r_page_servo_failsafe[i];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} else if (source == MIX_DISARMED) {
|
} else if (source == MIX_DISARMED) {
|
||||||
// Set disarmed value if the PWM output isn't disabled
|
/* copy disarmed values to the servo outputs */
|
||||||
for (unsigned i = 0; i < PX4IO_SERVO_COUNT; i++) {
|
for (unsigned i = 0; i < PX4IO_SERVO_COUNT; i++) {
|
||||||
if (r_page_servos[i] != 0) {
|
|
||||||
r_page_servos[i] = r_page_servo_disarmed[i];
|
r_page_servos[i] = r_page_servo_disarmed[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* set arming */
|
/* set arming */
|
||||||
bool needs_to_arm = (should_arm || should_arm_nothrottle || should_always_enable_pwm);
|
bool needs_to_arm = (should_arm || should_arm_nothrottle || should_always_enable_pwm);
|
||||||
|
|
Loading…
Reference in New Issue