Huang Qi
ffd256d32b
Remove unused header files across multiple source files
...
Clean up code by removing redundant and unused header file includes that were identified through static analysis.
This improves code readability and reduces unnecessary dependencies.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-10 21:42:00 +08:00
Alin Jerpelea
440d69a310
canutils: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:25:28 +08:00
raiden00pl
71d26a5dd1
canutils: change dependency from GPL to BSD
...
socketCAN utils are dual licence, there is no point in using
GPL licence when we can use BSD.
Also change `select CANUTILS_LIBCANUTILS` to `depends on CANUTILS_LIBCANUTILS`.
We can't `select` that option when `ALLOW_BSD_COMPONENTS` is not set.
2024-10-27 19:46:28 +08:00
Alin Jerpelea
7cabf00380
canutils/libobd2: replace field ch_unused with ch_tcf
...
https://github.com/apache/nuttx-apps/pull/2635
replaced ch_unused with ch_tcf
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-10 02:24:20 +08:00
gaohedong
481d4b6e23
can: Merge netpacket/can.h into nuttx/can.h
...
This patch is associated with 'https://github.com/apache/nuttx/pull/13048 ', so it cannot be verified separately by CI. Please help to associate and review it. Thank you!
Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-08-26 05:05:41 -04:00
guoshichao
a6094d81bb
apps/canutils: fix the build warning on greenhills compiler
...
CC: stdlib/lib_srand.c "candump.c", line 231: warning #550-D: variable "ret" was set but never used
int opt, ret;
^
"candump.c", line 101: warning #550-D: variable "cmdlinename" was set but
never used
static char *cmdlinename[MAXSOCK];
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:05:46 +08:00
Xiang Xiao
9d67f38062
canutils: Fix minor style issue found in canlib
...
no functional change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-12 15:48:21 -03:00
simbit18
7e30c0e4c9
Fix Kconfig style
...
Remove spaces from Kconfig files
Add TABs
Add comments
2024-04-09 08:16:40 +02:00
Ritvik
6798294129
Fix #2181 : LELYCANOPEN_UNPACKNAME comes from extracted tarball directory
2023-11-09 14:48:15 +01:00
xuxin19
2432a62ab6
fix cmake code smell issues
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-04 23:19:26 +08:00
xuxin19
a091b91d83
cmake:replace custom_patch_target with PATCH_COMMAND
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-24 17:49:12 +02:00
Xiang Xiao
054cf3b1cb
Change all sizeof(arr)/sizeof(arr[0]) to nitems
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
xuxin19
dbfe1a33f1
cmake:migrate libopencyphal for cmake build
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-12 15:16:15 +08:00
xuxin19
28a5ecfed1
cmake:migrate libdronecan for cmake build
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-12 15:16:15 +08:00
xuxin19
6e8d83e783
cmake:migrate lely-canopen for cmake build
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-12 15:16:15 +08:00
xuxin19
24319beed3
cmake:migrate apps CMakeLists for canutils
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-09 23:46:21 +08:00
chao an
4d79a5cbaf
add initial cmake build system
...
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
Petro Karashchenko
aed0e2873e
apps: fix style issues in code
...
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 18:47:50 +08:00
Xiang Xiao
7c37421266
Replace all sprintf with snprintf
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Peter van der Perk
fa26bab6b2
DroneCAN add socketcan support, rename to DroneCAN
...
Rename canardv1 to OpenCyphal
Apply suggestions from code review
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-25 18:24:41 +08:00
Petro Karashchenko
07d229f514
canutils: fix indentation in Kconfig files
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-26 08:33:05 -06:00
simbit18
4713edf5a8
apps/canutils/lely-canopen/Make.defs: fix nxstyle
...
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
Xiang Xiao
21bc466a2b
Remove the tail space char from all files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-03 00:18:36 +02:00
lilei19
41f60bd669
change strcpy to strlcpy
...
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-22 23:09:55 +08:00
Nathan Hartman
8e77b79f78
Kconfig: Make indent consistent with TABS
2023-02-10 14:11:48 +08:00
chao an
8ad4ae5508
net: fix compiler warning
...
sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
48 | strncpy(arg.ifr_name, ifname, IFNAMSIZ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-08 00:35:39 +08:00
Xiang Xiao
a29d9ea9da
fsutils/examples: Include unistd.h explicitly
...
to get the prototypes or macros are defined in it
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02:00
Xiang Xiao
dd5dbde620
Fix Error: slcan.c:266:60: error: format specifies type 'unsigned long' but the argument has type 'canid_t' (aka 'unsigned int') [-Werror,-Wformat]
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 14:55:30 +01:00
Xiang Xiao
8094ced139
Fix Error: slcan.c:265:19: error: variable 'reccount' is uninitialized when used here [-Werror,-Wuninitialized]
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 14:55:30 +01:00
yinshengkai
ee4d8b738f
Makefile: replace INCDIR to INCDIR_PREFIX
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-10 02:38:58 +08:00
yinshengkai
2c3c2edcb7
Makefile: Remove INCDIROPT
...
This option, which resolves to -w when CONFIG_CYGWIN_WINTOOL is
configured, is now appended to INCDIR in tools/Config.mk.
See git commit # 5eae32577e5d5226e5d3027c169eeb369f83f77d in the main
2022-10-25 13:48:16 +08:00
raiden00pl
003dbe1837
Lely CANopen port
2022-10-22 23:31:26 +08:00
Xiang Xiao
4941182cc6
Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),)
...
to support the tristate option correctly and unify the usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 14:59:08 +02:00
Peter van der Perk
819c34e975
Add libcanardv1 for Cyphal, rename libcanard to libcanardv0
2022-08-02 17:01:28 +08:00
Xiang Xiao
a12707177b
Remove "| O_BINARY" or " |= O_BINARY" since O_BINARY is 0 now
...
follow nuttx kernel side change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-07 20:22:38 +03:00
Alin Jerpelea
5886bf29a1
apps: canutils: Makefiles: update licenses to Apache
...
Update Makefiles to Apache license
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
raiden00pl
b5128c401f
canutils/libcanutils: remove redundant SocketCAN error definitions, we already have them in nuttx/can.h
2022-01-23 01:34:23 +08:00
raiden00pl
f4a1d28fd5
canutils/slcan: make stacksize configurable
2022-01-23 01:34:23 +08:00
raiden00pl
13fcbcb3d1
canutils/cansend: make stacksize configurable
2022-01-23 01:34:23 +08:00
raiden00pl
267d198212
canutils/candump: make stacksize configurable
2022-01-23 01:34:23 +08:00
Fotis Panagiotopoulos
bc5d8034f1
Typo fixes.
2022-01-06 10:30:41 +08:00
Eero Nurkkala
7b48a119ac
canutils: odb_decodepid: fix nxstyle issues
...
Fix the following nxstyle issue on the file:
error: Operator/assignment must be followed with whitespace
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-12-28 02:48:34 -06:00
Eero Nurkkala
2f44643704
canutils: odb_decodepid: fix two debug prints
...
Fix the following printfs, as reported by cppcheck:
canutils/libobd2/obd_decodepid.c:85:9: error: printf format string requires 1 parameter but only 0 are given. [wrongPrintfScanfArgNum]
printf("Supported PIDs: %08X\n");
^
canutils/libobd2/obd_decodepid.c:114:9: error: printf format string requires 2 parameters but only 1 is given. [wrongPrintfScanfArgNum]
printf("Throttle position = %d\% \n", (100 * dev->data[3])/255);
^
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-12-28 02:48:34 -06:00
Petro Karashchenko
5ac15130db
apps: remove space befone newline in logs
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 20:52:08 -06:00
Jari van Ewijk
7cbe2db2c9
SLCAN: Fix incorrect format identifier in print function
2021-09-17 08:20:08 -05:00
Alin Jerpelea
1c3d08a738
canutils: libcanutils: add GPL build barrier
...
Exclude libcanutils from build unless the license is set to
allow GPL code in the build.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-18 13:28:17 -03:00
Alin Jerpelea
c9bee94bd7
apps: canutils: libcanutils: move error.h from NuttX
...
This file is used by the libcanutils and can be isolated in apps
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-16 09:45:33 -07:00
Alin Jerpelea
8ea16655a6
canutils: fix relative path CI error
...
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
04211ebd86
canutils: canlib: update licenses to Apache
...
Gregory Nutt is has submitted the SGA
Sebastien Lorquet has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-09 22:08:10 -05:00
Alin Jerpelea
dc888ba70f
canutils: update licenses to Apache
...
Alan Carvalho de Assis has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-08 08:43:15 -05:00