Showing
3 changed files
with
1 additions
and
36 deletions
This diff is collapsed. Click to expand it.
... | @@ -47,7 +47,7 @@ | ... | @@ -47,7 +47,7 @@ |
47 | 47 | ||
48 | #include "mission.h" | 48 | #include "mission.h" |
49 | #include "navigator.h" | 49 | #include "navigator.h" |
50 | -#include "iostream" | 50 | + |
51 | #include <string.h> | 51 | #include <string.h> |
52 | #include <drivers/drv_hrt.h> | 52 | #include <drivers/drv_hrt.h> |
53 | #include <dataman/dataman.h> | 53 | #include <dataman/dataman.h> |
... | @@ -1031,30 +1031,6 @@ Mission::set_mission_items() | ... | @@ -1031,30 +1031,6 @@ Mission::set_mission_items() |
1031 | generate_waypoint_from_heading(&pos_sp_triplet->current, pos_sp_triplet->current.yaw); | 1031 | generate_waypoint_from_heading(&pos_sp_triplet->current, pos_sp_triplet->current.yaw); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | - /* don't advance mission after FW to MC command */ | ||
1035 | - if (_mission_item.nav_cmd == NAV_CMD_DO_VTOL_TRANSITION | ||
1036 | - && _work_item_type == WORK_ITEM_TYPE_DEFAULT | ||
1037 | - && new_work_item_type == WORK_ITEM_TYPE_DEFAULT | ||
1038 | - && _navigator->get_vstatus()->vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING | ||
1039 | - && !_navigator->get_land_detected()->landed | ||
1040 | - && pos_sp_triplet->current.valid) { | ||
1041 | - | ||
1042 | - new_work_item_type = WORK_ITEM_TYPE_CMD_BEFORE_MOVE; | ||
1043 | - } | ||
1044 | - | ||
1045 | - /* after FW to MC transition finish moving to the waypoint */ | ||
1046 | - if (_work_item_type == WORK_ITEM_TYPE_CMD_BEFORE_MOVE && | ||
1047 | - new_work_item_type == WORK_ITEM_TYPE_DEFAULT | ||
1048 | - && pos_sp_triplet->current.valid) { | ||
1049 | - | ||
1050 | - new_work_item_type = WORK_ITEM_TYPE_DEFAULT; | ||
1051 | - | ||
1052 | - _mission_item.nav_cmd = NAV_CMD_WAYPOINT; | ||
1053 | - copy_position_if_valid(&_mission_item, &pos_sp_triplet->current); | ||
1054 | - _mission_item.autocontinue = true; | ||
1055 | - _mission_item.time_inside = 0.0f; | ||
1056 | - } | ||
1057 | - | ||
1058 | // ignore certain commands in mission fast forward | 1034 | // ignore certain commands in mission fast forward |
1059 | if ((_mission_execution_mode == mission_result_s::MISSION_EXECUTION_MODE_FAST_FORWARD) && | 1035 | if ((_mission_execution_mode == mission_result_s::MISSION_EXECUTION_MODE_FAST_FORWARD) && |
1060 | (_mission_item.nav_cmd == NAV_CMD_DELAY)) { | 1036 | (_mission_item.nav_cmd == NAV_CMD_DELAY)) { |
... | @@ -1862,9 +1838,6 @@ bool Mission::position_setpoint_equal(const position_setpoint_s *p1, const posit | ... | @@ -1862,9 +1838,6 @@ bool Mission::position_setpoint_equal(const position_setpoint_s *p1, const posit |
1862 | 1838 | ||
1863 | void Mission::publish_navigator_mission_item() | 1839 | void Mission::publish_navigator_mission_item() |
1864 | { | 1840 | { |
1865 | - | ||
1866 | - for(int i=0;i<8;i++) | ||
1867 | -{ | ||
1868 | navigator_mission_item_s navigator_mission_item{}; | 1841 | navigator_mission_item_s navigator_mission_item{}; |
1869 | 1842 | ||
1870 | navigator_mission_item.instance_count = _navigator->mission_instance_count(); | 1843 | navigator_mission_item.instance_count = _navigator->mission_instance_count(); |
... | @@ -1891,11 +1864,4 @@ void Mission::publish_navigator_mission_item() | ... | @@ -1891,11 +1864,4 @@ void Mission::publish_navigator_mission_item() |
1891 | navigator_mission_item.timestamp = hrt_absolute_time(); | 1864 | navigator_mission_item.timestamp = hrt_absolute_time(); |
1892 | 1865 | ||
1893 | _navigator_mission_item_pub.publish(navigator_mission_item); | 1866 | _navigator_mission_item_pub.publish(navigator_mission_item); |
1894 | - | ||
1895 | - | ||
1896 | - std::cout<<navigator_mission_item.latitude<<std::endl; | ||
1897 | - navigator_mission_item.sequence_current++; | ||
1898 | - std::cout<<"************************"<<std::endl; | ||
1899 | -} | ||
1900 | - | ||
1901 | } | 1867 | } | ... | ... |
... | @@ -281,7 +281,6 @@ private: | ... | @@ -281,7 +281,6 @@ private: |
281 | WORK_ITEM_TYPE_TAKEOFF, /**< takeoff before moving to waypoint */ | 281 | WORK_ITEM_TYPE_TAKEOFF, /**< takeoff before moving to waypoint */ |
282 | WORK_ITEM_TYPE_MOVE_TO_LAND, /**< move to land waypoint before descent */ | 282 | WORK_ITEM_TYPE_MOVE_TO_LAND, /**< move to land waypoint before descent */ |
283 | WORK_ITEM_TYPE_ALIGN, /**< align for next waypoint */ | 283 | WORK_ITEM_TYPE_ALIGN, /**< align for next waypoint */ |
284 | - WORK_ITEM_TYPE_CMD_BEFORE_MOVE, | ||
285 | WORK_ITEM_TYPE_TRANSITON_AFTER_TAKEOFF, | 284 | WORK_ITEM_TYPE_TRANSITON_AFTER_TAKEOFF, |
286 | WORK_ITEM_TYPE_MOVE_TO_LAND_AFTER_TRANSITION, | 285 | WORK_ITEM_TYPE_MOVE_TO_LAND_AFTER_TRANSITION, |
287 | WORK_ITEM_TYPE_PRECISION_LAND | 286 | WORK_ITEM_TYPE_PRECISION_LAND | ... | ... |
-
Please register or login to post a comment