Added a new window used to edit parameters for my motor inverter control board. Fixed firmware updater - tested to work now!
This commit is contained in:
+4
-5
@@ -49,8 +49,7 @@ SOURCES += main.cpp\
|
|||||||
can_structs.cpp \
|
can_structs.cpp \
|
||||||
isotp_interpreterwindow.cpp \
|
isotp_interpreterwindow.cpp \
|
||||||
isotp_handler.cpp \
|
isotp_handler.cpp \
|
||||||
deltawindow.cpp \
|
motorcontrollerconfigwindow.cpp
|
||||||
deltamodel.cpp
|
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
can_structs.h \
|
can_structs.h \
|
||||||
@@ -86,8 +85,7 @@ HEADERS += mainwindow.h \
|
|||||||
udsscanwindow.h \
|
udsscanwindow.h \
|
||||||
isotp_interpreterwindow.h \
|
isotp_interpreterwindow.h \
|
||||||
isotp_handler.h \
|
isotp_handler.h \
|
||||||
deltawindow.h \
|
motorcontrollerconfigwindow.h
|
||||||
deltamodel.h
|
|
||||||
|
|
||||||
FORMS += mainwindow.ui \
|
FORMS += mainwindow.ui \
|
||||||
graphingwindow.ui \
|
graphingwindow.ui \
|
||||||
@@ -110,7 +108,8 @@ FORMS += mainwindow.ui \
|
|||||||
fuzzingwindow.ui \
|
fuzzingwindow.ui \
|
||||||
udsscanwindow.ui \
|
udsscanwindow.ui \
|
||||||
isotp_interpreterwindow.ui \
|
isotp_interpreterwindow.ui \
|
||||||
deltawindow.ui
|
deltawindow.ui \
|
||||||
|
motorcontrollerconfigwindow.ui
|
||||||
|
|
||||||
DISTFILES +=
|
DISTFILES +=
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -188,6 +188,7 @@ void CANFrameModel::recalcOverwrite()
|
|||||||
|
|
||||||
QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
|
int dLen;
|
||||||
QString tempString;
|
QString tempString;
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
@@ -220,7 +221,10 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
|||||||
return QString::number(thisFrame.len);
|
return QString::number(thisFrame.len);
|
||||||
break;
|
break;
|
||||||
case 6: //data
|
case 6: //data
|
||||||
for (int i = 0; i < thisFrame.len; i++)
|
dLen = thisFrame.len;
|
||||||
|
if (dLen < 0) dLen = 0;
|
||||||
|
if (dLen > 8) dLen = 8;
|
||||||
|
for (int i = 0; i < dLen; i++)
|
||||||
{
|
{
|
||||||
tempString.append(Utility::formatNumber(thisFrame.data[i]));
|
tempString.append(Utility::formatNumber(thisFrame.data[i]));
|
||||||
tempString.append(" ");
|
tempString.append(" ");
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
#include "deltamodel.h"
|
|
||||||
|
|
||||||
DeltaModel::DeltaModel(QObject *parent)
|
|
||||||
: QAbstractTableModel(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant DeltaModel::headerData(int section, Qt::Orientation orientation, int role) const
|
|
||||||
{
|
|
||||||
// FIXME: Implement me!
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
int DeltaModel::rowCount(const QModelIndex &parent) const
|
|
||||||
{
|
|
||||||
if (!parent.isValid())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// FIXME: Implement me!
|
|
||||||
}
|
|
||||||
|
|
||||||
int DeltaModel::columnCount(const QModelIndex &parent) const
|
|
||||||
{
|
|
||||||
if (!parent.isValid())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// FIXME: Implement me!
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant DeltaModel::data(const QModelIndex &index, int role) const
|
|
||||||
{
|
|
||||||
if (!index.isValid())
|
|
||||||
return QVariant();
|
|
||||||
|
|
||||||
// FIXME: Implement me!
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#ifndef DELTAMODEL_H
|
|
||||||
#define DELTAMODEL_H
|
|
||||||
|
|
||||||
#include <QAbstractTableModel>
|
|
||||||
|
|
||||||
class DeltaModel : public QAbstractTableModel
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit DeltaModel(QObject *parent = 0);
|
|
||||||
|
|
||||||
// Header:
|
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
|
||||||
|
|
||||||
// Basic functionality:
|
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
||||||
|
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // DELTAMODEL_H
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#include "deltawindow.h"
|
|
||||||
#include "ui_deltawindow.h"
|
|
||||||
|
|
||||||
DeltaWindow::DeltaWindow(QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::DeltaWindow)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
DeltaWindow::~DeltaWindow()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#ifndef DELTAWINDOW_H
|
|
||||||
#define DELTAWINDOW_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class DeltaWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
class DeltaWindow : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit DeltaWindow(QWidget *parent = 0);
|
|
||||||
~DeltaWindow();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::DeltaWindow *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // DELTAWINDOW_H
|
|
||||||
+12
-10
@@ -71,10 +71,11 @@ void FirmwareUploaderWindow::gotTargettedFrame(int frameLoc)
|
|||||||
const CANFrame &frame = modelFrames->at(frameLoc);
|
const CANFrame &frame = modelFrames->at(frameLoc);
|
||||||
if (frame.ID == (baseAddress + 0x10)) {
|
if (frame.ID == (baseAddress + 0x10)) {
|
||||||
qDebug() << "Start firmware reply";
|
qDebug() << "Start firmware reply";
|
||||||
if ((frame.data[0] == 0xDE) && (frame.data[1] == 0xAF))
|
if ((frame.data[0] == 0xAD) && (frame.data[1] == 0xDE))
|
||||||
{
|
{
|
||||||
if ((frame.data[2] == 0xDE) && (frame.data[3] == 0xED))
|
if ((frame.data[2] == 0xAF) && (frame.data[3] == 0xDE))
|
||||||
{
|
{
|
||||||
|
qDebug() << "THere's dead beef here";
|
||||||
if ((frame.data[4] == (token & 0xFF)) && (frame.data[5] == ((token >> 8) & 0xFF)))
|
if ((frame.data[4] == (token & 0xFF)) && (frame.data[5] == ((token >> 8) & 0xFF)))
|
||||||
{
|
{
|
||||||
if ((frame.data[6] == ((token >> 16) & 0xFF)) && (frame.data[7] == ((token >> 24) & 0xFF)))
|
if ((frame.data[6] == ((token >> 16) & 0xFF)) && (frame.data[7] == ((token >> 24) & 0xFF)))
|
||||||
@@ -144,10 +145,10 @@ void FirmwareUploaderWindow::sendFirmwareEnding()
|
|||||||
output->extended = false;
|
output->extended = false;
|
||||||
output->len = 4;
|
output->len = 4;
|
||||||
output->ID = baseAddress + 0x30;
|
output->ID = baseAddress + 0x30;
|
||||||
output->data[0] = 0xC0;
|
output->data[3] = 0xC0;
|
||||||
output->data[1] = 0xDE;
|
output->data[2] = 0xDE;
|
||||||
output->data[2] = 0xFA;
|
output->data[1] = 0xFA;
|
||||||
output->data[3] = 0xDE;
|
output->data[0] = 0xDE;
|
||||||
sendCANFrame(output, bus);
|
sendCANFrame(output, bus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,10 +169,11 @@ void FirmwareUploaderWindow::handleStartStopTransfer()
|
|||||||
output->extended = false;
|
output->extended = false;
|
||||||
output->len = 8;
|
output->len = 8;
|
||||||
output->ID = baseAddress;
|
output->ID = baseAddress;
|
||||||
output->data[0] = 0xDE;
|
|
||||||
output->data[1] = 0xAD;
|
output->data[0] = 0xEF;
|
||||||
output->data[2] = 0xBE;
|
output->data[1] = 0xBE;
|
||||||
output->data[3] = 0xEF;
|
output->data[2] = 0xAD;
|
||||||
|
output->data[3] = 0xDE;
|
||||||
output->data[4] = token & 0xFF;
|
output->data[4] = token & 0xFF;
|
||||||
output->data[5] = (token >> 8) & 0xFF;
|
output->data[5] = (token >> 8) & 0xFF;
|
||||||
output->data[6] = (token >> 16) & 0xFF;
|
output->data[6] = (token >> 16) & 0xFF;
|
||||||
|
|||||||
+14
-1
@@ -98,6 +98,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
dbcFileWindow = NULL;
|
dbcFileWindow = NULL;
|
||||||
fuzzingWindow = NULL;
|
fuzzingWindow = NULL;
|
||||||
udsScanWindow = NULL;
|
udsScanWindow = NULL;
|
||||||
|
motorctrlConfigWindow = NULL;
|
||||||
isoWindow = NULL;
|
isoWindow = NULL;
|
||||||
dbcHandler = new DBCHandler;
|
dbcHandler = new DBCHandler;
|
||||||
bDirty = false;
|
bDirty = false;
|
||||||
@@ -138,11 +139,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
connect(ui->listFilters, &QListWidget::itemChanged, this, &MainWindow::filterListItemChanged);
|
connect(ui->listFilters, &QListWidget::itemChanged, this, &MainWindow::filterListItemChanged);
|
||||||
connect(ui->btnFilterAll, &QAbstractButton::clicked, this, &MainWindow::filterSetAll);
|
connect(ui->btnFilterAll, &QAbstractButton::clicked, this, &MainWindow::filterSetAll);
|
||||||
connect(ui->btnFilterNone, &QAbstractButton::clicked, this, &MainWindow::filterClearAll);
|
connect(ui->btnFilterNone, &QAbstractButton::clicked, this, &MainWindow::filterClearAll);
|
||||||
connect(ui->actionFirmware_Uploader, &QAction::triggered, this, &MainWindow::showFirmwareUploaderWindow);
|
connect(ui->actionFirmware_Update, &QAction::triggered, this, &MainWindow::showFirmwareUploaderWindow);
|
||||||
connect(ui->actionDBC_File_Manager, &QAction::triggered, this, &MainWindow::showDBCFileWindow);
|
connect(ui->actionDBC_File_Manager, &QAction::triggered, this, &MainWindow::showDBCFileWindow);
|
||||||
connect(ui->actionFuzzing, &QAction::triggered, this, &MainWindow::showFuzzingWindow);
|
connect(ui->actionFuzzing, &QAction::triggered, this, &MainWindow::showFuzzingWindow);
|
||||||
connect(ui->actionUDS_Scanner, &QAction::triggered, this, &MainWindow::showUDSScanWindow);
|
connect(ui->actionUDS_Scanner, &QAction::triggered, this, &MainWindow::showUDSScanWindow);
|
||||||
connect(ui->actionISO_TP_Decoder, &QAction::triggered, this, &MainWindow::showISOInterpreterWindow);
|
connect(ui->actionISO_TP_Decoder, &QAction::triggered, this, &MainWindow::showISOInterpreterWindow);
|
||||||
|
connect(ui->actionMotorControlConfig, &QAction::triggered, this, &MainWindow::showMCConfigWindow);
|
||||||
|
|
||||||
lbStatusConnected.setText(tr("Not connected"));
|
lbStatusConnected.setText(tr("Not connected"));
|
||||||
updateFileStatus();
|
updateFileStatus();
|
||||||
@@ -978,6 +980,17 @@ void MainWindow::showFuzzingWindow()
|
|||||||
fuzzingWindow->show();
|
fuzzingWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::showMCConfigWindow()
|
||||||
|
{
|
||||||
|
if (!motorctrlConfigWindow)
|
||||||
|
{
|
||||||
|
motorctrlConfigWindow = new MotorControllerConfigWindow(model->getListReference());
|
||||||
|
connect(motorctrlConfigWindow, SIGNAL(sendCANFrame(const CANFrame*,int)), worker, SLOT(sendFrame(const CANFrame*,int)));
|
||||||
|
connect(motorctrlConfigWindow, SIGNAL(sendFrameBatch(const QList<CANFrame>*)), worker, SLOT(sendFrameBatch(const QList<CANFrame>*)));
|
||||||
|
}
|
||||||
|
motorctrlConfigWindow->show();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::showUDSScanWindow()
|
void MainWindow::showUDSScanWindow()
|
||||||
{
|
{
|
||||||
if (!udsScanWindow)
|
if (!udsScanWindow)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include "fuzzingwindow.h"
|
#include "fuzzingwindow.h"
|
||||||
#include "udsscanwindow.h"
|
#include "udsscanwindow.h"
|
||||||
#include "isotp_interpreterwindow.h"
|
#include "isotp_interpreterwindow.h"
|
||||||
|
#include "motorcontrollerconfigwindow.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
@@ -65,6 +66,7 @@ private slots:
|
|||||||
void showScriptingWindow();
|
void showScriptingWindow();
|
||||||
void showDBCFileWindow();
|
void showDBCFileWindow();
|
||||||
void showFuzzingWindow();
|
void showFuzzingWindow();
|
||||||
|
void showMCConfigWindow();
|
||||||
void showUDSScanWindow();
|
void showUDSScanWindow();
|
||||||
void showISOInterpreterWindow();
|
void showISOInterpreterWindow();
|
||||||
void exitApp();
|
void exitApp();
|
||||||
@@ -144,6 +146,7 @@ private:
|
|||||||
FuzzingWindow *fuzzingWindow;
|
FuzzingWindow *fuzzingWindow;
|
||||||
UDSScanWindow *udsScanWindow;
|
UDSScanWindow *udsScanWindow;
|
||||||
ISOTP_InterpreterWindow *isoWindow;
|
ISOTP_InterpreterWindow *isoWindow;
|
||||||
|
MotorControllerConfigWindow *motorctrlConfigWindow;
|
||||||
|
|
||||||
//various private storage
|
//various private storage
|
||||||
QLabel lbStatusConnected;
|
QLabel lbStatusConnected;
|
||||||
|
|||||||
@@ -221,6 +221,8 @@
|
|||||||
<addaction name="actionScripting_INterface"/>
|
<addaction name="actionScripting_INterface"/>
|
||||||
<addaction name="actionFuzzing"/>
|
<addaction name="actionFuzzing"/>
|
||||||
<addaction name="actionUDS_Scanner"/>
|
<addaction name="actionUDS_Scanner"/>
|
||||||
|
<addaction name="actionFirmware_Update"/>
|
||||||
|
<addaction name="actionMotorControlConfig"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -393,6 +395,16 @@
|
|||||||
<string>ISO-TP Decoder</string>
|
<string>ISO-TP Decoder</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionFirmware_Update">
|
||||||
|
<property name="text">
|
||||||
|
<string>Firmware Update</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionMotorControlConfig">
|
||||||
|
<property name="text">
|
||||||
|
<string>MotorControlConfig</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
@@ -0,0 +1,406 @@
|
|||||||
|
#include "motorcontrollerconfigwindow.h"
|
||||||
|
#include "ui_motorcontrollerconfigwindow.h"
|
||||||
|
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
MotorControllerConfigWindow::MotorControllerConfigWindow(const QVector<CANFrame> *frames, QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::MotorControllerConfigWindow)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
modelFrames = frames;
|
||||||
|
|
||||||
|
timer.setInterval(40);
|
||||||
|
transmitStep = 0;
|
||||||
|
doingRequest = false;
|
||||||
|
|
||||||
|
connect(MainWindow::getReference(), SIGNAL(framesUpdated(int)), this, SLOT(updatedFrames(int)));
|
||||||
|
connect(ui->btnRefresh, SIGNAL(clicked(bool)), this, SLOT(refreshData()));
|
||||||
|
connect(ui->btnSave, SIGNAL(clicked(bool)), this, SLOT(saveData()));
|
||||||
|
connect(&timer, SIGNAL(timeout()), this, SLOT(timerTick()));
|
||||||
|
}
|
||||||
|
|
||||||
|
MotorControllerConfigWindow::~MotorControllerConfigWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::updatedFrames(int numFrames)
|
||||||
|
{
|
||||||
|
CANFrame thisFrame;
|
||||||
|
int id;
|
||||||
|
int param;
|
||||||
|
float valu;
|
||||||
|
uint8_t eightval;
|
||||||
|
uint16_t sixteenval;
|
||||||
|
uint32_t thirtytwoval;
|
||||||
|
if (numFrames == -1) //all frames deleted
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (numFrames == -2) //all new set of frames. Reset
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else //just got some new frames. See if they are relevant.
|
||||||
|
{
|
||||||
|
if (numFrames > modelFrames->count()) return;
|
||||||
|
for (int i = modelFrames->count() - numFrames; i < modelFrames->count(); i++)
|
||||||
|
{
|
||||||
|
thisFrame = modelFrames->at(i);
|
||||||
|
id = thisFrame.ID;
|
||||||
|
|
||||||
|
if (id == 0x420)
|
||||||
|
{
|
||||||
|
param = thisFrame.data[0];
|
||||||
|
eightval = thisFrame.data[1];
|
||||||
|
sixteenval = thisFrame.data[1] + (thisFrame.data[2] * 256ul);
|
||||||
|
thirtytwoval = sixteenval + (thisFrame.data[3] * 65536ul) + (thisFrame.data[4] * 256ul * 65536ul);
|
||||||
|
|
||||||
|
switch (param)
|
||||||
|
{
|
||||||
|
case 0: //voltage scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editVoltageScale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 1: //voltage bias
|
||||||
|
ui->editVoltageOffset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 2: //current 1 scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editCurrent1Scale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 3: //current 1 bias
|
||||||
|
ui->editCurrent1Offset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 4: //current 2 scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editCurrent2Scale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 5: //current 2 bias
|
||||||
|
ui->editCurrent2Offset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 6: //Inverter temp 1 scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editInvTemp1Scale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 7: //Inverter temp 1 bias
|
||||||
|
ui->editInvTemp1Offset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 8: //Inverter temp 2 scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editInvTemp2Scale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 9: //Inverter temp 2 bias
|
||||||
|
ui->editInvTemp2Offset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 10: //Motor temp 1 scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editMotorTemp1Scale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 11: //Motor temp 1 bias
|
||||||
|
ui->editMotorTemp1Offset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 12: //Motor temp 2 scale (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editMotorTemp2Scale->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 13: //Motor temp 2 bias
|
||||||
|
ui->editMotorTemp2Offset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 14: //motor type (inductive, pmac, bldc)
|
||||||
|
ui->editMotorType->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
case 15: //control type (vhz, foc)
|
||||||
|
ui->editControlType->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
case 16: //encoder count
|
||||||
|
ui->editEncoderCount->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 17: //encoder direction (0 = normal, 1 = reversed)
|
||||||
|
ui->editEncoderDir->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
ui->editPolePairs->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
case 19: //rotor time const (*65536)
|
||||||
|
valu = thirtytwoval / 65536.0f;
|
||||||
|
ui->editRotorTime->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 20: //Torque KP (*4096)
|
||||||
|
valu = thirtytwoval / 4096.0f;
|
||||||
|
ui->editTorqueKP->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 21: //Torque KI (*4096)
|
||||||
|
valu = thirtytwoval / 4096.0f;
|
||||||
|
ui->editTorqueKI->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 22: //Torque KD (*4096)
|
||||||
|
valu = thirtytwoval / 4096.0f;
|
||||||
|
ui->editTorqueKD->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 23: //Max RPM
|
||||||
|
ui->editMaxRPM->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 24: //Max Torque
|
||||||
|
valu = sixteenval / 10.0f;
|
||||||
|
ui->editMaxTorque->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 25: //Max Amps in Drive
|
||||||
|
valu = sixteenval / 10.0f;
|
||||||
|
ui->editMaxAmpsDrive->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 26: //Max Amps in Regen
|
||||||
|
valu = sixteenval / 10.0f;
|
||||||
|
ui->editMaxAmpsRegen->setText(QString::number(valu, 'g', 4));
|
||||||
|
break;
|
||||||
|
case 27: //VHz Full Speed
|
||||||
|
ui->editVHZFull->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 28: //Theta offset
|
||||||
|
ui->editThetaOffset->setText(QString::number(sixteenval));
|
||||||
|
break;
|
||||||
|
case 29: //Hall AB
|
||||||
|
ui->editHallAB->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
case 30: //Hall BC
|
||||||
|
ui->editHallBC->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
case 31: //Hall CA
|
||||||
|
ui->editHallCA->setText(QString::number(eightval));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::refreshData()
|
||||||
|
{
|
||||||
|
doingRequest = true;
|
||||||
|
transmitStep = 0;
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::saveData()
|
||||||
|
{
|
||||||
|
doingRequest = false;
|
||||||
|
transmitStep = 0;
|
||||||
|
timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::timerTick()
|
||||||
|
{
|
||||||
|
float valu;
|
||||||
|
uint32_t intval32;
|
||||||
|
uint16_t intval16;
|
||||||
|
uint8_t intval8;
|
||||||
|
|
||||||
|
if (doingRequest) //send requests for data
|
||||||
|
{
|
||||||
|
//qDebug() << "Request: " << QString::number(transmitStep);
|
||||||
|
send8BitParam(transmitStep, 0);
|
||||||
|
transmitStep++;
|
||||||
|
if (transmitStep == 32)
|
||||||
|
{
|
||||||
|
timer.stop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else //save current value of all data items
|
||||||
|
{
|
||||||
|
//qDebug() << "Transmission: " << QString::number(transmitStep);
|
||||||
|
switch (transmitStep)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
valu = ui->editVoltageScale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
intval16 = ui->editVoltageOffset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
valu = ui->editCurrent1Scale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
intval16 = ui->editCurrent1Offset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
valu = ui->editCurrent2Scale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
intval16 = ui->editCurrent2Offset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 6: //Inverter temp 1 scale (*65536)
|
||||||
|
valu = ui->editInvTemp1Scale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 7: //Inverter temp 1 bias
|
||||||
|
intval16 = ui->editInvTemp1Offset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 8: //Inverter temp 2 scale (*65536)
|
||||||
|
valu = ui->editInvTemp2Scale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 9: //Inverter temp 2 bias
|
||||||
|
intval16 = ui->editInvTemp2Offset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 10: //Motor temp 1 scale (*65536)
|
||||||
|
valu = ui->editMotorTemp1Scale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 11: //Motor temp 1 bias
|
||||||
|
intval16 = ui->editMotorTemp1Offset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 12: //Motor temp 2 scale (*65536)
|
||||||
|
valu = ui->editMotorTemp2Scale->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 13: //Motor temp 2 bias
|
||||||
|
intval16 = ui->editMotorTemp2Offset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 14: //motor type (inductive, pmac, bldc)
|
||||||
|
intval8 = ui->editMotorType->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 15: //control type (vhz, foc)
|
||||||
|
intval8 = ui->editControlType->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 16: //encoder count
|
||||||
|
intval16 = ui->editEncoderCount->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 17: //encoder direction (0 = normal, 1 = reversed)
|
||||||
|
intval8 = ui->editEncoderDir->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
intval8 = ui->editPolePairs->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 19: //rotor time const (*65536)
|
||||||
|
valu = ui->editRotorTime->text().toFloat();
|
||||||
|
intval32 = valu * 65536;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 20: //Torque KP (*4096)
|
||||||
|
valu = ui->editTorqueKP->text().toFloat();
|
||||||
|
intval32 = valu * 4096;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 21: //Torque KI (*4096)
|
||||||
|
valu = ui->editTorqueKI->text().toFloat();
|
||||||
|
intval32 = valu * 4096;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 22: //Torque KD (*4096)
|
||||||
|
valu = ui->editTorqueKD->text().toFloat();
|
||||||
|
intval32 = valu * 4096;
|
||||||
|
send32BitParam(0x80 + transmitStep, intval32);
|
||||||
|
break;
|
||||||
|
case 23: //Max RPM
|
||||||
|
intval16 = ui->editMaxRPM->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 24: //Max Torque
|
||||||
|
valu = ui->editMaxTorque->text().toFloat();
|
||||||
|
intval16 = valu * 10;
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 25: //Max Amps in Drive
|
||||||
|
valu = ui->editMaxAmpsDrive->text().toFloat();
|
||||||
|
intval16 = valu * 10;
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 26: //Max Amps in Regen
|
||||||
|
valu = ui->editMaxAmpsRegen->text().toFloat();
|
||||||
|
intval16 = valu * 10;
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 27: //VHz Full Speed
|
||||||
|
intval16 = ui->editVHZFull->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 28: //Theta offset
|
||||||
|
intval16 = ui->editThetaOffset->text().toInt();
|
||||||
|
send16BitParam(0x80 + transmitStep, intval16);
|
||||||
|
break;
|
||||||
|
case 29: //Hall AB
|
||||||
|
intval8 = ui->editHallAB->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 30: //Hall BC
|
||||||
|
intval8 = ui->editHallBC->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 31: //Hall CA
|
||||||
|
intval8 = ui->editHallCA->text().toInt();
|
||||||
|
send8BitParam(0x80 + transmitStep, intval8);
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
timer.stop();
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
transmitStep++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::send32BitParam(int param, uint32_t valu)
|
||||||
|
{
|
||||||
|
outFrame.ID = 0x230;
|
||||||
|
outFrame.len = 5;
|
||||||
|
outFrame.bus = 0;
|
||||||
|
outFrame.extended = false;
|
||||||
|
outFrame.data[0] = param & 0xFF;
|
||||||
|
outFrame.data[1] = valu & 0xFF;
|
||||||
|
outFrame.data[2] = (valu >> 8) & 0xFF;
|
||||||
|
outFrame.data[3] = (valu >> 16) & 0xFF;
|
||||||
|
outFrame.data[4] = (valu >> 24) & 0xFF;
|
||||||
|
|
||||||
|
emit sendCANFrame(&outFrame, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::send16BitParam(int param, uint16_t valu)
|
||||||
|
{
|
||||||
|
outFrame.ID = 0x230;
|
||||||
|
outFrame.len = 3;
|
||||||
|
outFrame.bus = 0;
|
||||||
|
outFrame.extended = false;
|
||||||
|
outFrame.data[0] = param & 0xFF;
|
||||||
|
outFrame.data[1] = valu & 0xFF;
|
||||||
|
outFrame.data[2] = (valu >> 8) & 0xFF;
|
||||||
|
|
||||||
|
emit sendCANFrame(&outFrame, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MotorControllerConfigWindow::send8BitParam(int param, uint8_t valu)
|
||||||
|
{
|
||||||
|
outFrame.ID = 0x230;
|
||||||
|
outFrame.len = 2;
|
||||||
|
outFrame.bus = 0;
|
||||||
|
outFrame.extended = false;
|
||||||
|
outFrame.data[0] = param & 0xFF;
|
||||||
|
outFrame.data[1] = valu;
|
||||||
|
|
||||||
|
emit sendCANFrame(&outFrame, 0);
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#ifndef MOTORCONTROLLERCONFIGWINDOW_H
|
||||||
|
#define MOTORCONTROLLERCONFIGWINDOW_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QTimer>
|
||||||
|
#include "can_structs.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MotorControllerConfigWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MotorControllerConfigWindow : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MotorControllerConfigWindow(const QVector<CANFrame> *frames, QWidget *parent = 0);
|
||||||
|
~MotorControllerConfigWindow();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sendCANFrame(const CANFrame *, int);
|
||||||
|
void sendFrameBatch(const QList<CANFrame> *);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void updatedFrames(int numFrames);
|
||||||
|
void refreshData();
|
||||||
|
void saveData();
|
||||||
|
void timerTick();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MotorControllerConfigWindow *ui;
|
||||||
|
const QVector<CANFrame> *modelFrames;
|
||||||
|
QTimer timer;
|
||||||
|
CANFrame outFrame;
|
||||||
|
bool doingRequest;
|
||||||
|
int transmitStep;
|
||||||
|
|
||||||
|
void send32BitParam(int param, uint32_t valu);
|
||||||
|
void send16BitParam(int param, uint16_t valu);
|
||||||
|
void send8BitParam(int param, uint8_t valu);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MOTORCONTROLLERCONFIGWINDOW_H
|
||||||
@@ -0,0 +1,363 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MotorControllerConfigWindow</class>
|
||||||
|
<widget class="QDialog" name="MotorControllerConfigWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>902</width>
|
||||||
|
<height>328</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Controller Configuration</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="2" column="7">
|
||||||
|
<widget class="QLineEdit" name="editMotorTemp1Offset"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inv Temp 2 Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="6">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Current 1 Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<widget class="QLabel" name="label_23">
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="7">
|
||||||
|
<widget class="QLineEdit" name="editCurrent1Offset"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="4">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor Temp 1 Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QLabel" name="label_14">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inv Temp 1 Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor Temp 2 Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>Encoder Count</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="4">
|
||||||
|
<widget class="QLabel" name="label_25">
|
||||||
|
<property name="text">
|
||||||
|
<string>Pole Pairs</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="editEncoderCount"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5">
|
||||||
|
<widget class="QLineEdit" name="editCurrent1Scale"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="3">
|
||||||
|
<widget class="QLineEdit" name="editEncoderDir"/>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="7">
|
||||||
|
<widget class="QLineEdit" name="editRotorTime"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="editCurrent2Scale"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Torque</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="6">
|
||||||
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor Temp 1 Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<widget class="QLabel" name="label_19">
|
||||||
|
<property name="text">
|
||||||
|
<string>Encoder Direction</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Voltage Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="6">
|
||||||
|
<widget class="QLabel" name="label_24">
|
||||||
|
<property name="text">
|
||||||
|
<string>Control Type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLineEdit" name="editVoltageOffset"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QLineEdit" name="editCurrent2Offset"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5">
|
||||||
|
<widget class="QLineEdit" name="editInvTemp1Scale"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="7">
|
||||||
|
<widget class="QLineEdit" name="editInvTemp1Offset"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QLineEdit" name="editInvTemp2Offset"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Torque KP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor Temp 2 Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Current 1 Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inv Temp 2 Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="6">
|
||||||
|
<widget class="QLabel" name="label_30">
|
||||||
|
<property name="text">
|
||||||
|
<string>VHz Full RPM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<widget class="QLineEdit" name="editMotorTemp2Offset"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="5">
|
||||||
|
<widget class="QLineEdit" name="editMotorType"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="editVoltageScale"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
|
<widget class="QLabel" name="label_20">
|
||||||
|
<property name="text">
|
||||||
|
<string>Torque KI</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="editInvTemp2Scale"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="text">
|
||||||
|
<string>Current 2 Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Voltage Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Current 2 Scale</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="6">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="text">
|
||||||
|
<string>Rotor Time Const</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="4">
|
||||||
|
<widget class="QLabel" name="label_27">
|
||||||
|
<property name="text">
|
||||||
|
<string>Torque KD</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="QLabel" name="label_21">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Amps Drive</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="6">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="text">
|
||||||
|
<string>Inv Temp 1 Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="4">
|
||||||
|
<widget class="QLabel" name="label_29">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Amps Regen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="editMotorTemp2Scale"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="2">
|
||||||
|
<widget class="QLabel" name="label_22">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hall AB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Theta Offset</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="5">
|
||||||
|
<widget class="QLineEdit" name="editMotorTemp1Scale"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="6">
|
||||||
|
<widget class="QLabel" name="label_32">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hall CA</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="5">
|
||||||
|
<widget class="QLineEdit" name="editPolePairs"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="6">
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="text">
|
||||||
|
<string>Max RPM</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="4">
|
||||||
|
<widget class="QLabel" name="label_31">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hall BC</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="7">
|
||||||
|
<widget class="QLineEdit" name="editControlType"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLineEdit" name="editTorqueKP"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="3">
|
||||||
|
<widget class="QLineEdit" name="editTorqueKI"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="5">
|
||||||
|
<widget class="QLineEdit" name="editTorqueKD"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="7">
|
||||||
|
<widget class="QLineEdit" name="editMaxRPM"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QLineEdit" name="editMaxTorque"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="3">
|
||||||
|
<widget class="QLineEdit" name="editMaxAmpsDrive"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="5">
|
||||||
|
<widget class="QLineEdit" name="editMaxAmpsRegen"/>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="7">
|
||||||
|
<widget class="QLineEdit" name="editVHZFull"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QLineEdit" name="editThetaOffset"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="3">
|
||||||
|
<widget class="QLineEdit" name="editHallAB"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="5">
|
||||||
|
<widget class="QLineEdit" name="editHallBC"/>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="7">
|
||||||
|
<widget class="QLineEdit" name="editHallCA"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnRefresh">
|
||||||
|
<property name="text">
|
||||||
|
<string>Refresh</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnSave">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user