Fixed broken DBC string signal code, make signal size automatically update in signal editor

This commit is contained in:
Collin Kidder
2017-01-08 19:25:03 -05:00
parent 72ccbc8b97
commit 3d4db6e921
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ bool DBC_SIGNAL::processAsText(const CANFrame &frame, QString &outString)
if (valType == STRING)
{
QString buildString;
int startByte = signalSize / 8;
int startByte = startBit / 8;
int bytes = signalSize / 8;
for (int x = 0; x < bytes; x++) buildString.append(frame.data[startByte + x]);
outString = buildString;
+1 -1
View File
@@ -139,7 +139,7 @@ DBCSignalEditor::DBCSignalEditor(DBCHandler *handler, QWidget *parent) :
if (currentSignal == NULL) return;
currentSignal->unitName = ui->txtUnitName->text().simplified().replace(' ', '_');
});
connect(ui->txtBitLength, &QLineEdit::editingFinished,
connect(ui->txtBitLength, &QLineEdit::textChanged,
[=]()
{
if (currentSignal == NULL) return;