Refactored debug level into proper register, px4io status now correctly reads it. Added more of the missing alarms clear logic, alarms reporting now consistent. Adding missing sign change on mode switch, fixes override issue when attempting to switch to auto mode. Pending outdoor tests

This commit is contained in:
Lorenz Meier
2013-03-09 13:20:05 +01:00
parent 5335de4cc7
commit 74bcf29c69
3 changed files with 11 additions and 8 deletions
+3 -1
View File
@@ -213,7 +213,9 @@ controls_tick() {
if (assigned_channels == 0) {
rc_input_lost = true;
} else {
/* set RC OK flag and clear RC lost alarm */
r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_OK;
r_status_alarms &= ~PX4IO_P_STATUS_ALARMS_RC_LOST;
}
/*
@@ -274,7 +276,7 @@ controls_tick() {
* requested override.
*
*/
if ((r_status_flags & PX4IO_P_STATUS_FLAGS_RC_OK) && (r_rc_values[4] > RC_CHANNEL_HIGH_THRESH))
if ((r_status_flags & PX4IO_P_STATUS_FLAGS_RC_OK) && (REG_TO_SIGNED(r_rc_values[4]) > RC_CHANNEL_HIGH_THRESH))
override = true;
if (override) {