From cc8c10e5535d52f6f3b32a9c2acc7920963a91c0 Mon Sep 17 00:00:00 2001 From: StaY <stephane.yang@ensea.fr> Date: Wed, 11 Oct 2023 17:13:34 +0200 Subject: [PATCH] update fly_monitor to add a test version for manual command (removed the arming part), it will the control command to the drone but the drone will not answer. --- .../fly_monitor/src/TestDroneRemoteControl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Com_server/fly_monitor/src/TestDroneRemoteControl.cpp b/Com_server/fly_monitor/src/TestDroneRemoteControl.cpp index 2c996b3..d0eda71 100644 --- a/Com_server/fly_monitor/src/TestDroneRemoteControl.cpp +++ b/Com_server/fly_monitor/src/TestDroneRemoteControl.cpp @@ -558,6 +558,15 @@ int command_loop() cout << "\nSet mode to position control" << endl; drone1.flight_mode = FlightMode::Posctl; drone1.command_setMode(FlightMode::Posctl); + sleep(2); + } + else if(buffer_command=="manual_test") + { + // Same as manual, but the drone is not armed -> We can see the sent commands without the drone moving + // x, y, z, r = pitch, roll, throttle, yaw + + cout << "\nSet mode to position control" << endl; + drone1.flight_mode = FlightMode::Posctl; } else if(buffer_command=="tone") { @@ -716,7 +725,7 @@ int command_loop() } else if (buffer_command=="help" || buffer_command=="h") { - // Note: not described commands needs test, refer to MAVSDK if not working + // Note: not described commands needs test (not tested yet), refer to MAVSDK if not working cout << "fly_monitor commands:" << endl; cout << " mode set manually the mode of the drone" << endl; cout << " reset reset the mode of the drone" << endl; @@ -738,6 +747,7 @@ int command_loop() cout << " k terminate flight immediately, may cause crash landing" << endl; cout << " !k reset the drone after a flight termination" << endl; cout << " manual set the drone to 'position control' mode, it will be controlled by shared memory" << endl; + cout << " manual_test same as manual mode but the drone will not move (no arming)" << endl; cout << " tone make the autopilot play a certain tone" << endl; cout << " c playground for printing" << endl; // c for check cout << " msg request one specific MAVLink message from the autopilot" << endl; -- GitLab