mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-15 21:05:40 +08:00
APM_OBC: handle separate terminate pin correctly
This commit is contained in:
1 parent
13145e4c01
commit
cca04d195a
1 file changed
+3
-2
@@ -166,8 +166,9 @@ APM_OBC::check(APM_OBC::control_mode mode,
|
||||
break;
|
||||
}
|
||||
|
||||
// if we are not terminating then toggle the heartbeat pin at 10Hz
|
||||
if (!_terminate && _heartbeat_pin != -1) {
|
||||
// if we are not terminating or if there is a separate terminate
|
||||
// pin configured then toggle the heartbeat pin at 10Hz
|
||||
if (_heartbeat_pin != -1 && (_terminate_pin != -1 || !_terminate)) {
|
||||
if (_heartbeat_pin != _last_heartbeat_pin) {
|
||||
pinMode(_heartbeat_pin, OUTPUT);
|
||||
_last_heartbeat_pin = _heartbeat_pin;
|
||||
|
||||
Reference in new issue
Block a user