取消了自动反馈机制 增加了手动反馈机制 修改了若干bug

This commit is contained in:
xin
2020-08-27 14:06:45 +08:00
parent 2f67b91000
commit 4f5169ed2f
3 changed files with 166 additions and 20 deletions

View File

@ -57,6 +57,13 @@ enum ProTools
RS232 = 0,
RS485 = 1,
NETTCP=2
};
struct ByteBack
{
float Speed;
int Location;
unsigned int Stata;
};
/********************************************************************
* 描述:马达控制程序
@ -224,19 +231,19 @@ public:
void SettingUpandDownSpeed(int addspeed, int downspeed);
void StopMotormove(QString motornetid = "non");
ByteBack GetState(QString motorid = "non");
QStringList Motorlist;
bool IsMotorInit;
signals:
void SendLogToCallClass(QString str);
public slots :
void onNewTcpClinetConnet();
void onReciveFromClinet();
void onClinetDisConnet();
private:
QSerialPort *serial;
void onReciveFromClinet(QString motornetid = "non");
bool IsMotorInit;
ProTools protools;
QString RS485ID;
unsigned long speed;
@ -247,8 +254,11 @@ private:
QList<int> Speedlist;
bool SpeedisSet;
int Speednow;
void GetCommonRetrun(QByteArray &buf,QString id="non");
//
void SettingSpeedByThis(long Speed, QString motornetid = "non");
ByteBack TranslateBytedata(QByteArray buf, QString motornetid = "non");
void initme();
};