Skip to content

Commit c074481

Browse files
authored
Merge pull request #19 from apl-ocean-engineering/feature/nonrecoverable_sonar_errors_should_be_fatal
Make non-recoverable sonar errors LOG(FATAL)
2 parents 7f2f82b + 0cecf79 commit c074481

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/StatusRx.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,21 @@ bool StatusRx::parseStatus(const SonarStatus &status) {
142142
OculusPauseReasonType prt = (OculusPauseReasonType)((status_flags & 0x38) >> 3);
143143

144144
if (prt == oculusPauseMagSwitch) {
145-
LOG(WARNING) << "Halt: Mag Switch Detected";
145+
LOG(FATAL) << "Halt: Mag Switch Detected";
146146
} else if (prt == oculusPauseBootFromMain) {
147-
LOG(WARNING) << "Halt: Boot From Main";
147+
LOG(FATAL) << "Halt: Boot From Main";
148148
} else if (prt == oculusPauseFlashError) {
149-
LOG(WARNING) << "Halt: Flash Error. Update firmware";
149+
LOG(FATAL) << "Halt: Flash Error. Update firmware";
150150
} else if (prt == oculusPauseJtagLoad) {
151-
LOG(WARNING) << "Halt: JTAG Load";
151+
LOG(FATAL) << "Halt: JTAG Load";
152152
} else if (prt == oculusPauseFirmwareError) {
153-
LOG(WARNING) << "Halt: Firmware error";
153+
LOG(FATAL) << "Halt: Firmware error";
154154
} else if (prt == oculusPauseCompatibilityError) {
155-
LOG(WARNING) << "Halt: Compatibility error";
155+
LOG(FATAL) << "Halt: Compatibility error";
156156
} else if (prt == oculusPauseBrownout) {
157-
LOG(WARNING) << "Halt: Brownout";
157+
LOG(FATAL) << "Halt: Brownout";
158158
} else {
159-
LOG(WARNING) << "Halt: unknown error (0x" << std::hex
159+
LOG(FATAL) << "Halt: unknown error (0x" << std::hex
160160
<< static_cast<int>(prt) << ")";
161161
}
162162

@@ -176,7 +176,7 @@ bool StatusRx::parseStatus(const SonarStatus &status) {
176176

177177
const bool transmitError = (status_flags & (1 << 16));
178178
if (transmitError) {
179-
LOG(WARNING) << "Critical: Transmit Circuit Failure";
179+
LOG(FATAL) << "Critical: Transmit Circuit Failure";
180180
return false;
181181
}
182182
}

0 commit comments

Comments
 (0)