-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix various compiler warnings along the way.
- Loading branch information
1 parent
cbb0751
commit 84a9eb9
Showing
4 changed files
with
22 additions
and
28 deletions.
There are no files selected for viewing
Submodule Boards
updated
1013 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2020-2022 Jean Gressmann <[email protected]> | ||
* Copyright (c) 2020-2024 Jean Gressmann <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -83,9 +83,6 @@ inline uint8_t len_to_dlc(uint8_t len) | |
|
||
bool SuperCanBackend::canCreate(QString *errorReason) | ||
{ | ||
// *errorReason = tr("SuperCAN COM server not registered"); | ||
// return false; | ||
|
||
ComScope cs; | ||
|
||
if (cs) { | ||
|
@@ -116,8 +113,7 @@ QList<QCanBusDeviceInfo> SuperCanBackend::interfaces() | |
|
||
hr = sc->DeviceScan(&count); | ||
if (SUCCEEDED(hr)) { | ||
|
||
for ( unsigned long i = 0; i < count; ++i) { | ||
for (unsigned long i = 0; i < count; ++i) { | ||
|
||
SuperCAN::ISuperCANDevicePtr dev; | ||
SuperCAN::SuperCANDeviceData devData; | ||
|
@@ -150,10 +146,10 @@ QList<QCanBusDeviceInfo> SuperCanBackend::interfaces() | |
result << devInfo; | ||
|
||
} else { | ||
qCWarning(QT_CANBUS_PLUGINS_SUPERCAN, "Failed to get device data for device index %zu (hr=%lx).", i, hr); | ||
qCWarning(QT_CANBUS_PLUGINS_SUPERCAN, "Failed to get device data for device index %lu (hr=%lx).", i, hr); | ||
} | ||
} else { | ||
qCWarning(QT_CANBUS_PLUGINS_SUPERCAN, "Failed to open device index %zu (hr=%lx).", i, hr); | ||
qCWarning(QT_CANBUS_PLUGINS_SUPERCAN, "Failed to open device index %lu (hr=%lx).", i, hr); | ||
} | ||
} | ||
} else { | ||
|
@@ -509,13 +505,13 @@ void SuperCanBackend::expired() | |
} | ||
|
||
if (log_data.level < SC_DLL_LOG_LEVEL_WARNING) { | ||
qCCritical(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", log_data.data); | ||
qCCritical(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", src, log_data.data); | ||
} else if (log_data.level < SC_DLL_LOG_LEVEL_INFO) { | ||
qCWarning(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", log_data.data); | ||
qCWarning(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", src, log_data.data); | ||
} else if (log_data.level < SC_DLL_LOG_LEVEL_DEBUG) { | ||
qCInfo(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", log_data.data); | ||
qCInfo(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", src, log_data.data); | ||
} else { | ||
qCDebug(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", log_data.data); | ||
qCDebug(QT_CANBUS_PLUGINS_SUPERCAN, "%s: %s\n", src, log_data.data); | ||
} | ||
} break; | ||
default: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2020-2021 Jean Gressmann <[email protected]> | ||
* Copyright (c) 2020-2024 Jean Gressmann <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -34,14 +34,12 @@ | |
#include <QtCore/qlist.h> | ||
#include <QtCore/qtimer.h> | ||
|
||
#ifndef _MSC_VER | ||
#error Please use a Microsoft compiler to build this project | ||
#endif | ||
|
||
#include <qt_windows.h> | ||
#include <supercan_srv.h> | ||
#include <supercan_winapi.h> | ||
#import <supercan_srv.tlb> raw_interfaces_only | ||
#include "supercan_srv.tlh.h" | ||
|
||
|
||
|
||
QT_BEGIN_NAMESPACE | ||
|
@@ -107,10 +105,10 @@ class SuperCanBackend : public QCanBusDevice | |
public: | ||
enum SuperCanConfigKey { | ||
DontConfigureKey = UserKey, // Don't attempt to configure the bus | ||
NominalSamplePoint, // defaults to CiA recommendataion | ||
DataSamplePoint, // defaults to CiA recommendataion | ||
NominalSjw, // defaults to CiA recommendataion | ||
DataSjw, // defaults to CiA recommendataion | ||
NominalSamplePoint, // defaults to CiA recommendation | ||
DataSamplePoint, // defaults to CiA recommendation | ||
NominalSjw, // defaults to CiA recommendation | ||
DataSjw, // defaults to CiA recommendation | ||
}; | ||
Q_ENUM(SuperCanConfigKey) | ||
|
||
|