Commit graph

268 commits

Author SHA1 Message Date
George Baltz N3GB
edfc721f04 And a few more 2026-06-23 12:13:22 -04:00
George Baltz N3GB
3e08d91f6e cppcheck - suppress C++ messages for C code
Get rid of messages about missing C++ initializers
a) The structure is always built in C code
b) calloc() is a very good initializer

And make a few routines static
2026-06-21 12:00:35 -04:00
William Goodspeed
bbde232a0c Add Android-specific flags to CXXFLAGS and LDFLAGS for correct linkage
Signed-off-by: William Goodspeed <goodspeed@anche.no>
2026-05-18 17:34:33 +08:00
Gong BI1XJT
c24f8fee1f Use regular C float instead of GLFloat to avoid portibility issues
In struct SensorData, GLFloat was used to store 3 floats. However, the
code doesn't perform any GLSL calculation on them. More, Termux doesn't
provide GLSL headers and fails to build. This commit refactos GLFloat
to float to avoid necessary header issues, etc.

Signed-off-by: Gong BI1XJT <bi1xjt@rad1o.cn>
2026-05-17 22:49:59 +08:00
Gong BI1XJT
60fb8e5fa0 Remove old-fashioned and buggy Android.mk build system
Signed-off-by: Gong BI1XJT <bi1xjt@rad1o.cn>
2026-05-17 22:49:59 +08:00
Gong BI1XJT
19e8287f38 Use an alternative version of now depreicated/removed ALooper_pollAll func
Signed-off-by: Gong BI1XJT <bi1xjt@rad1o.cn>
2026-05-17 20:55:36 +08:00
Gong BI1XJT
b182f72c4f Fix mis-included ndkimu header file
Signed-off-by: Gong BI1XJT <bi1xjt@rad1o.cn>
2026-05-17 20:46:08 +08:00
Gong BI1XJT
9a140c726e Add neccessary compiler flags for automake target
Signed-off-by: Gong BI1XJT <bi1xjt@rad1o.cn>
2026-05-17 20:42:16 +08:00
Daniele Forsi IU5HKX
54fa13d9f0 Add androidsensor to make dist 2026-05-06 23:30:45 +02:00
Mario Haustein
5d0d5df3cf
Initialize motors of Skywatcher mount
To use the Skywatcher rotator, both motors have to by initialized. When
using the direct mode of the mounts hand control unit, this
initialization is performed by the hand control. We just need to set the
position.

When using the motor driver directly with a simple USB-RS232-adapter,
this init command must be sent before we are able to steer the mount.
This allows us to use the mount without cabeling up the whole hand
control unit.
2026-04-26 17:31:49 +02:00
George Baltz N3GB
1236b6991b Fix compiler warning 2026-04-14 19:49:47 -04:00
George Baltz N3GB
1223ba19e2 Try to build indi 2026-02-24 04:16:34 -05:00
George Baltz N3GB
aee4f07674 Finish add includes in rigs/ and rotators/ 2026-02-23 11:12:14 -05:00
Nate Bargmann
edc441f05c
Merge GitHub PR #1980 2026-01-13 08:41:29 -06:00
Daniele Forsi IU5HKX
788f30104d Update driver version
Updated in commit a9313260c issue #1898.
2026-01-03 19:14:49 +01:00
Daniele Forsi IU5HKX
d298216d93 Update driver version
Updated in commit 6441c1d98 issue #1970.
2026-01-03 19:14:47 +01:00
George Baltz N3GB
37df17c1a2 Drop a few more cppcheck dings
Use c11 `for` statements
2025-12-26 12:55:33 -05:00
Daniele Forsi IU5HKX
6441c1d986 Handle the firmwares that don't echo the commands
Fixes #1968.
2025-12-21 14:21:43 +01:00
Daniele Forsi IU5HKX
127141696c Fix sign of return value
It makes no difference for the callers of this function because
they are checking the return value only against RIG_OK.
2025-12-21 14:16:57 +01:00
George Baltz N3GB
5f845e92cb Get rid of more cppcheck fluff
Turn off -x option in cppcheck.sh, fix missing '\'.

This fixes all the "error" messages from cppcheck except those
  due to its own inability to handle concatenated format strings.
2025-09-13 21:37:25 -04:00
Daniele Forsi
a9313260c2
Replace INT_MAX with FLT_MAX in indi_wrapper.cpp
Closes GitHub issue #1868.
2025-09-07 19:33:37 -05:00
Daniele Forsi IU5HKX
b8f42e4a6d Do not hardcode host and port number of INDI server
This allows to connect to the server running on another machine
or on a different port.
Defaults to the old value of localhost:7624.
It is still possible to connect to the local domain, eg. with
--rot-file @/tmp/indiserver
2025-09-02 21:38:29 +02:00
Nate Bargmann
4c520571df
Merge GitHub PR #1876 2025-08-31 20:11:12 -05:00
Daniele Forsi IU5HKX
39e155efe7 Fix include config.h
It should be included, with its path, before any hamlib include
and before any #ifdef that uses the symbols that it defines.
2025-08-30 11:18:51 +02:00
George Baltz N3GB
9a90745ba6 More conditional pthread usage unleashed
Anybody know what sync_callback() is supposed to do? Currently
unused, very broken, and not even a header comment.
2025-08-24 19:53:44 -04:00
Daniele Forsi IU5HKX
feef144bb8 Propagate the actual error code from grbl_request()
Instead of overridng first with -RIG_EPROTO then with -RIG_EIO.
2025-08-23 21:35:55 +02:00
Daniele Forsi IU5HKX
7fdbc99911 Return the error code from grbl_init() 2025-08-23 21:35:55 +02:00
Daniele Forsi IU5HKX
5acd75fecc Remove code that only prints debug messages and add new debug messages 2025-08-23 21:35:55 +02:00
Daniele Forsi IU5HKX
05a9034d2e Reduce severity of some debug messages from ERR to TRACE
They do not depend on an error situation.
2025-08-23 21:35:55 +02:00
Daniele Forsi IU5HKX
f4d4d855b9 Show the error code and the failure count in debug messages 2025-08-23 19:46:55 +02:00
Daniele Forsi IU5HKX
6a700023ab Remove duplicated custom debug output
It has several issues:
 * these are trace messages so RIG_DEBUG_ERR is inappropriate
 * they are in a custom format which doesn't handle end of line chars
 * write_block() and read_string() print the same information when
   debug level is set to TRACE
2025-08-23 19:41:59 +02:00
Daniele Forsi IU5HKX
b57f092236 Remove the executable bit from source files and documents 2025-08-17 22:38:25 +02:00
Daniele Forsi IU5HKX
caf7346fc0 Fix typos 2025-08-16 11:52:55 +02:00
George Baltz N3GB
1e5adb9fde Fix errors in error cases
Leak FDs in error exits, seg faults if RIG missing.
Found by `gcc -fanalyzer`
2025-08-06 04:56:02 -04:00
George Baltz N3GB
c1e6dcf010 More cppcheck stuff in amplifiers/ and rotators/ 2025-08-04 09:59:23 -04:00
George Baltz N3GB
1c36377480 Still more cppcheck tweaks 2025-07-29 13:10:28 -04:00
George Baltz N3GB
72bc62366d A few more cppcheck messages silenced 2025-07-28 19:31:20 -04:00
George Baltz N3GB
faad247f06 Deprecate rot_get_conf() 2025-07-28 10:43:10 -04:00
Daniele Forsi IU5HKX
0267068220 Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
Daniele Forsi IU5HKX
2fab137fc5 Apply fixes suggested by iwyu
Removes unused includes and adds missing includes.
2025-07-22 23:33:57 +02:00
Daniele Forsi IU5HKX
b57ad227a0 Remove unused #include <math.h>
Found with iwyu.
2025-07-22 23:33:56 +02:00
Daniele Forsi IU5HKX
974e619dd2 Replace #include serial.h with iofunc.h
According to iwyu, to avoid unecessary rebuilds and to reduce the
chances of breakages of the build if includes are rearranged, the
code that uses serial_open() and ser_close() should include
serial.h while the code that uses read_block() write_block() and
similar should include iofunc.h, code that uses all of them should
include both files.

Found with iwyu.
2025-07-22 23:33:56 +02:00
Daniele Forsi IU5HKX
195ed01543 Remove unused #include "serial.h"
Found with iwyu.
2025-07-22 23:33:56 +02:00
Michael Morgan
5c06f66aa8
Update gs232.c
I don't use that so I added a line to void it to suppress the warning.  Hope that is ok.
2025-07-15 14:28:03 -05:00
George Baltz N3GB
f3e9a859ed Move ???PORT() macro definitions back to rig.h
Many (most?) of the uses of the port structures in Hamlib are to pass through
  to the basic I/O routines (rig_flush(), write_block(), read_string()),
  without referencing any of the structure data.  Don't bother including
  port.h if it won't be used.

The ???PORT macros are independent of actual hamlib_port_t data use.
2025-07-10 09:54:03 -04:00
George Baltz N3GB
213e7751bf Add needed includes of new files to rotators/*/* 2025-07-10 09:54:03 -04:00
Michael Morgan
c2a8ceab2b
Removed Redundant IF 2025-07-09 11:11:02 -05:00
Michael Morgan
e4716be366
Added AF6SA WRC
It uses non-standard W command.
2025-07-09 11:11:01 -05:00
Daniele Forsi IU5HKX
976bfb4276 Remove the executable bit from data files 2025-07-06 19:45:43 +02:00
Nate Bargmann
bddd3ace00
Revert 17b404a6c7
These changes were unnecessary as the real bug is that the incorrect
function was being called in meade.c.

Closes GitHub issue #268.

Fix testloc.c
2025-06-14 11:42:45 -05:00