Skip to content

Commit

Permalink
WIP: Get proximity sensor value from DBus
Browse files Browse the repository at this point in the history
Signed-off-by: Baocheng Su <[email protected]>
  • Loading branch information
BaochengSu committed Jan 21, 2025
1 parent 534dc99 commit e8d65da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions recipes-app/iot2050-event-record/files/iot2050-event-record.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,20 @@ def __exit__(self, exc_type, exc_val, exc_tb): # type: ignore
self._fd.close()


class ProximitySensorDBus():
def __init__(self, critical_value: int):
self.critical_value = critical_value

def is_uncovered(self) -> bool:
return False

def __enter__(self):
return self

def __exit__(self, exc_type, exc_val, exc_tb):
pass


IIO_IMU_PATH = "/sys/devices/platform/bus@100000/2030000.i2c/i2c-5/5-006a/"
def record_sensor_events():
accel_x_raw = "{}/in_accel_x_raw"
Expand Down

0 comments on commit e8d65da

Please sign in to comment.