![]() |
SimpleFOClibrary
2.1
|
#include <MagneticSensorSPI.h>
Public Member Functions | |
| MagneticSensorSPI (int cs, float bit_resolution, int angle_register=0) | |
| MagneticSensorSPI (MagneticSensorSPIConfig_s config, int cs) | |
| void | init (SPIClass *_spi=&SPI) |
| float | getAngle () override |
| float | getVelocity () override |
Public Member Functions inherited from Sensor | |
| virtual int | needsSearch () |
Public Attributes | |
| int | spi_mode |
| long | clock_speed |
Definition at line 24 of file MagneticSensorSPI.h.
| MagneticSensorSPI::MagneticSensorSPI | ( | int | cs, |
| float | bit_resolution, | ||
| int | angle_register = 0 |
||
| ) |
MagneticSensorSPI class constructor
| cs | SPI chip select pin |
| bit_resolution | sensor resolution bit number |
| angle_register | (optional) angle read register - default 0x3FFF |
Definition at line 33 of file MagneticSensorSPI.cpp.
| MagneticSensorSPI::MagneticSensorSPI | ( | MagneticSensorSPIConfig_s | config, |
| int | cs | ||
| ) |
MagneticSensorSPI class constructor
| config | SPI config |
| cs | SPI chip select pin |
Definition at line 49 of file MagneticSensorSPI.cpp.
|
overridevirtual |
|
overridevirtual |
get current angular velocity (rad/s)
Reimplemented from Sensor.
Definition at line 114 of file MagneticSensorSPI.cpp.
| void MagneticSensorSPI::init | ( | SPIClass * | _spi = &SPI | ) |
sensor initialise pins
Definition at line 64 of file MagneticSensorSPI.cpp.
| long MagneticSensorSPI::clock_speed |
Definition at line 53 of file MagneticSensorSPI.h.
| int MagneticSensorSPI::spi_mode |
Definition at line 50 of file MagneticSensorSPI.h.