first use of libmbus

This commit is contained in:
2020-11-03 14:37:58 +01:00
parent b1e2277ef5
commit c2efa9d8f3
3 changed files with 33 additions and 9 deletions

View File

@ -351,6 +351,7 @@ static void handleRequestEngine(void *handle) {
case MBCS_TIMEOUT:
logMsg("hre state TIMEOUT");
localMbusCommHandle->device->failures += 1;
localMbusCommHandle->receiving = false;
if (localMbusCommHandle->frame.userdata != NULL) {
free(localMbusCommHandle->frame.userdata);
@ -398,6 +399,7 @@ e_mbusCommRequestResult mbusCommRequest(t_mbusDevice *mbusDevice) {
mbusCommHandle.cmd = MBUS_QUERY_CMD;
mbusCommHandle.addr = mbusDevice->address;
mbusCommHandle.device = mbusDevice;
mbusDevice->requests += 1;
schAdd(handleRequestEngine, (void*) &mbusCommHandle, 0, 0);
res = MBCRR_TRIGGERED;
}