Otpvondoiats opened a new pull request, #21941:
URL: https://github.com/apache/nuttx/pull/21941

   ## Summary
   
   * include/nuttx/uorb.h: add an `int32_t status` member to `sensor_accel`,
     `sensor_accel_uncal`, `sensor_gyro`, `sensor_gyro_uncal`, `sensor_hrate`
     and `sensor_hbeat`, and `enum sensor_accuracy_status` with the Android
     sensor status values.
   * **Breaking**: rename `SNIOC_SET_NONWAKEUP` to `SNIOC_SET_WAKEUP` (same
     number, argument true enables wakeup), `sensor_ops_s::set_nonwakeup` to
     `set_wakeup`, and the `nonwakeup` state fields to `wakeup`. Non-wakeup is
     already the default for every user, so the only request left is to turn
     wakeup on.
   * sensor_rpmsg:
     * do not broadcast SUBSCRIBE / UNSUBSCRIBE for physical sensors;
     * send SUBSCRIBE / UNSUBSCRIBE only to running cores, or to cores whose
       proxy has wakeup enabled; ADVERTISE is still sent to every core;
       proxies are kept until the endpoint is released;
     * send the persist flag with the first ADVERTISE;
     * distinguish "never advertised" (`nadvertisers == -1`) from "all
       advertisers closed" in the SUBSCRIBE handler;
     * forward interval, batch latency and wakeup after ADVERTISE_ACK is sent,
       so the advertiser has created its stub when the ioctls arrive.
   
   Depends on apache/nuttx-apps https://github.com/apache/nuttx-apps/pull/4072: 
system/uorb uses `SNIOC_SET_NONWAKEUP`
   and must be updated at the same time.
   
   ## Impact
   
   * API: `SNIOC_SET_NONWAKEUP`, `set_nonwakeup` and `state.nonwakeup` are
     removed. Fix: use `SNIOC_SET_WAKEUP` with the inverted argument, rename
     `set_nonwakeup` to `set_wakeup` and invert its bool argument.
   * Build: every configuration with `CONFIG_UORB=y` fails to build with
     current nuttx-apps master until apache/nuttx-apps#<A1> is merged
     (`uORB.c:145: 'SNIOC_SET_NONWAKEUP' undeclared`). The two PRs must be
     merged together.
   * Cross-core: the ioctl is forwarded over rpmsg with the same number and
     inverted meaning, so all cores that share sensor topics must run the new
     code.
   * ABI: the six structs above grow by the `status` member.
   * Known issues fixed by the follow-up sensor_rpmsg PR: an uninitialized
     state can be synced when an existing proxy is reused, `stub->wakeup` is
     not initialized, `sensor_rpmsg_suback_handler()` does not handle a NULL
     dev, and stale proxies of a re-registered advertiser are not released.
   
   ## Testing
   
   Host: Ubuntu 22.04 x86_64, gcc 13.4.0, arm-none-eabi-gcc 10.3.1,
   xtensa-esp32s3-elf-gcc 12.2.0, aarch64-none-elf-gcc 13.2.rel1.
   
   `./tools/checkpatch.sh -c -m -g master..HEAD`: all checks pass.
   
   Every defconfig with `CONFIG_UORB=y`, clean tree,
   `./tools/configure.sh -l -a <apps> <board>:<config> && make -j16`:
   
   | config | this PR + nuttx-apps 
https://github.com/apache/nuttx-apps/pull/4072 | this PR + nuttx-apps master | 
master + master |
   |---|---|---|---|
   | sim:rpserver | PASS | FAIL | PASS |
   | sim:rpproxy | PASS | FAIL | PASS |
   | sim:rpserver_uart | PASS | FAIL | PASS |
   | sim:rpproxy_uart | PASS | FAIL | PASS |
   | sim:baromonitor | PASS | FAIL | PASS |
   | thingy91:thingy91_rtt | PASS | FAIL | PASS |
   | nucleo-h563zi:dts | PASS | FAIL | PASS |
   | stm32f4discovery:scl3300 | PASS | FAIL | PASS |
   | esp32s3-ws-lcd128:imu-qmi8658 | PASS | FAIL | PASS |
   | lckfb-szpi-esp32s3:qmi8658 | PASS | FAIL | PASS |
   | raspberrypi-4b:baromonitor | PASS | FAIL | PASS |
   | raspberrypi-4b:i2c1 | PASS | FAIL | PASS |
   | raspberrypi-4b:bmp280 | PASS | FAIL | PASS |
   | nrf9160-dk:modem_ns | FAIL | FAIL | FAIL |
   
   `nrf9160-dk:modem_ns` fails on master as well
   (`nrf91_modem_at.h:32: fatal error: nrf_modem_at.h: No such file or 
directory`).
   
   sim:rpserver with nuttx-apps master:
   
       uORB/uORB.c:145:17: error: 'SNIOC_SET_NONWAKEUP' undeclared (first use 
in this function); did you mean 'SNIOC_SET_WAKEUP'?
   
   sim:rpserver with nuttx-apps https://github.com/apache/nuttx-apps/pull/4072 :
   
       LD:  nuttx
       SIM elf with dynamic libs archive in nuttx.tgz
   
   ```
   uorb_listener -n 20 -r 50 sensor_mag
   
   Mointor objects num:1
   object_name:sensor_mag, object_instance:0
   
sensor_mag(now:6839891479):timestamp:6822866305,x:-142.654663,y:-436.914368,z:-259.806885,temperature:0.000000,status:0
   
sensor_mag(now:6839891845):timestamp:6822886305,x:-143.452957,y:-437.016266,z:-260.415924,temperature:0.000000,status:0
   
sensor_mag(now:6839893371):timestamp:6822906305,x:-143.275970,y:-437.315430,z:-260.423737,temperature:0.000000,status:0
   
sensor_mag(now:6840012084):timestamp:6822926305,x:-142.711472,y:-437.361786,z:-260.560638,temperature:0.000000,status:0
   
sensor_mag(now:6840012390):timestamp:6822946305,x:-142.293671,y:-437.305664,z:-260.508453,temperature:0.000000,status:0
   
sensor_mag(now:6840013916):timestamp:6822966305,x:-142.382645,y:-437.022614,z:-260.191559,temperature:0.000000,status:0
   
sensor_mag(now:6840015441):timestamp:6822986305,x:-142.502579,y:-437.220367,z:-259.478241,temperature:0.000000,status:0
   
sensor_mag(now:6840016967):timestamp:6823006305,x:-142.797745,y:-437.180542,z:-259.984894,temperature:0.000000,status:0
   
sensor_mag(now:6840135681):timestamp:6823026305,x:-142.961456,y:-436.672577,z:-260.747101,temperature:0.000000,status:0
   
sensor_mag(now:6840135986):timestamp:6823046305,x:-142.104370,y:-437.129211,z:-260.660370,temperature:0.000000,status:0
   
sensor_mag(now:6840137512):timestamp:6823066305,x:-141.851807,y:-437.447998,z:-260.190887,temperature:0.000000,status:0
   
sensor_mag(now:6840138977):timestamp:6823086305,x:-142.413742,y:-437.031219,z:-259.771027,temperature:0.000000,status:0
   
sensor_mag(now:6840140502):timestamp:6823106305,x:-142.697388,y:-436.721069,z:-259.819946,temperature:0.000000,status:0
   
sensor_mag(now:6840142028):timestamp:6823126305,x:-142.781769,y:-437.073578,z:-260.496094,temperature:0.000000,status:0
   
sensor_mag(now:6840143493):timestamp:6823146305,x:-142.837738,y:-437.089081,z:-259.739105,temperature:0.000000,status:0
   
sensor_mag(now:6840145019):timestamp:6823166305,x:-142.950775,y:-436.607574,z:-259.687592,temperature:0.000000,status:0
   
sensor_mag(now:6840146545):timestamp:6823186305,x:-143.392624,y:-436.465240,z:-260.005127,temperature:0.000000,status:0
   
sensor_mag(now:6840148010):timestamp:6823206305,x:-143.329361,y:-436.960510,z:-259.383759,temperature:0.000000,status:0
   
sensor_mag(now:6840257019):timestamp:6823226305,x:-143.260941,y:-436.941589,z:-260.308960,temperature:0.000000,status:0
   
sensor_mag(now:6840257324):timestamp:6823246305,x:-143.020004,y:-437.058502,z:-260.273071,temperature:0.000000,status:0
   Object name:sensor_mag0, recieved:20
   Total number of received Message:20/20
   ap> [11/16 21:29:14] [15] [sensor] [semd]sensor_mag: subnum:0 freq:0 batch:0
   ```
   
   ## build log
   
[nrf9160-dk-modem_ns.log](https://github.com/user-attachments/files/34964574/nrf9160-dk-modem_ns.log)
   
[sim-baromonitor.log](https://github.com/user-attachments/files/34964576/sim-baromonitor.log)
   
[raspberrypi-4b-baromonitor.log](https://github.com/user-attachments/files/34964577/raspberrypi-4b-baromonitor.log)
   
[sim-rpserver_uart.log](https://github.com/user-attachments/files/34964580/sim-rpserver_uart.log)
   
[sim-rpserver.log](https://github.com/user-attachments/files/34964587/sim-rpserver.log)
   
[sim-rpproxy_uart.log](https://github.com/user-attachments/files/34964588/sim-rpproxy_uart.log)
   
[sim-rpproxy.log](https://github.com/user-attachments/files/34964589/sim-rpproxy.log)
   
[esp32s3-ws-lcd128-imu-qmi8658.log](https://github.com/user-attachments/files/34964591/esp32s3-ws-lcd128-imu-qmi8658.log)
   
[lckfb-szpi-esp32s3-qmi8658.log](https://github.com/user-attachments/files/34964593/lckfb-szpi-esp32s3-qmi8658.log)
   
[thingy91-thingy91_rtt.log](https://github.com/user-attachments/files/34964594/thingy91-thingy91_rtt.log)
   
[stm32f4discovery-scl3300.log](https://github.com/user-attachments/files/34964596/stm32f4discovery-scl3300.log)
   
[raspberrypi-4b-bmp280.log](https://github.com/user-attachments/files/34964597/raspberrypi-4b-bmp280.log)
   
[raspberrypi-4b-i2c1.log](https://github.com/user-attachments/files/34964599/raspberrypi-4b-i2c1.log)
   
[nucleo-h563zi-dts.log](https://github.com/user-attachments/files/34964600/nucleo-h563zi-dts.log)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to