手操控制测试完毕

This commit is contained in:
jhl
2023-11-29 17:47:03 +08:00
parent c71064fcb4
commit 9db47019cc
7 changed files with 57 additions and 62 deletions

View File

@@ -36,7 +36,6 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
for(p=NewMail.begin(); p!=NewMail.end(); p++) {
CMOOSMsg &msg = *p;
#if 1 // Keep these around just for template
string key = msg.GetKey();
string comm = msg.GetCommunity();
double dval = msg.GetDouble();
@@ -45,11 +44,10 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
double mtime = msg.GetTime();
bool mdbl = msg.IsDouble();
bool mstr = msg.IsString();
#endif
Json::Value deviceState;
Json::Value deviceState;
std::string manualState;
double missionState;
int missionState;
if(key == "uManual_enable_cmd")
{
@@ -74,7 +72,7 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
{
deviceState["opMode"] = opModeLists.external;
}
else if (manualState == "faluse")
else if (manualState == "false")
{
if(missionState == 0)
{
@@ -84,7 +82,7 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
{
deviceState["opMode"] = opModeLists.service;
}
else if((missionState == 3) )
if(missionState == 3)
{
deviceState["opMode"] = opModeLists.maneuver;
}