From b0a012f0dcef00d035f5be2e07867b1d22746108 Mon Sep 17 00:00:00 2001 From: LandryNorris Date: Wed, 11 Sep 2024 12:05:30 -0500 Subject: [PATCH] Message IDs are unsigned --- src/main/native/include/rev/Drivers/DriverDeviceThread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/native/include/rev/Drivers/DriverDeviceThread.h b/src/main/native/include/rev/Drivers/DriverDeviceThread.h index c56d553..11a046b 100644 --- a/src/main/native/include/rev/Drivers/DriverDeviceThread.h +++ b/src/main/native/include/rev/Drivers/DriverDeviceThread.h @@ -75,7 +75,7 @@ class DriverDeviceThread { } } - detail::CANThreadSendQueueElement* findFirstMatchingIdWithNonZeroInterval(int targetId) { + detail::CANThreadSendQueueElement* findFirstMatchingIdWithNonZeroInterval(uint32_t targetId) { for (auto& element : m_sendQueue) { if (element.m_msg.GetMessageId() == targetId && element.m_intervalMs > 0) { return &element; @@ -84,7 +84,7 @@ class DriverDeviceThread { return nullptr; // If no matching element found } - void removeElementsWithId(int targetId) { + void removeElementsWithId(uint32_t targetId) { m_sendQueue.erase(std::remove_if(m_sendQueue.begin(), m_sendQueue.end(), [targetId](detail::CANThreadSendQueueElement element) { return element.m_msg.GetMessageId() == targetId; }), m_sendQueue.end()); }