* @brief Sets the mission item at index to the value given by the setparam command
* @param index the index of the mission item and lat/lon/alt. The index of the mission item is obtained by index / 3 and the
* lat/lon/alt or x/y/z is obtained from index % 3.
* Ex: Set the third waypoints y coordinate would be index = 7; 7 / 3 = 2; and 7 % 3 = 1
* @param value The value to be set units are depedent on the vehicle's frame of refrence
* @return
*/
intset_mission_item(intindex,floatvalue);
/**
* @brief This function is called after set_mission_items() and request_mission(). It begins to
* listen for mission_item_request message on comm0, and upon recieving that message it will transfer a mission item
* out of the mission_items[][] array.
* out of the mission_items[][] array. It will wait until the mission is acknowledged and retransmit if necessary.
* @return This function does not return until all mission items are transferred, there isn't a timeout implemented yet.
*/
inttransfer_mission_items();
...
...
@@ -92,27 +94,58 @@ int set_auto();
*/
intrequest_params();
/**
* @brief This function saves all the current mavlink parameters into a saved_params global variable.
* @return
* @brief This function saves all the current mavlink parameters into a saved_params global variable. It will poll for param_value messages and
* leave execuition after recieving all parameters. If not all parameters were recieved, then it will trigger retransmission after timeout
* @return -1 on fail and 0 otherwise
*/
intsave_params();
/**
* @brief This function prints all the params stored in the saved_params variable to stdout. This can be used for debugging purposes.
*
*/
voiddisplay_params();
/**
* @brief
* @param id
* @param subid
* @return
* @brief This function gets the value of an individual node from the nodes obtained from the getnodes command. To see how
* the nodes are structured look at the mavlink adapter documentation in the git repo or look at the source code
* @param id The id of the node to be fetched
* @param subid the sub id of the node to be fetched. Note that this is only used for the mission items node
* @return returns -1 on fail or the value of the node otherwise. If you recieve a negative one it could be an actual value of the node, so
* be careful about handeling error from this.
*/
floatget_node_value(shortid,shortsubid);
/**
* @brief This function sets the value of an individual node from the nodes obtained from the getnodes MicroCART command. To see how the nodes are structured
* look at the mavlink adapter documentation in the git repo or look at the source.
* @param id The id of the node to be fetched
* @param subid The sub id of the node to be fetched. Only used by the Mission Item Reserved node
* @param value The value to set the node to.
* @return Returns 0 on success and -1 on failure
*/
intset_node_value(shortid,shortsubid,floatvalue);
/**
* @brief This function will set the value of a MAVParam on the autonomus vehicle. These MAVParams can control how the vehicle navigates. This function polls until it
* recieves acknowledgment from the vehicle.
* @param name The param_id char[16] of the parameter to be set. mavparam.param_id.
* @brief This function will get the value of a MAVParam on the autonomus vehicle. These MAVParams can control how the vehicle navigates. This function polls until it
* recieves acknowledgment from the vehicle.
* @param name the param_id[16] of the parameter to be sent
* @param index the index of the mavparam obtained from saved_params[i].param_index
* @return returns 0 on success and -1 on failure. It saves the value of the parameter into the saved_parameters struct after recieveing ACK