cancel running request on arbitration error
This commit is contained in:
@@ -647,7 +647,17 @@ result_t BusHandler::handleSymbol() {
|
|||||||
case as_running:
|
case as_running:
|
||||||
break;
|
break;
|
||||||
case as_error:
|
case as_error:
|
||||||
logError(lf_bus, "arbitration start error"); // TODO cancel all requests?
|
logError(lf_bus, "arbitration start error");
|
||||||
|
// cancel request
|
||||||
|
if (!m_currentRequest) {
|
||||||
|
BusRequest *startRequest = m_nextRequests.peek();
|
||||||
|
if (startRequest && m_nextRequests.remove(startRequest)) {
|
||||||
|
m_currentRequest = startRequest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m_currentRequest) {
|
||||||
|
setState(m_state, RESULT_ERR_BUS_LOST);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default: // only as_none
|
default: // only as_none
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user