HAL_ChibiOS: fixed 32/64 micros bug in CAN select()

This commit is contained in:
Andrew Tridgell 2021-03-14 16:39:05 +11:00
parent bac9b27a3f
commit 353eca79b6
2 changed files with 4 additions and 4 deletions

View File

@ -994,7 +994,7 @@ bool CANIface::select(bool &read, bool &write,
{
const bool in_read = read;
const bool in_write= write;
uint64_t time = AP_HAL::micros();
uint64_t time = AP_HAL::micros64();
if (!read && !write) {
//invalid request
@ -1018,7 +1018,7 @@ bool CANIface::select(bool &read, bool &write,
if ((read && in_read) || (write && in_write)) {
return true;
}
time = AP_HAL::micros();
time = AP_HAL::micros64();
}
return false;
}

View File

@ -711,7 +711,7 @@ bool CANIface::select(bool &read, bool &write,
{
const bool in_read = read;
const bool in_write= write;
uint64_t time = AP_HAL::micros();
uint64_t time = AP_HAL::micros64();
if (!read && !write) {
//invalid request
@ -737,7 +737,7 @@ bool CANIface::select(bool &read, bool &write,
if ((read && in_read) || (write && in_write)) {
return true;
}
time = AP_HAL::micros();
time = AP_HAL::micros64();
}
#endif // #if !defined(HAL_BUILD_AP_PERIPH) && !defined(HAL_BOOTLOADER_BUILD)
return true;