Needed to adjust one of the timeouts. Was causing issues on Windows. Also made some changes due to IF command response size being 30, it was erroring out. And last band mapping was a little different on this rig for 2m, 70cm, 4m and Air Band.
Test case:
run: flrig configured for the rig in use
run: tests/rigctl -m 4 get_level AGC
expected: should print an enum agc_level_e (an integer in range 0..10)
Part of issue #1376.
This is the case for BANDSELECT and KEYERTYPE.
Use SNPRINTF() which deals with NULLs printing (null) and it is
used with the other datatypes..
Steps to reproduce:
tests/rigctl -m 1 set_parm KEYERTYPE '?'
tests/rigctl -m 1 set_parm BANDSELECT 1
Fixes:
Thread 1 "rigctl" received signal SIGSEGV, Segmentation fault.
__strcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:302
warning: 302 ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: File o directory non esistente
(gdb) bt
#0 __strcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:302
#1 0x00007f8ab4d0b7ab in dummy_set_parm (rig=0x55d19b6cab20, parm=2048, val=...) at dummy.c:1704
#2 0x000055d175b8c03d in rigctl_set_parm (rig=0x55d19b6cab20, fout=0x7f8ab4bf25c0 <_IO_2_1_stdout_>, fin=<optimized out>, interactive=<optimized out>, prompt=<optimized out>, vfo_opt=<optimized out>, send_cmd_term=13 '\r', ext_resp=0,
resp_sep=10 '\n', cmd=0x55d175ba9000 <test_list+1440>, vfo=536870912, arg1=0x7ffd730281e0 "KEYERTYPE", arg2=0x7ffd730283e0 "'?'", arg3=0x55d175b9fce8 "") at rigctl_parse.c:3828
#3 0x000055d175b93756 in rigctl_parse (my_rig=<optimized out>, fin=<optimized out>, fout=<optimized out>, argv=argv@entry=0x7ffd7302a3a8, argc=argc@entry=3, sync_cb=sync_cb@entry=0x0, interactive=<optimized out>, prompt=<optimized out>,
vfo_opt=<optimized out>, send_cmd_term=<optimized out>, ext_resp_ptr=<optimized out>, resp_sep_ptr=<optimized out>, use_password=<optimized out>) at rigctl_parse.c:1847
#4 0x000055d175b7dadc in main (argc=<optimized out>, argv=0x7ffd7302a3a8) at rigctl.c:801
With the old value of RIG_PTT_NONE, dummy_get_ptt() and dummy_set_ptt()
were never called because rig_get_ptt() and rig_set_ptt() do check
.ptt_type and return -RIG_ENAVAIL in that case.
Do not change .ptt_type for RIG_MODEL_DUMMY_NOVFO so that both cases
can be tested if needed.
- Remove unused ftx1_handle_cat_error function
- Remove unused ftx1_get_split and ftx1_set_split functions
- Remove unused variable 'err' in ftx1_set_freq
- Remove corresponding function declarations from ftx1.h
- Eliminates all compiler warnings for clean build
This warning was seen on MacOS and on Debian 12 and 13 using clang:
CC kenwood.lo
kenwood.c:2293:9: warning: absolute value function 'abs' given an argument of type 'shortfreq_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
2293 | if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); }
| ^
kenwood.c:2293:9: note: use function 'labs' instead
2293 | if (abs(rit) > 9999) { RETURNFUNC(-RIG_EINVAL); }
| ^~~
| labs
1 warning generated.
Closes issue #1806 on GitHub
Compile with -Wimplicit-fallthrough; analyze the results.
Define macro to mark valid fall through constructs. Mark all of the good
ones, and fix the bad.
Not available with all compilers - for those without the feature this commit
does nothing.