Commit Graph

7184 Commits

Author SHA1 Message Date
raiden00pl
9ee4daea43 examples/foc: configure active breake current 2023-10-17 14:24:58 +08:00
raiden00pl
6cf6a73fc0 industry/foc: add support for PMSM feedforward compensation
reference: https://electronics.stackexchange.com/questions/386246/field-oriented-control-feed-forward-term
2023-10-17 14:24:23 +08:00
raiden00pl
e8ff9ad005 foc/example/Kconfig: cosmetics 2023-10-17 14:23:42 +08:00
raiden00pl
969607ac44 examples/foc: fix setpoint scale for char interface 2023-10-17 14:23:42 +08:00
raiden00pl
4c4976a4e9 examples/foc: add warning if no controller enabled 2023-10-17 14:23:42 +08:00
raiden00pl
5dd4813b34 examples/foc: fix wrong nxscope functions for fixed16 2023-10-16 13:53:40 -04:00
raiden00pl
53b7486528 industry/foc: reset velocity observer output foc_velocity_zero_xx() is called 2023-10-16 13:46:09 -04:00
raiden00pl
5a65f3d48f industry/foc: reset align data when align is finished
this allows the align procedure to be run multiple times
2023-10-16 13:44:37 -04:00
raiden00pl
8ee684e586 industry/foc: make direction alignment configurable
for sensorless velocity controller (ESC) we don't need to align the direction,
but we have to align the initial motor phase each time the motor start
2023-10-16 13:44:37 -04:00
raiden00pl
768d5b29f1 industry/foc: force angle observers output to zero if motor stopped
this prevents junk data from the observer when the motor is stopped
2023-10-16 13:42:57 -04:00
Xiang Xiao
fe7f217497 nshlib: losetup/lomtd change "-s <sectsize>" to "-b <sectsize>"
to follow host tool usage:
https://github.com/util-linux/util-linux/blob/master/sys-utils/losetup.c#L473

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-16 13:14:48 -04:00
raiden00pl
baa23afbd3 industry/foc/openloop: don't use direction argument, instead use signed velocity
otherwise, when dir=-1 and the velocity value is negative, the output from
velocity is in the opposite direction than the intended one
2023-10-16 13:11:49 -04:00
raiden00pl
a36318c536 industry/foc/fixed16/foc_ang_onfo.c: use b16abs operation
we get rid of custom ABS() macro
2023-10-16 22:36:34 +08:00
chao an
929f1009c7 system/readline: correct the readline(3) prototype
Reference:
https://man.openbsd.org/readline.3

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-16 22:04:18 +08:00
raiden00pl
6a814dd41f industry/foc/nfo: use float numbers in all calculations
we want to use FPU instructions in calculations not __aeabi
2023-10-15 22:45:13 +08:00
SPRESENSE
7de8d0603f wireless/gs2200m: Fix handling of ioctl except SIOCDENYINETSOCK
When running a dual stack (usrsock daemon and kernel stack),
ioctl requests that should be handled by the kernel stack are being
processed by the usrsock daemon. This causes ifconfig and ifup to fail.
The usrsock daemon that receives an ioctl request that should be
handled by the kernel stack should reply with ENOTTY.
Replying with ENOTTY means that the ioctl request can fall back to the
kernel stack.
2023-10-13 08:48:25 +02:00
liqinhui
79e8722743 dhcp6c: Add the renew6 command for dhcp6c.
Support Stateless and Stateful. The renew6 is used as follows:
 - Stateless: renew6 eth0
 - Stateful: renew6 eth0 1

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-12 10:15:55 +08:00
Michal Lenc
91a682f11b testing: add test application for fopencookie utility
Adds test application for fopencookie utility. The test tool performs
write/read/seek operations on custom stream defined at user space.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-10 01:03:42 +08:00
Michal Lenc
529c0f1fc9 system: use fileno to get stream file descriptor
There is a POSIX defined interface to get file descriptor from file_struct
stream. Applications should use it and not access the structure directly.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-10 01:03:42 +08:00
xuxin19
a3bbea86ff remove the check that progname matches mainsrc
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-10 01:02:50 +08:00
xuxin19
77a5666cb7 Revert "fix progname do not match issue"
This reverts commit c230321cae.
2023-10-10 01:02:50 +08:00
Huang Qi
1e5e755ba2 examples: Split hello example into hello and hello_wasm
Decouple the hello example into hello and hello_wasm. The hello_wasm
example is a minimal example to show how to build a wasm application
by using the NuttX build system, and avoid disturbing the hello
(native build).

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-10-08 14:53:08 +08:00
Junbo Zheng
3177a9be84 crypto/mbedtls: fix kconfig typo
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2023-10-06 20:49:06 +08:00
Petteri Aimonen
5a992d4e18 Add basic IEEE-1588 PTP server/client
What works:
- Basic server & client operation
- Transmission and reception of announce, sync and follow-up

Still missing:
- SO_TIMINGS for getting more precise packet timestamps
- Implementation of delay_req and delay_resp packets
- Status and stop interfaces for the daemon
2023-10-06 17:25:23 +08:00
Petteri Aimonen
c340d735ec adjtime: Fix wrong printf format when using CONFIG_SYSTEM_TIME64 2023-10-06 17:25:23 +08:00
ThomasNS
06b4911db4 add shm example using fs shm 2023-10-06 17:24:44 +08:00
raiden00pl
b88057fffd examples/foc: support svm3 state with nxscope 2023-10-05 20:42:46 +08:00
raiden00pl
a56f0922c5 industrial/foc: add an interface that returns the modulation state
Useful for debugging and demonstrating FOC operation
2023-10-05 20:42:46 +08:00
raiden00pl
97e2be0033 logging/nxscope/nxscope.c: fix indentation 2023-10-05 20:42:46 +08:00
SPRESENSE
719d03a8c1 lte/alt1250: Change error code from ENOTSUP to EAFNOSUPPORT
ENOTSUP is now a special error code to fallback to the kernel network stack.
Therefore, change the error code from ENOTSUP to EAFNOSUPPORT.
2023-10-03 10:32:18 +02:00
raiden00pl
5cbd9b2b7b examples/foc: allow nxscope transfer over RTT interface
For UART serial interface TERMIOS is required, but for RTT serial interface it's not.
2023-10-02 21:46:52 +03:00
raiden00pl
f505b6cb08 nxscope/serial: ignore baud configuration if set to 0 2023-10-02 21:46:52 +03:00
Eren Terzioglu
85eb37c62b examples/can: TX and RX structs assigned 0 at startup 2023-09-28 19:14:21 +08:00
anjiahao
ddaa1411a3 system/zlib:fix makefile rule
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-28 08:50:55 +02:00
Xiang Xiao
2d6d199c49 Fix drivertest_watchdog.c:284:33: error: storage size of 'reset_cause' isn't known
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 00:45:16 +03:00
halyssonJr
02db9c7612 create app for wiegand protocol
update app for wiegand protocol

improve wiegand app

app improvement and fix Kconig
2023-09-25 16:21:40 -04:00
anjiahao
a48810f4a5 zlib:add support for zlib
We can use zip & unzip commands in nuttx

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-09-26 02:28:46 +08:00
Xiang Xiao
9e31a26edc Fix nsh_altconsole.c:152:41: error: implicit declaration of function 'strlen'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 00:31:09 +08:00
Xiang Xiao
610ba20527 Fix ./drivertest_rtc.c:43:10: fatal error: nuttx/time.h: No such file or director
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 23:03:00 +08:00
Ville Juven
e9f4e87786 nsh_alias.c: unalias -a command does not work correctly
getopt returns the argument if it is found, so testing against != ERROR is
wrong.
2023-09-25 21:05:37 +08:00
makejian
851a4aa904 crypto/mbedtls: load certificate memory optimization
Reducing the use of memory due to multiple network links loading certificates
Signed-off-by: makejian <makejian@xiaomi.com>
2023-09-25 14:49:39 +08:00
Xiang Xiao
483e6bae27 build: Remove staging folder in distclean
forgot in pr: https://github.com/apache/nuttx-apps/pull/1509

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 01:10:29 +03:00
Xiang Xiao
99a8c5937c Fix drivertest_watchdog.c:207:30: error: 'struct wdg_state_s' has no member named 'infopath'
Remove the unsupported -p option

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 01:08:49 +03:00
yinshengkai
3e870833ab testing: fix osperf running error in SMP mode
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-23 15:10:23 +08:00
yinshengkai
9d8a364e16 testing/osperf: fix qemu-armv8a compilation error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-23 15:10:23 +08:00
likun17
009c9ad13f apps/system/uorb/test/unit_test.c: add orb_copy return judgment.
Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-23 13:18:52 +08:00
hujun5
5c5c6653fd libuv: fix build error
If UV_ONCE_INIT is a struct, the following errors will occur:

libuv/src/unix/nuttx.c: In function 'uv__global_get':
/home/hujun5/downloads1/vela_sim/apps/system/libuv/libuv/include/uv/unix.h:136:22: error: expected expression before '{' token
  136 | #define UV_ONCE_INIT PTHREAD_ONCE_INIT
      |                      ^~~~~~~~~~~~~~~~~
libuv/src/unix/nuttx.c:287:26: note: in expansion of macro 'UV_ONCE_INIT'
  287 |           global->once = UV_ONCE_INIT;
      |                          ^~~~~~~~~~~~
/home/hujun5/downloads1/vela_sim/apps/system/libuv/libuv/include/uv/unix.h:136:22: error: expected expression before '{' token
  136 | #define UV_ONCE_INIT PTHREAD_ONCE_INIT
      |                      ^~~~~~~~~~~~~~~~~
libuv/src/unix/nuttx.c:288:50: note: in expansion of macro 'UV_ONCE_INIT'
  288 |           global->uv__signal_global_init_guard = UV_ONCE_INIT;

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-23 13:18:27 +08:00
raiden00pl
1050d3028b libsodium depends on ICS license 2023-09-22 20:42:18 +08:00
SPRESENSE
d6ed8880d8 lte/alt1250: Correspond to shutdown
ALT1250 daemon to support shutdown.
2023-09-22 16:25:09 +08:00
dulibo1
049aaa4c96 pmconfig: check domain if invaild return error avoid to crash
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-09-22 09:16:54 +08:00