Added: 1) Added check for transition to new speed and parity. 2) Added the ability to stop scanning before polling all addresses. 3) A window has been added that allows you to set the value of multiple registers at once. Supports both simple saving on the device and the saved-sent mode. 4) Added check for parity and speed changes. 5) Added output of current voltage to the table. 6) Now, when you click on an indicator in the table, the corresponding element will be highlighted. Minor updates: 1) Now the device settings take into account the number of boards found during scanning. 2) When you close the main window, the device turns off.
46 lines
967 B
C++
46 lines
967 B
C++
#ifndef MULTIPLESETTINGS_H
|
|
#define MULTIPLESETTINGS_H
|
|
|
|
#include <QDialog>
|
|
#include <QPushButton>
|
|
|
|
namespace Ui {
|
|
class MultipleSettings;
|
|
}
|
|
|
|
class MultipleSettings : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MultipleSettings(QWidget *parent = nullptr);
|
|
~MultipleSettings();
|
|
quint16 getNewValue() {return newValue;}
|
|
unsigned getStartAdr() {return startAdr;}
|
|
unsigned getCountReg() {return countReg;}
|
|
short getTypeReg() {return typeReg;}
|
|
short getBoardId() {return boardId;}
|
|
signals:
|
|
void write();
|
|
void writeAndSend();
|
|
|
|
private slots:
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
|
|
|
void on_regTypeBox_currentIndexChanged(int index);
|
|
|
|
void on_boardBox_currentIndexChanged(int index);
|
|
|
|
void on_adrBox_valueChanged(int arg1);
|
|
|
|
private:
|
|
Ui::MultipleSettings *ui;
|
|
quint16 newValue = 0;
|
|
unsigned startAdr;
|
|
unsigned countReg;
|
|
short typeReg;
|
|
short boardId;
|
|
};
|
|
|
|
#endif // MULTIPLESETTINGS_H
|