[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 517fb87b8bded5478510b
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-14 23:26:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 517fb87b8bded5478510bc903e52347715503591 (commit) from 6f4ce3a7878cf5d2416a1b0f63e329433c6987e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 517fb87b8bded5478510bc903e52347715503591 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jan 14 17:25:39 2021 -0600 Fix MD command in newcat_set_cmd_validate https://github.com/Hamlib/Hamlib/issues/505 diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 8cb7072e..b1336f6e 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9382,7 +9382,7 @@ int newcat_set_cmd_validate(RIG *rig) { struct rig_state *state = &rig->state; struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; - char *valcmd; + char valcmd[16]; int retries=5; int retry=0; int sleepms = 50; @@ -9391,31 +9391,33 @@ int newcat_set_cmd_validate(RIG *rig) rig_debug(RIG_DEBUG_TRACE, "%s: priv->cmd_str=%s\n", __func__, priv->cmd_str); if ((strncmp(priv->cmd_str,"FA",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "FA;"; + strcpy(valcmd,"FA;"); } else if ((strncmp(priv->cmd_str,"FB",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "FB;"; + strcpy(valcmd,"FB;"); } else if ((strncmp(priv->cmd_str,"MD",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "MD;"; + strcpy(valcmd,priv->cmd_str); // pull the needed part of the cmd + valcmd[3]=';'; + valcmd[4]=0; } else if ((strncmp(priv->cmd_str,"TX",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "TX;"; + strcpy(valcmd,"TX;"); } else if ((strncmp(priv->cmd_str,"FT",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "FT;"; + strcpy(valcmd,"FT;"); } else if ((strncmp(priv->cmd_str,"BS",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "BS;"; + strcpy(valcmd,"BS;"); } else if ((strncmp(priv->cmd_str,"AI",2)==0) && (strlen(priv->cmd_str)>3)) { - valcmd = "AI;"; + strcpy(valcmd,"AI;"); } else { ----------------------------------------------------------------------- Summary of changes: rigs/yaesu/newcat.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |