More fixes for compile warnings

This commit is contained in:
Collin Kidder
2019-08-08 21:49:03 -04:00
parent e7e65b7216
commit 947f24f267
9 changed files with 34 additions and 30 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ public:
int bus;
bool extended;
bool isReceived;
uint32_t len; //# of bytes this message should have (as reported)
uint32_t actualSize; //# we actually got
int len; //# of bytes this message should have (as reported)
int actualSize; //# we actually got
QVector<unsigned char> data;
uint64_t timestamp;
};
+6 -6
View File
@@ -4,14 +4,14 @@
#include "isotp_handler.h"
#include <QDebug>
QVector<CODE_STRUCT> UDS_DIAG_CTRL_SUB = {
static QVector<CODE_STRUCT> UDS_DIAG_CTRL_SUB = {
{1,"DFLT_SESS", "Default session"},
{2,"PROG_SESS", "Programming Session"},
{3,"EXT_SESS", "Extended Diagnostics Session"},
{4,"SAFETY_SESS", "Safety System Diagnostics Session"},
};
QVector<CODE_STRUCT> UDS_ECU_RESET_SUB = {
static QVector<CODE_STRUCT> UDS_ECU_RESET_SUB = {
{1,"HARD_RESET", "Hard reset of ECU"},
{2,"KEYOFFON_RESET", "Simulated key off then on reset"},
{3,"SOFT_RESET", "Soft reset - leaving RAM intact"},
@@ -19,7 +19,7 @@ QVector<CODE_STRUCT> UDS_ECU_RESET_SUB = {
{5,"DIS_POWERDOWN_RESET", "Disable sleep mode"},
};
QVector<CODE_STRUCT> UDS_COMM_CTRL_SUB = {
static QVector<CODE_STRUCT> UDS_COMM_CTRL_SUB = {
{0,"COMM_NORMAL", "Enable both Rx and Tx of normal messages"},
{1,"COMM_DIS_TX", "Enable reception of normal messages but don't Tx them"},
{3,"COMM_DIS_ALL", "Disable both Rx and Tx of non-diagnostics messages"},
@@ -27,13 +27,13 @@ QVector<CODE_STRUCT> UDS_COMM_CTRL_SUB = {
{5,"COMM_ENHANC", "Addressed bus master should set related sub-bus to app scheduling mode"},
};
QVector<CODE_STRUCT> UDS_ROUTINE_SUB = {
static QVector<CODE_STRUCT> UDS_ROUTINE_SUB = {
{1,"START_ROUTINE", "Start routine by given ID"},
{2,"STOP_ROUTINE", "Stop routine by given ID"},
{3,"GET_ROUTINE_RESULTS", "Get results from routine specified by ID"},
};
QVector<CODE_STRUCT> UDS_SERVICE_DESC = {
static QVector<CODE_STRUCT> UDS_SERVICE_DESC = {
{1, "OBDII_SHOW_CURRENT", "OBDII - Show current data"},
{2, "OBDII_SHOW_FREEZE", "OBDII - Show freeze data"},
{3, "OBDII_SHOW_STORED_DTC", "OBDII - Show stored DTC codes"},
@@ -84,7 +84,7 @@ QVector<CODE_STRUCT> UDS_SERVICE_DESC = {
{0xFF, "UNKNOWN_CODE", "Unknown, likely proprietary UDS function code"}
};
QVector<CODE_STRUCT> UDS_NEG_RESPONSE =
static QVector<CODE_STRUCT> UDS_NEG_RESPONSE =
{
{0x10, "GENERAL_REJECT", "General rejection (no other codes matched)"},
{0x11, "SERVICE_NOTSUPP", "ECU does not support this service code"},
+4 -4
View File
@@ -65,7 +65,7 @@ namespace UDS_SERVICES
struct CODE_STRUCT
{
unsigned int code;
int code;
QString shortDesc;
QString longDesc;
};
@@ -73,9 +73,9 @@ struct CODE_STRUCT
class UDS_MESSAGE: public ISOTP_MESSAGE
{
public:
unsigned int service;
unsigned int subFunc;
unsigned int subFuncLen;
int service;
int subFunc;
int subFuncLen;
bool isErrorReply;
UDS_MESSAGE();