Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FrameworkComputer/framework-win-sensor-driver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: FrameworkComputer/framework-win-sensor-driver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: sensor-autodetect
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Mar 10, 2026

  1. Replace compile-time sensor enables with runtime EC detection

    Query the EC at driver startup to determine which sensors are present
    instead of using #define ENABLE_* flags. Accelerometers are detected
    via EC_MEMMAP_ACC_STATUS presence bit and MOTIONSENSE_CMD_INFO. ALS
    is detected by enumerating motion sensors for MOTIONSENSE_TYPE_LIGHT,
    with a fallback to reading EC_MEMMAP_ALS. This allows a single driver
    binary to work across hardware configurations.
    
    Also fixes the ENABLE_ORIENTATIONACCEL_SENSOR typo in the old code.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    afd390e View commit details
    Browse the repository at this point in the history
  2. Add HingeAngle sensor client

    Expose the EC-calculated lid hinge angle (0-360 degrees) to Windows
    via GUID_SensorType_HingeAngle / PKEY_SensorData_HingeAngle. The EC
    already computes this from base+lid accelerometers and stores it at
    EC_MEMMAP_ACC_DATA. The sensor is auto-detected when both base and
    lid accelerometers are present.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Mar 10, 2026
    Configuration menu
    Copy the full SHA
    28887e0 View commit details
    Browse the repository at this point in the history
Loading