解决了冲突
This commit is contained in:
@@ -47,12 +47,12 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
|
||||
bool mstr = msg.IsString();
|
||||
|
||||
Json::Value deviceState;
|
||||
double manualState;
|
||||
int missionState;
|
||||
std::string manualState;
|
||||
int missionState;
|
||||
|
||||
if(key == "uManual_enable_cmd")
|
||||
{
|
||||
manualState = msg.GetDouble();
|
||||
manualState = msg.GetString();
|
||||
}
|
||||
if(key == "uMission_task_fb")
|
||||
{
|
||||
@@ -69,13 +69,13 @@ bool StateManagement::OnNewMail(MOOSMSG_LIST &NewMail)
|
||||
missionState = missionStateData["state"].asInt();
|
||||
}
|
||||
|
||||
if(fabs(manualState - 1) < 1e-6) //manualState=1
|
||||
if(manualState == "true")
|
||||
{
|
||||
deviceState["opMode"] = opModeLists.external;
|
||||
}
|
||||
else if (fabs(manualState - 0) < 1e-6) //manualState=0
|
||||
{
|
||||
switch (missionState)
|
||||
else if (manualState == "faluse")
|
||||
{
|
||||
if(missionState == 0)
|
||||
{
|
||||
case 0:
|
||||
deviceState["opMode"] = opModeLists.error;
|
||||
|
||||
Reference in New Issue
Block a user