![]() |
SimpleFOClibrary 2.4.0
|
#include <MagneticSensorI2C.h>
Public Member Functions | |
| MagneticSensorI2C (uint8_t _chip_address, int _bit_resolution, uint8_t _angle_register_msb, int _msb_bits_used, bool lsb_right_aligned=true) | |
| MagneticSensorI2C (MagneticSensorI2CConfig_s config) | |
| void | init (TwoWire *_wire=&Wire) |
| float | getSensorAngle () override |
| int | checkBus (byte sda_pin, byte scl_pin) |
Public Member Functions inherited from Sensor | |
| virtual float | getMechanicalAngle () |
| virtual float | getAngle () |
| virtual double | getPreciseAngle () |
| virtual float | getVelocity () |
| virtual int32_t | getFullRotations () |
| virtual void | update () |
| virtual int | needsSearch () |
Static Public Member Functions | |
| static MagneticSensorI2C | AS5600 () |
Public Attributes | |
| uint8_t | currWireError = 0 |
Public Attributes inherited from Sensor | |
| float | min_elapsed_time = 0.000100 |
Additional Inherited Members | |
Protected Member Functions inherited from Sensor | |
| virtual void | init () |
Protected Attributes inherited from Sensor | |
| float | velocity =0.0f |
| float | angle_prev =0.0f |
| long | angle_prev_ts =0 |
| float | vel_angle_prev =0.0f |
| long | vel_angle_prev_ts =0 |
| int32_t | full_rotations =0 |
| int32_t | vel_full_rotations =0 |
Definition at line 29 of file MagneticSensorI2C.h.
| MagneticSensorI2C::MagneticSensorI2C | ( | uint8_t | _chip_address, |
| int | _bit_resolution, | ||
| uint8_t | _angle_register_msb, | ||
| int | _msb_bits_used, | ||
| bool | lsb_right_aligned = true |
||
| ) |
MagneticSensorI2C class constructor
| chip_address | I2C chip address |
| bits | number of bits of the sensor resolution |
| angle_register_msb | angle read register msb |
| _bits_used_msb | number of used bits in msb |
Definition at line 42 of file MagneticSensorI2C.cpp.
| MagneticSensorI2C::MagneticSensorI2C | ( | MagneticSensorI2CConfig_s | config | ) |
MagneticSensorI2C class constructor
| config | I2C config |
Definition at line 63 of file MagneticSensorI2C.cpp.
|
static |
Definition at line 71 of file MagneticSensorI2C.cpp.
| int MagneticSensorI2C::checkBus | ( | byte | sda_pin, |
| byte | scl_pin | ||
| ) |
experimental function to check and fix SDA locked LOW issues
Definition at line 123 of file MagneticSensorI2C.cpp.
|
overridevirtual |
| void MagneticSensorI2C::init | ( | TwoWire * | _wire = &Wire | ) |
sensor initialise pins
Definition at line 77 of file MagneticSensorI2C.cpp.
| uint8_t MagneticSensorI2C::currWireError = 0 |
current error code from Wire endTransmission() call
Definition at line 59 of file MagneticSensorI2C.h.