Hello,
I designed a servo system that will drop two different weight in different waypoints.
if (cmd.index == 1) {
gcs().send_text(MAV_SEVERITY_INFO, " Reached waypoint 1. %d",waypoint_servoRelayEvents.do_set_servo(10, 1400));
}
if (cmd.index == 2) {
gcs().send_text(MAV_SEVERITY_INFO, " Reached waypoint 2. %d",waypoint_servoRelayEvents.do_set_servo(10, 1150));
}
The problem is I want to interrupt the code with sleep function when it reach the waypoint. But I am afraid of interrupting the code while it is flying can be dangerous. Can interrupting the code with sleep function cause a problem while its flying?