![]() |
SimpleFOClibrary 2.4.0
|
#include <MagneticSensorSPI.h>
Public Member Functions | |
| MagneticSensorSPI (int cs, int bit_resolution, int angle_register=0, long clock_speed=NOT_SET) | |
| MagneticSensorSPI (MagneticSensorSPIConfig_s config, int cs, long clock_speed=NOT_SET) | |
| void | init (SPIClass *_spi=&SPI) |
| float | getSensorAngle () override |
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 () |
Public Attributes | |
| int | spi_mode |
| long | clock_speed |
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 25 of file MagneticSensorSPI.h.
| MagneticSensorSPI::MagneticSensorSPI | ( | int | cs, |
| int | bit_resolution, | ||
| int | angle_register = 0, |
||
| long | clock_speed = NOT_SET |
||
| ) |
MagneticSensorSPI class constructor
| cs | SPI chip select pin |
| bit_resolution | sensor resolution bit number |
| angle_register | (optional) angle read register - default 0x3FFF |
| clock_speed | (optional) SPI clock speed |
Definition at line 53 of file MagneticSensorSPI.cpp.
| MagneticSensorSPI::MagneticSensorSPI | ( | MagneticSensorSPIConfig_s | config, |
| int | cs, | ||
| long | clock_speed = NOT_SET |
||
| ) |
MagneticSensorSPI class constructor
/** MagneticSensorSPI class constructor
| config | SPI config |
| cs | SPI chip select pin |
| clock_speed | (optional) SPI clock speed |
Definition at line 69 of file MagneticSensorSPI.cpp.
|
overridevirtual |
| void MagneticSensorSPI::init | ( | SPIClass * | _spi = &SPI | ) |
sensor initialise pins
Definition at line 86 of file MagneticSensorSPI.cpp.
| long MagneticSensorSPI::clock_speed |
Definition at line 57 of file MagneticSensorSPI.h.
| int MagneticSensorSPI::spi_mode |
Definition at line 54 of file MagneticSensorSPI.h.