From 8df22c3be3b39f6fd5dd9bf63a394003993aeb36 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Fri, 31 May 2024 16:25:25 +0200 Subject: [PATCH] mixer function RC: use disarmed value without valid RC input --- src/lib/mixer_module/functions/FunctionManualRC.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/mixer_module/functions/FunctionManualRC.hpp b/src/lib/mixer_module/functions/FunctionManualRC.hpp index 38f7d096a94e..ba6766f27094 100644 --- a/src/lib/mixer_module/functions/FunctionManualRC.hpp +++ b/src/lib/mixer_module/functions/FunctionManualRC.hpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2021-2022 PX4 Development Team. All rights reserved. + * Copyright (c) 2021-2024 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,7 +56,7 @@ class FunctionManualRC : public FunctionProviderBase { manual_control_setpoint_s manual_control_setpoint; - if (_topic.update(&manual_control_setpoint)) { + if (_topic.update(&manual_control_setpoint) && manual_control_setpoint.valid) { _data[0] = manual_control_setpoint.roll; _data[1] = manual_control_setpoint.pitch; _data[2] = manual_control_setpoint.throttle;