From bf1042c0c107a6a033dd5d41ea7369c4355df202 Mon Sep 17 00:00:00 2001 From: zengxiaobin Date: Tue, 28 Nov 2023 15:34:04 +0800 Subject: [PATCH] no comment --- .gitignore | 4 ++-- README.md | 16 ++++++++++++++-- src/pStateManagement/StateManagement.cpp | 8 +++----- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ad97f86..19b6a37 100644 --- a/.gitignore +++ b/.gitignore @@ -101,7 +101,7 @@ dkms.conf /log /launch/launch_local.moos -bin/ -build/ +/bin/ +/build/ /scripts /.vscode diff --git a/README.md b/README.md index 923b3b3..51d2d47 100755 --- a/README.md +++ b/README.md @@ -19,8 +19,20 @@ bin/ : 程序执行文件存放位置 # 文件说明 -./build.sh : 编译脚本 +build.sh : 编译脚本 -./clean.sh : 清除编译生成文件 +clean.sh : 清除编译生成文件 + +launch/launch.moos : Pi上的moos-ivp-pi启动脚本 + +alpha.moos : moos-ivp调试端启动脚本,在pi以外的调试计算机上使用,可以监控pi的各个状态。 + +.gitignore : git的配置文件,编辑这个可以文件以设置忽略哪些不需要跟踪的文件,比如编译生成文件等。 + +setting/PlanConfigure.json : 使命文本 + +setting/ControlParam.json : 运动控制器参数配置文件 + +setting/Origin.json :经纬度原点配置文件 diff --git a/src/pStateManagement/StateManagement.cpp b/src/pStateManagement/StateManagement.cpp index 315f326..e6b2027 100755 --- a/src/pStateManagement/StateManagement.cpp +++ b/src/pStateManagement/StateManagement.cpp @@ -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") { @@ -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; }