Skip to content

Commit

Permalink
Fixed compilation issue - missing RIG_IS_SOFT_ERRCODE under Ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Oct 4, 2024
1 parent 6949330 commit 0b2993f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rig/drivers/HamlibRigDrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
#define HAMLIB_FILPATHLEN FILPATHLEN
#endif

#ifndef RIG_IS_SOFT_ERRCODE
#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
|| errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
|| errcode == RIG_EVFO || errcode == RIG_EDOM)

#endif

// macro introduced hamlib 4.6
#ifndef PTTPORT
#define PTTPORT(r) (&r->state.pttport)
Expand Down
7 changes: 7 additions & 0 deletions rotator/drivers/HamlibRotDrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
#define HAMLIB_FILPATHLEN FILPATHLEN
#endif

#ifndef RIG_IS_SOFT_ERRCODE
#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
|| errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
|| errcode == RIG_EVFO || errcode == RIG_EDOM)

#endif

#define POOL_INTERVAL 500

MODULE_IDENTIFICATION("qlog.rotator.driver.hamlibdrv");
Expand Down

0 comments on commit 0b2993f

Please sign in to comment.