Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensing: implement the phy_3d_sensor #60331

Closed
wants to merge 11 commits into from

Commits on Jun 30, 2023

  1. sensing: refine sensing API

    1) modify reporter type from int to const sensing_sensor_handle_t in
    sensing_sensor_process_t callback
    2) move variable shift behind struct sensing_sensor_value_header in
    struct sensing_sensor_value_q31
    3) add pointer checking for sensing API
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    086e085 View commit details
    Browse the repository at this point in the history
  2. sensing: add hinge angle sensor skeleton

    Add hinge angle virtual sensor for sensing subsystem, hinge angle sensor
    takes both base accel and lid accel as reporter
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    8fa4827 View commit details
    Browse the repository at this point in the history
  3. sensing: implement set/get interval and sensitivity

    set/get interval sensitivity is implmented in sensor management module,
    and also add related test case
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    d46f4c0 View commit details
    Browse the repository at this point in the history
  4. sensing: create runtime thread and implement later config

    create runtime thread and wait event semphore, meanwhile, trigger event
    semphore in set interval/sensitivity API to notify runtime thread to
    arbitrate interval/sensitivity
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    3e3327f View commit details
    Browse the repository at this point in the history
  5. sensing: hinge angle sensor initial

    implement hinge angle sensor init and set interval function
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    dbb1278 View commit details
    Browse the repository at this point in the history
  6. sensing: loop sensors in runtime module

    add runtime module, implement loop sensors in runtime module
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    d89a1ae View commit details
    Browse the repository at this point in the history
  7. sensing: implement sensor process data function

    1) enhance sensor need execute function, and data ready and sensor has
    new data checking
    2) implement sensor process data function, included both physical sensor
    and virtual sensor data processing
    3) implement sensor send dato to client, including time and sensitivity
    checking and update sensor consume time
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    462c660 View commit details
    Browse the repository at this point in the history
  8. sensing: implement sleep time calculation for sensor loop

    implement sleep time calculation in loop sensors
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    2d4b451 View commit details
    Browse the repository at this point in the history
  9. sensing: implement sensor post data processing

    1) enhance sensor data process, check time, sensitivity condition
    2) send data to its client
    3) create dispatch thread to process sensor data from runtime module
    
    Signed-off-by: Guangfu Hu <guangfu.hu@intel.com>
    ghu0510 committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    719560c View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. sensor: add helper functions to convert milli/micro to sensor_value

    Add two helper functions as the couple functions of sensor_value_to_milli
    and sensor_value_to_micro.
    
    Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
    lixuzha committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    54df386 View commit details
    Browse the repository at this point in the history
  2. sensing: implement the phy_3d_sensor

    This patch is to implement the phy_3d_sensor in sensing subsystem. It's a
    wrapper layer of AGM sensor driver for sensing subsystem. It supports
    the accelerometer and gyrometer now.
    This has been tested with lsm6dso and lis2dw12 on hardware and bmi160 on
    native_posix simulator. It can work fine while sensor is either in polling
    mode or in data ready trigger mode. And set_sensitivity function is just
    implemented following api definition and not tested yet.
    
    Tested with:
    $ west build -p -b native_posix samples/subsys/sensing/simple/ -t run
    
    Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
    lixuzha committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    5f017e4 View commit details
    Browse the repository at this point in the history