mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-23 23:23:55 +08:00
* tici sensord: WIP
* add sensor constants
* rename files
* base class
* init sensors
* publish something
* dont leak memory
* try reading from accel
* Accel works
* add time and sensor source
* Update release files
* If we want low BW we want 125hz
* this should run gyro as well
* add filter on gyro
* also filter accel data
* Add i2c files
* cast makes macos unhappy
* Same outputs as android sensord
Co-authored-by: Tici <robbe@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 622e42d504
17 lines
341 B
C++
17 lines
341 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <sys/types.h>
|
|
|
|
class I2CBus {
|
|
private:
|
|
int i2c_fd;
|
|
|
|
public:
|
|
I2CBus(uint8_t bus_id);
|
|
~I2CBus();
|
|
|
|
int read_register(uint8_t device_address, uint register_address, uint8_t *buffer, uint8_t len);
|
|
int set_register(uint8_t device_address, uint register_address, uint8_t data);
|
|
};
|