server can if

fix magic enum error by switching to the qt version
This commit is contained in:
2026-02-14 14:31:09 +01:00
parent ec40754934
commit 233546bf6c
+1 -2
View File
@@ -1,6 +1,5 @@
#include "CAN_interface.hpp" #include "CAN_interface.hpp"
#include "spdlog/spdlog.h" #include "spdlog/spdlog.h"
#include <magic_enum/magic_enum.hpp>
CAN_Interface::CAN_Interface(QObject *parent) : QObject(parent), m_canDevice(nullptr) CAN_Interface::CAN_Interface(QObject *parent) : QObject(parent), m_canDevice(nullptr)
{ {
@@ -57,7 +56,7 @@ void CAN_Interface::processErrors(QCanBusDevice::CanBusError error) const
case QCanBusDevice::ConnectionError: case QCanBusDevice::ConnectionError:
case QCanBusDevice::ConfigurationError: case QCanBusDevice::ConfigurationError:
case QCanBusDevice::UnknownError: case QCanBusDevice::UnknownError:
SPDLOG_CRITICAL("CAN Interface: {} {}", magic_enum::enum_name<QCanBusDevice::CanBusError>(error), SPDLOG_CRITICAL("CAN Interface: {} {}", qt_getEnumName(error),
m_canDevice->errorString().toStdString()); m_canDevice->errorString().toStdString());
break; break;
default: default: