Added preliminary OpInf to Config Parsing
This commit is contained in:
parent
3694de425a
commit
41578f6d50
4 changed files with 49 additions and 1 deletions
|
|
@ -500,7 +500,9 @@ void ShimLCController::parseLcnf(uint32_t idVal)
|
|||
// Options
|
||||
QByteArray opInf = data.mid(578+4, 35); // Again, offset 4
|
||||
qDebug() << "Device Config: AD1 " << (quint8)opInf.at(0);
|
||||
configuration.AD1 = (quint8)opInf.at(0);
|
||||
qDebug() << "Device Config: AD2 " << (quint8)opInf.at(1);
|
||||
configuration.AD2 = (quint8)opInf.at(1);
|
||||
|
||||
emit newConfigAv();
|
||||
disconnect(&cmd, &ShimLCCommandStack::dataAvailable, this, &ShimLCController::parseLcnf);
|
||||
|
|
|
|||
|
|
@ -196,6 +196,11 @@ struct LCconfiguration
|
|||
detectors.clear();
|
||||
other.clear();
|
||||
}
|
||||
|
||||
// Options
|
||||
quint8 AD1 = 0;
|
||||
quint8 AD2 = 0;
|
||||
// TODO: Implement the rest of the options
|
||||
};
|
||||
|
||||
class CmdVal : public QObject
|
||||
|
|
|
|||
|
|
@ -36,4 +36,12 @@ void SystemConfiguration::updateTable()
|
|||
config_view_model.tableData[device.port][1] = device.version;
|
||||
config_view_model.tableData[device.port][2] = device.serial;
|
||||
}
|
||||
|
||||
// TODO: this is spaghetti code
|
||||
ui->options->clear();
|
||||
if(cmd->configuration.AD1 == 1)
|
||||
ui->options->addItem("> AD1");
|
||||
if(cmd->configuration.AD2 == 1)
|
||||
ui->options->addItem("> AD2");
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>500</height>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -26,6 +26,39 @@
|
|||
<item>
|
||||
<widget class="QTableView" name="configOverView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="options">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="topMargin">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue