How can I modify the standard settings ?

  • Rainer

    Rainer - 2006-09-08

    Hello everybody,

    I would like to override the default values of hamlib (for the serial interface, the baud rate, etc.), but I don't know where to store them and where to write them down. There are several programs (for example sgcontrol) which rely on these settings. Where can I change and store them?

    • Spaceman Spiff

      Spaceman Spiff - 2006-10-31

      The structure rig_state contains the modifiable values.  The defaults are set from the rig_caps structures found in the individual backends.  The application calls the frontend function rig_init which reads the rig_cap from the back end. The application then modifies the rig_state to change any defaults it wants.

      eg (taken from rigctl.c)
          if (ptt_type != RIG_PTT_NONE)
              my_rig->state.pttport.type.ptt = ptt_type;
          if (dcd_type != RIG_DCD_NONE)
              my_rig->state.dcdport.type.dcd = dcd_type;
          if (ptt_file)
              strncpy(my_rig->state.pttport.pathname, ptt_file, FILPATHLEN);
          if (dcd_file)
              strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN);
          /* FIXME: bound checking and port type == serial */
          if (serial_rate != 0)
              my_rig->state.rigport.parm.serial.rate = serial_rate;

      Or if you mean permanently you would have to modify the rig_cap table.

      hope this helps


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks