Skip to content
Snippets Groups Projects
Commit d5dfb17f authored by Jonathan Challinger's avatar Jonathan Challinger Committed by Lorenz Meier
Browse files

px4iofirmware: return failure when FORCE_SAFETY_OFF fails

parent 9f3401d1
No related branches found
Tags v1.5.1
No related merge requests found
......@@ -648,6 +648,9 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
case PX4IO_P_SETUP_FORCE_SAFETY_ON:
if (value == PX4IO_FORCE_SAFETY_MAGIC) {
r_status_flags &= ~PX4IO_P_STATUS_FLAGS_SAFETY_OFF;
} else {
return -1;
}
break;
......@@ -655,6 +658,9 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
case PX4IO_P_SETUP_FORCE_SAFETY_OFF:
if (value == PX4IO_FORCE_SAFETY_MAGIC) {
r_status_flags |= PX4IO_P_STATUS_FLAGS_SAFETY_OFF;
} else {
return -1;
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment