Daniele Forsi IU5HKX
47f60d4ad7
[simulators] Remove unused includes
...
Found by iwyu.
2025-08-30 09:43:45 +02:00
Daniele Forsi IU5HKX
8f0c94dc77
[simulators] Fix compiler warning
...
Adds the same code used in other simulators.
Fixes:
simft897.c:26:9: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
2025-08-18 17:17:32 -05:00
Daniele Forsi IU5HKX
1aafbb3f24
[simulators] Add missing files to check_PROGRAMS
2025-08-18 17:17:31 -05:00
Daniele Forsi IU5HKX
271129705a
[simulators] Split and sort the list of check_PROGRAMS
2025-08-18 17:17:31 -05:00
Daniele Forsi IU5HKX
8805748e74
[simulators] Add missing files to EXTRA_DIST
2025-08-18 09:02:06 -05:00
George Baltz N3GB
74558224a9
More cppcheck style hints
2025-08-13 09:30:59 -04:00
Nate Bargmann
93a24356e5
Merge GitHub PR #1831
2025-08-07 07:26:47 -05:00
Daniele Forsi IU5HKX
891070941f
Fix compiler warnings
...
Fixes:
simic905.c:108:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
simic910.c:112:9: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
2025-08-07 14:14:58 +02:00
Daniele Forsi IU5HKX
5b1517778e
Replace "goto again" with "continue" (third case)
...
When the software on the other side of the pty closes the device,
the simulator would close and reopen its side but it is unneeded
because it can continue to call read() without doing anything special.
2025-08-07 11:38:12 +02:00
Daniele Forsi IU5HKX
8887294cd8
Replace "goto again" with "continue" (second case)
...
Does the same thing with more structured control flow.
It also silences compiler warnings.
2025-08-07 11:22:44 +02:00
Daniele Forsi IU5HKX
5b87b38704
Replace "goto again" with "continue" (first case)
...
Does the same thing with more structured control flow.
It also silences compiler warnings.
2025-08-07 11:22:14 +02:00
Daniele Forsi IU5HKX
4251c50b7f
Fix reading line when the client (eg. rigctl) closes
...
Fixes an infinite stream of debug output because it erroneously
appeared to have read 1 byte instead of 0:
n=1
00
Not 8 bytes? bytes=1
Unknown cmd=00
Tested with:
tests/rigctl -m 37001 -r /dev/pts/6 f
(however it doesn't read the frequency because it looks like the
protocol is different or incomplete, rigs/anytone/d578.c is still
in beta)
2025-08-07 08:54:09 +02:00
Daniele Forsi IU5HKX
49c78edb80
Make code more uniform
2025-08-06 21:49:17 +02:00
Daniele Forsi IU5HKX
59acdb791e
Fix compiler warning
...
Move both initialization outside of the conditional.
Fixes:
simyaesu.c:364:12: warning: ‘pbuf’ may be used uninitialized [-Wmaybe-uninitialized]
2025-08-06 09:34:04 +02:00
Daniele Forsi IU5HKX
032e78826e
Fix BC and FO commands
...
The following command work from rigctl: get_freq get_ctcss_tone get_rig_info.
Uses the information from the manual linked at the top of rig/kenwood/tmd710.c.
Fixes:
simtmd710.c:64:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
simtmd710.c:68:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘double’ [-Wformat=]
2025-08-05 23:46:10 +02:00
Daniele Forsi IU5HKX
d5c5eeff15
No need to use strlen() because the i variable counted the chars read
2025-08-05 22:40:17 +02:00
Daniele Forsi IU5HKX
af4c6ec806
Make the output of simft990 more friendly
2025-08-05 22:40:17 +02:00
Daniele Forsi IU5HKX
9dd0009f9e
Remove unused define
2025-08-05 22:22:50 +02:00
Daniele Forsi IU5HKX
816d6d9bef
Replace magic number with a defined constant
2025-08-05 22:22:50 +02:00
Daniele Forsi IU5HKX
249a993633
Avoid spamming the terminal with 0's
2025-08-05 22:22:50 +02:00
Daniele Forsi IU5HKX
8064da8121
Avoid burning 100% CPU
...
Adds hl_usleep() like in the other version of getmyline().
2025-08-05 21:16:33 +02:00
Daniele Forsi IU5HKX
d9532a9c62
Fix compiler warning
...
Fixes:
simft990.c:64:36: warning: pointer targets in passing argument 2 of ‘getmyline5’ differ in signedness [-Wpointer-sign]
2025-08-05 20:51:04 +02:00
Daniele Forsi IU5HKX
f691a68c06
Fix compiler warning
...
Fixes:
simft990.c:39:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
2025-08-05 20:38:57 +02:00
Daniele Forsi IU5HKX
725fcee004
Fix compiler warning
...
Fixes:
simatd578.c:143:9: warning: ‘n’ may be used uninitialized [-Wmaybe-uninitialized]
2025-08-05 20:22:41 +02:00
Daniele Forsi IU5HKX
151549bb3b
Remove disabled code
...
None of these simulators does multicast networking.
2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX
790820ab22
Refactor to remove code duplication of one version of getmyline()
2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX
b809937395
Rename in preparation of conflicting changes
2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX
498b45f5b0
Rename in preparation of conflicting changes
2025-08-04 11:36:03 +02:00
Daniele Forsi IU5HKX
a5467f4033
Refactor to remove code duplication of one version of getmyline()
2025-08-04 11:34:00 +02:00
Daniele Forsi IU5HKX
10f6504897
Remove disabled code and change signature
...
Makes getmyline() identical to the other simulators.
2025-08-04 11:32:26 +02:00
Daniele Forsi IU5HKX
f8881f9bb9
Remove disabled code
...
None of these simulators does multicast networking.
2025-08-03 22:09:04 +02:00
Daniele Forsi IU5HKX
9e51419ab8
Do not use relative paths for including rig.h
...
The Makefile adds all necessary include directories.
2025-08-03 16:09:51 +02:00
Daniele Forsi IU5HKX
c26f033395
Do not use relative paths for including misc.h
...
The Makefile adds all necessary include directories.
2025-08-03 16:09:47 +02:00
Daniele Forsi IU5HKX
8d8d0328bf
Fix typos
2025-08-03 10:49:23 +02:00
Daniele Forsi IU5HKX
f89ebfd226
Add include missed by IWYU
2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX
df7fbbec9b
Have IWYU fix the includes
2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX
3b2a95053b
Refactor to remove code duplication of dumphex()
2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX
1568a6c7fc
Refactor to remove code duplication of typedef enum nc_rigid_e
...
Also updates nc_rigid_e from rigs/yaesu/newcat.c
There where different versions of that enum in the simulators.
2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX
98a81a5074
Replace magic number with a defined constant
...
The same constant is used by memset() in getmyline().
2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX
7fc222dc88
Remove perror()
...
Makes getmyline() identical to the other simulators.
2025-08-03 09:35:03 +02:00
Daniele Forsi IU5HKX
ecece62828
Refactor to remove code duplication of openPort()
...
The code wasn't indented in simic7300.c and simic7700.c but it was
identical.
2025-08-03 09:35:02 +02:00
Daniele Forsi IU5HKX
16a69722e2
Use the resp buffer for all responses
...
Insetad of the command buffer.
2025-08-02 16:20:38 +02:00
Daniele Forsi IU5HKX
b5d136ff08
Print responses
2025-08-02 16:01:48 +02:00
Daniele Forsi IU5HKX
f3e2ea9e3d
Avoid printing the received command twice
...
It is printed at the beginning of the while loop.
2025-08-02 15:53:04 +02:00
Daniele Forsi IU5HKX
3009ec86b7
Add a .gitignore for simulators
2025-08-02 15:16:51 +02:00
Daniele Forsi IU5HKX
17b301a371
Add missing includes
...
Automatically added by IWYU.
2025-08-02 13:14:35 +02:00
Daniele Forsi IU5HKX
e8467032ad
Remove unused includes
...
Found with IWYU.
2025-08-02 13:13:10 +02:00
Nate Bargmann
989623ec51
Merge GitHub PR #1824
2025-08-01 18:31:38 -05:00
Daniele Forsi IU5HKX
0c57ccad26
Add missing include file
...
Otherwise it isn't added to the distribution archive created by
"make distcheck".
2025-07-30 23:29:12 +02:00
Daniele Forsi IU5HKX
094b5e741a
Remove unused variables
2025-07-30 23:29:12 +02:00