equal
deleted
inserted
replaced
336 if (sts.sts & STS_REMOTE_QUEUE_OVERRUN) |
336 if (sts.sts & STS_REMOTE_QUEUE_OVERRUN) |
337 { |
337 { |
338 ::OutputDebugString("\nIXXAT canBusWatchdog: Remote queue overrun detected!\n"); |
338 ::OutputDebugString("\nIXXAT canBusWatchdog: Remote queue overrun detected!\n"); |
339 } |
339 } |
340 |
340 |
341 if (VCI_ResetCan(m_BoardHdl, CAN_NUM) < 0) |
341 res = VCI_ResetCan(m_BoardHdl, CAN_NUM); |
342 { |
342 if (res <= 0) |
343 ::OutputDebugString("\nIXXAT canBusWatchdog: ERROR: Resetting the can module failed!\n"); |
343 { |
|
344 char buf[200]; |
|
345 ::sprintf(buf, "\nIXXAT canBusWatchdog: ERROR: Resetting the can module failed with code '%d'!\n", res); |
|
346 ::OutputDebugString(buf); |
344 } |
347 } |
345 |
348 |
346 if (VCI_StartCan(m_BoardHdl, CAN_NUM) < 0) |
349 res = VCI_StartCan(m_BoardHdl, CAN_NUM); |
347 { |
350 if (res <= 0) |
348 ::OutputDebugString("\nIXXAT canBusWatchdog: ERROR: Restaring the can module failed!\n"); |
351 { |
|
352 char buf[200]; |
|
353 ::sprintf(buf, "\nIXXAT canBusWatchdog: ERROR: Restaring the can module failed with code '%d'!\n", res); |
|
354 ::OutputDebugString(buf); |
349 } |
355 } |
350 } |
356 } |
351 } |
357 } |
352 |
358 |
353 if (SetTimer(NULL, m_watchdogTimerId, IXXAT::CAN_BUS_WATCHDOG_INTERVAL_MSEC, IXXAT::canBusWatchdog) == 0) |
359 if (SetTimer(NULL, m_watchdogTimerId, IXXAT::CAN_BUS_WATCHDOG_INTERVAL_MSEC, IXXAT::canBusWatchdog) == 0) |