Progress!
Masked error caused by saving dbc while editor is open that causes msg IDs to go crazy by making editor modal, but that affects all other windows, so might be a better fix. Added new value type of VALUE_STRING, probably better named ENUMERATED_STRING, and it uses the table in the editor to define the enum. Fixed a bug in the signal viewer load when a signal is not matched (I found it by renaming a signal and then loading)
This commit is contained in:
+13
-2
@@ -137,6 +137,17 @@ bool DBC_SIGNAL::processAsText(const CANFrame &frame, QString &outString, bool o
|
||||
cachedValue = outString;
|
||||
return true;
|
||||
}
|
||||
else if(valType == VALUE_STRING)
|
||||
{
|
||||
result = Utility::processIntegerSignal(frame.payload(), startBit, signalSize, intelByteOrder, isSigned);
|
||||
|
||||
if(!getValueString(result, outString))
|
||||
{
|
||||
outString = "Signal string value is undefined";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (valType == SIGNED_INT) isSigned = true;
|
||||
if (valType == SIGNED_INT || valType == UNSIGNED_INT)
|
||||
@@ -229,7 +240,7 @@ bool DBC_SIGNAL::processAsInt(const CANFrame &frame, int32_t &outValue)
|
||||
int32_t result = 0;
|
||||
bool isSigned = false;
|
||||
|
||||
if (valType == STRING || valType == SP_FLOAT || valType == DP_FLOAT)
|
||||
if (valType == STRING || valType == VALUE_STRING || valType == SP_FLOAT || valType == DP_FLOAT)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -262,7 +273,7 @@ bool DBC_SIGNAL::processAsDouble(const CANFrame &frame, double &outValue)
|
||||
bool isSigned = false;
|
||||
double endResult;
|
||||
|
||||
if (valType == STRING)
|
||||
if (valType == STRING || valType == VALUE_STRING)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user