diff --git a/src/conf.c b/src/conf.c index 92f067a35..f06127834 100644 --- a/src/conf.c +++ b/src/conf.c @@ -559,6 +559,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) } rs->pttport.parm.cm108.ptt_bitnum = val_i; + rs->rigport.parm.cm108.ptt_bitnum = val_i; rs->pttport_deprecated.parm.cm108.ptt_bitnum = val_i; break; diff --git a/src/rig.c b/src/rig.c index b65a54198..aa3be50d3 100644 --- a/src/rig.c +++ b/src/rig.c @@ -588,8 +588,13 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model) */ case RIG_PORT_CM108: strncpy(rs->rigport.pathname, DEFAULT_CM108_PORT, HAMLIB_FILPATHLEN); - rs->rigport.parm.cm108.ptt_bitnum = DEFAULT_CM108_PTT_BITNUM; - rs->pttport.parm.cm108.ptt_bitnum = DEFAULT_CM108_PTT_BITNUM; + + if (rs->rigport.parm.cm108.ptt_bitnum == 0) + { + rs->rigport.parm.cm108.ptt_bitnum = DEFAULT_CM108_PTT_BITNUM; + rs->pttport.parm.cm108.ptt_bitnum = DEFAULT_CM108_PTT_BITNUM; + } + break; case RIG_PORT_GPIO: