Open btsatoukzn opened 7 months ago
78 raw
`bool missionEncode(const std::vector
bool finished = false; uint16_t tempTotalLen = 0; //static uint16_t startIndex = 0; uint16_t endIndex = 0; uint8_t *tempPtr = pushPtr;
/*! {{startIndex, endIndex, waypoint1, waypoint2,...},{startIndex, endIndex,
`
around 569 raw `ErrorCode::ErrorCodeType WaypointV2MissionOperator::uploadMission( int timeout) {
std::vector
std::vector
`
Agent comment from xiaorong.zheng in Zendesk ticket #95170:
This may not be the problem, startIndex is initialized to 0 in the next code.
bool finished = false; uint16_t tempTotalLen = 0; static uint16_t startIndex = 0; uint16_t endIndex = 0; uint8_t *tempPtr = pushPtr;
You can see startIndex and endIndex in the log print in missionEncode method.
°°°
thanks for your reply.
Since it's a static field, we don't think it will be initialized the second time.
thank you.
Agent comment from xiaorong.zheng in Zendesk ticket #95170:
Sorry, I misunderstood you before. If you upload the file twice, your modifications are indeed OK.
°°°
hi
When uploading a mission, we encountered the phenomenon described below. We also found a solution. Please confirm whether the solution is appropriate.
・Events that occur For example, register 10 WP missions. At this time, set WP7 and WP8 to the same latitude, longitude, and altitude. Too close error message is displayed. Next, register WP3 normal missions. However, mission registration for 3 WPs fails with the following error. "the start index is greater than end index of upload wps"
・Cause of this event Static variables in the API source"dji_waypoint_v2.cpp" appear not to be initialized.
·Solution Modify the static variable so that it is initialized when the mission is uploaded.
thank you.