diff options
author | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2006-07-09 19:55:57 +0000 |
---|---|---|
committer | Ion-Mihai Tetcu <itetcu@FreeBSD.org> | 2006-07-09 19:55:57 +0000 |
commit | f5a473f755a74f37580a5df2a2d4e86d889ab836 (patch) | |
tree | 643faf8b3379e654214ae6d60737764612fcfbe2 /comms/ktrack/files/patch-ktrack_hamlibwrapper.cpp | |
parent | Make it a little more robust. (diff) |
K-Track is an graphical satellite prediction Program that runs under KDE.
It's really accurate as it calculates using the NORAD SGP4/SDP4 Models.
It Controls your Rig for doppler compensation / antenna pointing
Written by lx2gt AT users.sourceforge.net
WWW: http://ktrack.sourceforge.net/
- Diane Bruce, VA3DB
db@db.net
PR: ports/93781
Submitted by: Diane Bruce <db at db.net>
Notes
Notes:
svn path=/head/; revision=167299
Diffstat (limited to 'comms/ktrack/files/patch-ktrack_hamlibwrapper.cpp')
-rw-r--r-- | comms/ktrack/files/patch-ktrack_hamlibwrapper.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/comms/ktrack/files/patch-ktrack_hamlibwrapper.cpp b/comms/ktrack/files/patch-ktrack_hamlibwrapper.cpp new file mode 100644 index 000000000000..f0519b8022eb --- /dev/null +++ b/comms/ktrack/files/patch-ktrack_hamlibwrapper.cpp @@ -0,0 +1,53 @@ +--- ktrack/hamlibwrapper.cpp.orig Sun Jan 18 03:25:00 2004 ++++ ktrack/hamlibwrapper.cpp Thu Feb 23 11:23:18 2006 +@@ -18,6 +18,7 @@ + #include <string.h> + #include <stdlib.h> + #include <kapplication.h> ++#include <math.h> + + #include "hamlibwrapper.h" + +@@ -100,6 +101,7 @@ + // open the rig + if (rig_open(downlinkRig) != RIG_OK) { + retval--; ++ downlinkRig->caps->rig_model=RIG_MODEL_DUMMY; + } + + +@@ -116,8 +118,9 @@ + uplinkRig=rig_init(urig); + uplinkRig->state.rigport.parm.serial.rate=uspeed; + strcpy(downlinkRig->state.rigport.pathname, uport); +- if (rig_open(downlinkRig) != RIG_OK) { ++ if (rig_open(uplinkRig) != RIG_OK) { + retval--; ++ uplinkRig->caps->rig_model=RIG_MODEL_DUMMY; + } + } + +@@ -248,13 +251,16 @@ + int errorcode; + freq_t frequency=0; + mutex.lock(); +- errorcode=rig_get_freq(downlinkRig, downlinkvfo, &frequency); +- if (errorcode!=RIG_OK) { +- fprintf(stderr, "WARNING: Error fetching frequency from Radio! Using default Frequency!\n"); +- errorstring=rigerror(errorcode); +- if (errorstring) +- fprintf(stderr, "The reported error was: %s\n", errorstring); +- frequency=433000000; ++ if (downlinkRig->caps->rig_model != RIG_MODEL_DUMMY) { ++ errorcode=rig_get_freq(downlinkRig, downlinkvfo, &frequency); ++ if (errorcode!=RIG_OK) { ++ fprintf(stderr, "WARNING: Error fetching frequency from Radio! Using default Frequency!\n"); ++ errorstring=rigerror(errorcode); ++ if (errorstring) ++ fprintf(stderr, "The reported error was: %s\n", errorstring); ++ downlinkRig->caps->rig_model = RIG_MODEL_DUMMY; ++ frequency=433000000; ++ } + } + // sleep on dummy rig - that saves CPU power + if (downlinkRig->caps->rig_model == RIG_MODEL_DUMMY) |