Fixed broken DBC string signal code, make signal size automatically update in signal editor
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ bool DBC_SIGNAL::processAsText(const CANFrame &frame, QString &outString)
|
|||||||
if (valType == STRING)
|
if (valType == STRING)
|
||||||
{
|
{
|
||||||
QString buildString;
|
QString buildString;
|
||||||
int startByte = signalSize / 8;
|
int startByte = startBit / 8;
|
||||||
int bytes = signalSize / 8;
|
int bytes = signalSize / 8;
|
||||||
for (int x = 0; x < bytes; x++) buildString.append(frame.data[startByte + x]);
|
for (int x = 0; x < bytes; x++) buildString.append(frame.data[startByte + x]);
|
||||||
outString = buildString;
|
outString = buildString;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ DBCSignalEditor::DBCSignalEditor(DBCHandler *handler, QWidget *parent) :
|
|||||||
if (currentSignal == NULL) return;
|
if (currentSignal == NULL) return;
|
||||||
currentSignal->unitName = ui->txtUnitName->text().simplified().replace(' ', '_');
|
currentSignal->unitName = ui->txtUnitName->text().simplified().replace(' ', '_');
|
||||||
});
|
});
|
||||||
connect(ui->txtBitLength, &QLineEdit::editingFinished,
|
connect(ui->txtBitLength, &QLineEdit::textChanged,
|
||||||
[=]()
|
[=]()
|
||||||
{
|
{
|
||||||
if (currentSignal == NULL) return;
|
if (currentSignal == NULL) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user