mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 18:33:34 +08:00
use double LAT/LONG fields instead of float params for storing ROI settings
This commit is contained in:
committed by
Julian Oes
parent
1448285b1c
commit
337133e9fa
@@ -452,13 +452,15 @@ MissionBlock::issue_command(const mission_item_s &item)
|
||||
vcmd.param2 = item.params[1];
|
||||
vcmd.param3 = item.params[2];
|
||||
vcmd.param4 = item.params[3];
|
||||
vcmd.param5 = (double)item.params[4];
|
||||
vcmd.param6 = (double)item.params[5];
|
||||
|
||||
if (item.nav_cmd == NAV_CMD_DO_SET_ROI_LOCATION && item.altitude_is_relative) {
|
||||
vcmd.param5 = item.lat;
|
||||
vcmd.param6 = item.lon;
|
||||
vcmd.param7 = item.params[6] + _navigator->get_home_position()->alt;
|
||||
|
||||
} else {
|
||||
vcmd.param5 = item.params[4];
|
||||
vcmd.param6 = item.params[5];
|
||||
vcmd.param7 = item.params[6];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user