Skip to content

Commit

Permalink
Request grid only if MSP is active
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmnet committed Jan 31, 2022
1 parent 28b68b3 commit c3f20aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MAVGCL/src/main/java/com/comino/flight/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ else if(args.get("ip")!=null)
wq.addSingleTask("LP",300, () -> {
control.getStatusManager().reset();
control.sendMAVLinkCmd(MAV_CMD.MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES, 1);
if(!control.getCurrentModel().sys.isStatus(Status.MSP_INAIR, Status.MSP_ACTIVE)) {
if(!control.getCurrentModel().sys.isStatus(Status.MSP_INAIR) && control.getCurrentModel().sys.isStatus(Status.MSP_ACTIVE)) {
control.sendMSPLinkCmd(MSP_CMD.MSP_TRANSFER_MICROSLAM);
MSPLogger.getInstance().writeLocalMsg("[mgc] grid data requested",MAV_SEVERITY.MAV_SEVERITY_NOTICE);
}
Expand Down

0 comments on commit c3f20aa

Please sign in to comment.