From 49a882004fd9832539d70a3ee4a7898949fbc18d Mon Sep 17 00:00:00 2001 From: c vw Date: Mon, 4 Oct 2021 19:05:41 +0200 Subject: [PATCH] Some rigctl corrections by VU2DLE --- rigctl.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/rigctl.c b/rigctl.c index 227c9ce..01f8031 100644 --- a/rigctl.c +++ b/rigctl.c @@ -1088,14 +1088,26 @@ gboolean parse_extended_cmd (char *command,CLIENT *client) { break; case 'C': //ZZCx switch(command[3]) { - case 'B': //ZZCB - implemented=FALSE; + case 'B': //ZZCB: VFO A to B + if(!locked) { + if(command[4]==';') { + vfo_a_to_b(); + } + } break; - case 'D': //ZZCD - implemented=FALSE; + case 'D': //ZZCD: VFO B to A + if(!locked) { + if(command[4]==';') { + vfo_b_to_a(); + } + } break; - case 'F': //ZZCF - implemented=FALSE; + case 'F': //ZZCF: Swap VFO A and B + if(!locked) { + if(command[4]==';') { + vfo_a_swap_b(); + } + } break; case 'I': //ZZCI implemented=FALSE; @@ -1406,6 +1418,7 @@ gboolean parse_extended_cmd (char *command,CLIENT *client) { } else if(command[6]==';') { int filter=atoi(&command[4]); // update RX1 filter + vfo_filter_changed(filter); } break; case 'J': //ZZFJ @@ -1902,6 +1915,7 @@ gboolean parse_extended_cmd (char *command,CLIENT *client) { implemented=FALSE; break; } + break; case 'O': //ZZOx switch(command[3]) { default: @@ -1979,7 +1993,7 @@ gboolean parse_extended_cmd (char *command,CLIENT *client) { if(vfo[VFO_A].mode==modeCWL || vfo[VFO_A].mode==modeCWU) { vfo[VFO_A].rit-=10; } else { - vfo[VFO_A].rit-=50; + vfo[VFO_A].rit-=rit_increment; } vfo_update(); } else if(command[9]==';') { @@ -2035,7 +2049,7 @@ gboolean parse_extended_cmd (char *command,CLIENT *client) { if(vfo[VFO_A].mode==modeCWL || vfo[VFO_A].mode==modeCWU) { vfo[VFO_A].rit+=10; } else { - vfo[VFO_A].rit+=50; + vfo[VFO_A].rit+=rit_increment; } vfo_update(); } else if(command[9]==';') { @@ -2047,6 +2061,7 @@ gboolean parse_extended_cmd (char *command,CLIENT *client) { implemented=FALSE; break; } + break; case 'S': //ZZSx switch(command[3]) { case 'A': //ZZSA @@ -2984,8 +2999,8 @@ int parse_cmd(void *data) { if(command[2]==';') { sprintf(reply,"LK%d%d;",locked,locked); send_resp(client->fd,reply); - } else if(command[27]==';') { - locked=command[2]=='1'; + } else if(command[4]==';') { + locked = atoi(&command[2]); vfo_update(); } break; -- 2.45.2