File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ void show_rigerror(char *message, int errcode) {
9494int init_tlf_rig (void ) {
9595 freq_t rigfreq ; /* frequency */
9696 vfo_t vfo ;
97+ char speed_string [12 ];
9798 int retcode ; /* generic return code from functions */
9899
99100 const struct rig_caps * caps ;
@@ -115,10 +116,22 @@ int init_tlf_rig(void) {
115116 }
116117
117118 g_strchomp (rigportname ); // remove trailing '\n'
118- strncpy (my_rig -> state . rigport . pathname , rigportname ,
119- TLFFILPATHLEN - 1 );
119+ retcode = rig_set_conf (my_rig , rig_token_lookup ( my_rig , "rig_pathname" ) ,
120+ rigportname );
120121
121- my_rig -> state .rigport .parm .serial .rate = serial_rate ;
122+ if (retcode != RIG_OK ) {
123+ showmsg ("Pathname not accepted!" );
124+ return -1 ;
125+ }
126+
127+ snprintf (speed_string , sizeof speed_string , "%d" , serial_rate );
128+ retcode = rig_set_conf (my_rig , rig_token_lookup (my_rig , "serial_speed" ),
129+ speed_string );
130+
131+ if (retcode != RIG_OK ) {
132+ showmsg ("Speed not accepted!" );
133+ return -1 ;
134+ }
122135
123136 caps = my_rig -> caps ;
124137
Original file line number Diff line number Diff line change 2424#include <hamlib/rig.h>
2525#include <stdbool.h>
2626
27- #ifdef HAMLIB_FILPATHLEN
28- #define TLFFILPATHLEN HAMLIB_FILPATHLEN
29- #else
30- #ifdef FILPATHLEN
31- #define TLFFILPATHLEN FILPATHLEN
32- #else
33- #error "(HAMLIB_)FILPATHLEN macro not found"
34- #endif
35- #endif
36-
3727bool rig_has_send_morse ();
3828bool rig_has_stop_morse ();
3929
You can’t perform that action at this time.
0 commit comments