Simplifying LinkWireless::__onSerial() profiling code

This commit is contained in:
Rodrigo Alfonso
2025-01-13 03:32:04 -03:00
parent f2d5f877ed
commit bc5cfab36e

View File

@@ -857,19 +857,13 @@ class LinkWireless {
#endif
int status = linkRawWireless._onSerial(false);
if (status <= -4)
if (status <= -4) {
return (void)abort(ACKNOWLEDGE_FAILED);
else if (status <= 0) {
#ifdef LINK_WIRELESS_PROFILING_ENABLED
serialTime += profileStop();
serialIRQs++;
#endif
return;
} else if (status > 0) {
auto result = linkRawWireless.getAsyncCommandResult();
processAsyncCommand(result);
}
auto result = linkRawWireless.getAsyncCommandResult();
processAsyncCommand(result);
#ifdef LINK_WIRELESS_PROFILING_ENABLED
serialTime += profileStop();
serialIRQs++;