解决了冲突

This commit is contained in:
chenlizhi
2023-11-28 11:11:01 +08:00
24 changed files with 511 additions and 1324 deletions

View File

@@ -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;