This is test code!!

I have changed the declarations of the Rig class functions we use:

open()
setConf()
getFreq()
setFreq()
setPTT()
close()

... so that each one returns the (negative) error code returned by 
hamlib.  These functions no longer throw exceptions.

Initial tests seem to show things working well.  I have found one
condition that causes a crash.  The rig is initially opened and is
running OK (in this case, with the Polling interval set to 1 s).  Then
the radio is turned off.  The next call to getFreq() never returns.

Probably we need to set a timeout limit?

The code is kinda on the quick-and-dirty side.  Improvements will be 
welcom!



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3246 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor
2013-04-30 18:54:11 +00:00
parent d62a045e27
commit c9e20f6f9d
8 changed files with 168 additions and 105 deletions
+5
View File
@@ -206,3 +206,8 @@ int ptt(int nport, int ntx, int* iptt, int* nopen)
return 0;
#endif
}
int hamlibError(int retcode)
{
qDebug() << "Hamlib error" << retcode;
}