* \brief Stop the rotator. * * \param rot The #ROT handle. * * Stop the rotator. Command should be immediate. * * \return RIG_OK if the operation has been successful, otherwise a **negative * value** if an error occurred (in which case, cause is set appropriately). * * \retval RIG_OK The rotator was stopped successfully. * \retval -RIG_EINVAL \a rot is NULL or inconsistent. * \retval -
| 919 | * \sa rot_move() |
| 920 | */ |
| 921 | int HAMLIB_API rot_stop(ROT *rot) |
| 922 | { |
| 923 | const struct rot_caps *caps; |
| 924 | |
| 925 | rot_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); |
| 926 | |
| 927 | if (CHECK_ROT_ARG(rot)) |
| 928 | { |
| 929 | return -RIG_EINVAL; |
| 930 | } |
| 931 | |
| 932 | caps = rot->caps; |
| 933 | |
| 934 | if (caps->stop == NULL) |
| 935 | { |
| 936 | return -RIG_ENAVAIL; |
| 937 | } |
| 938 | |
| 939 | return caps->stop(rot); |
| 940 | } |
| 941 | |
| 942 | |
| 943 | /** |
no test coverage detected