修改了运动控制的显示信息,方便调试
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zjk 1553836110@qq.com
|
* @Author: zjk 1553836110@qq.com
|
||||||
* @Date: 2023-10-12 09:52:27
|
* @Date: 2023-10-12 09:52:27
|
||||||
* @LastEditors: zjk 1553836110@qq.com
|
* @LastEditors: zhaojingkui 1553836110@qq.com
|
||||||
* @LastEditTime: 2023-11-07 12:01:57
|
* @LastEditTime: 2023-11-30 11:05:18
|
||||||
* @FilePath: /moos-ivp-pi/src/pMotionControler/MotionControler.cpp
|
* @FilePath: /moos-ivp-pi/src/pMotionControler/MotionControler.cpp
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@@ -29,19 +29,33 @@ bool MotionControler::OnNewMail(MOOSMSG_LIST &NewMail)
|
|||||||
if((key == "MOOS_MANUAL_OVERIDE") || (key == "MOOS_MANUAL_OVERRIDE"))
|
if((key == "MOOS_MANUAL_OVERIDE") || (key == "MOOS_MANUAL_OVERRIDE"))
|
||||||
pengine.overrived(sval);
|
pengine.overrived(sval);
|
||||||
else if(key == "DESIRED_HEADING")
|
else if(key == "DESIRED_HEADING")
|
||||||
|
{
|
||||||
pengine.setDesHeading(dval, MOOSTime());
|
pengine.setDesHeading(dval, MOOSTime());
|
||||||
|
}
|
||||||
else if(key == "DESIRED_SPEED")
|
else if(key == "DESIRED_SPEED")
|
||||||
pengine.setDesSpeed(dval, MOOSTime());
|
pengine.setDesSpeed(dval, MOOSTime());
|
||||||
else if(key == "DESIRED_DEPTH")
|
else if(key == "DESIRED_DEPTH")
|
||||||
pengine.setDesDepth(dval, MOOSTime());
|
pengine.setDesDepth(dval, MOOSTime());
|
||||||
else if(key == "NAV_HEADING")
|
else if(key == "NAV_HEADING")
|
||||||
|
{
|
||||||
pengine.setCurHeading(angle360(dval), MOOSTime());
|
pengine.setCurHeading(angle360(dval), MOOSTime());
|
||||||
|
RepList["NAV"]["Heading"] = dval;
|
||||||
|
}
|
||||||
else if(key == "NAV_SPEED")
|
else if(key == "NAV_SPEED")
|
||||||
|
{
|
||||||
pengine.setCurSpeed(dval, MOOSTime());
|
pengine.setCurSpeed(dval, MOOSTime());
|
||||||
|
RepList["NAV"]["Speed"] = dval;
|
||||||
|
}
|
||||||
else if(key == "NAV_DEPTH")
|
else if(key == "NAV_DEPTH")
|
||||||
|
{
|
||||||
pengine.setCurDepth(dval, MOOSTime());
|
pengine.setCurDepth(dval, MOOSTime());
|
||||||
|
RepList["NAV"]["Depth"] = dval;
|
||||||
|
}
|
||||||
else if(key == "NAV_PITCH")
|
else if(key == "NAV_PITCH")
|
||||||
pengine.setCurPitch(dval, MOOSTime());
|
{
|
||||||
|
pengine.setCurPitch(dval, MOOSTime());
|
||||||
|
RepList["NAV"]["Pitch"] = dval;
|
||||||
|
}
|
||||||
else if(key == MSG_ReadConfig) //重新读取配置参数可以清除故障码
|
else if(key == MSG_ReadConfig) //重新读取配置参数可以清除故障码
|
||||||
{
|
{
|
||||||
int e = pengine.setParam(configFilePath);
|
int e = pengine.setParam(configFilePath);
|
||||||
@@ -159,7 +173,7 @@ bool MotionControler::buildReport()
|
|||||||
<< intToString(pengine.hasDphCtrl())+" |" << endl;
|
<< intToString(pengine.hasDphCtrl())+" |" << endl;
|
||||||
|
|
||||||
RepList["to BS"] = colVar;
|
RepList["to BS"] = colVar;
|
||||||
RepList["PID"] = pengine.getReport()["W"];
|
// RepList["PID"] = pengine.getReport()["W"];
|
||||||
string rep = Json::writeString(RepJsBuilder, RepList);
|
string rep = Json::writeString(RepJsBuilder, RepList);
|
||||||
m_msgs << rep << endl;
|
m_msgs << rep << endl;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user