From 61fa8c8baa192b417aa08b14b47e24f807b2ad5c Mon Sep 17 00:00:00 2001 From: NoahAndrews Date: Thu, 9 Nov 2023 22:38:21 -0600 Subject: [PATCH] Delete extraneous whitespace in CandleWinUSBDevice.cpp --- .../CandleWinUSB/CandleWinUSBDevice.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/native/cpp/Drivers/CandleWinUSB/CandleWinUSBDevice.cpp b/src/main/native/cpp/Drivers/CandleWinUSB/CandleWinUSBDevice.cpp index 244fb4d..1db983a 100644 --- a/src/main/native/cpp/Drivers/CandleWinUSB/CandleWinUSBDevice.cpp +++ b/src/main/native/cpp/Drivers/CandleWinUSB/CandleWinUSBDevice.cpp @@ -59,9 +59,9 @@ CandleWinUSBDevice::CandleWinUSBDevice(candle_handle hDev) : throw "Failed to open device!"; } - // Set FRC capable settings, SPARK MAX is hard coded to this, but other devices (e.g. canable with + // Set FRC capable settings, SPARK MAX is hard coded to this, but other devices (e.g. canable with // candlelight_fw) may need to be set to it explicitly. Note this only works for devices with 48MHz - // clocks, and could be expanded in the future to work with any device that properly reports its + // clocks, and could be expanded in the future to work with any device that properly reports its // own capabilities. if (!candle_channel_set_bitrate(hDev, CANDLE_DEFAULT_CHANNEL, 1000000)) { std::cout << "Unable to set bitrate! " << candle_error_text(candle_dev_last_error(hDev)) << std::endl; @@ -73,7 +73,7 @@ CandleWinUSBDevice::CandleWinUSBDevice(candle_handle hDev) : close_candle_dev(hDev); throw "Failed to start device channel 0!"; } - + m_descriptor = unicode_decode(candle_dev_get_path(m_handle)); m_name = candle_dev_get_name(m_handle); m_thread.Start(); @@ -82,7 +82,7 @@ CandleWinUSBDevice::CandleWinUSBDevice(candle_handle hDev) : CandleWinUSBDevice::~CandleWinUSBDevice() { m_thread.Stop(); - + candle_channel_stop(m_handle, CANDLE_DEFAULT_CHANNEL); close_candle_dev(m_handle); } @@ -130,7 +130,7 @@ CANStatus CandleWinUSBDevice::ReceiveCANMessage(std::shared_ptr& msg { // Assume timeout CANStatus status = CANStatus::kTimeout; - + // parse through the keys, find the messges the match, and return it // The first in the message id, then the messages std::map> messages; @@ -139,13 +139,13 @@ CANStatus CandleWinUSBDevice::ReceiveCANMessage(std::shared_ptr& msg for (auto& m : messages) { if (CANBridge_ProcessMask({m.second->GetMessageId(), 0}, m.first) && CANBridge_ProcessMask({messageID, messageMask}, m.first)) { mostRecent = m.second; - status = CANStatus::kOk; + status = CANStatus::kOk; } } - + if (status == CANStatus::kOk) { msg = mostRecent; - status = m_thread.GetLastThreadError(); // check and see if something else went wrong + status = m_thread.GetLastThreadError(); // check and see if something else went wrong } return status; @@ -156,7 +156,7 @@ CANStatus CandleWinUSBDevice::OpenStreamSession(uint32_t* sessionHandle, CANBrid CANStatus status; // Register the stream with the correct buffer size m_thread.OpenStream(sessionHandle, filter, maxSize, &status); - + return m_thread.GetLastThreadError(); } CANStatus CandleWinUSBDevice::CloseStreamSession(uint32_t sessionHandle) @@ -177,7 +177,7 @@ CANStatus CandleWinUSBDevice::GetCANDetailStatus(float* percentBusUtilization, u CANStatus CandleWinUSBDevice::GetCANDetailStatus(float* percentBusUtilization, uint32_t* busOff, uint32_t* txFull, uint32_t* receiveErr, uint32_t* transmitErr, uint32_t* lastErrorTime) { m_thread.GetCANStatusDetails(busOff, txFull, receiveErr, transmitErr, lastErrorTime); - *percentBusUtilization = 0.0; // todo how to get this + *percentBusUtilization = 0.0; // todo how to get this return m_thread.GetLastThreadError(); }