MRAS
Multi Rocket Avionics System
Loading...
Searching...
No Matches
Sensor_LSM6DSO32 Class Reference

A subsystem for the LSM6DSO32 accelerometer and gyroscope. More...

#include <Sensor_LSM6DSO32.h>

Inheritance diagram for Sensor_LSM6DSO32:
Inheritance graph
Collaboration diagram for Sensor_LSM6DSO32:
Collaboration graph

Public Member Functions

 Sensor_LSM6DSO32 (uint8_t id, uint8_t chip_select, SPIClass &spi, uint32_t frequency)
 Construct a new Sensor_LSM6DSO32 object.
 
int8_t setup () override
 
int8_t loop () override
 
- Public Member Functions inherited from Subsystem
virtual const char * get_name ()=0
 
virtual int8_t setup ()=0
 
virtual int8_t loop ()=0
 
uint8_t get_id () const
 
int8_t get_status () const
 
int8_t self_test () const
 
bool add_subscriber (Subsystem *subscriber)
 
 Subsystem (uint8_t id)
 

Additional Inherited Members

- Protected Member Functions inherited from Subsystem
void log (const char fmt[],...)
 
virtual void on_message (SystemMessage *msg)=0
 
void publish (SystemMessage *msg)
 
- Static Protected Member Functions inherited from Subsystem
static void buzzer (uint16_t frequency, uint32_t duration, bool block=false)
 
- Protected Attributes inherited from Subsystem
int8_t status = 0
 
int8_t self_test_result = -1
 

Detailed Description

A subsystem for the LSM6DSO32 accelerometer and gyroscope.

This Subsystem handles the setup and reading of data from the LSM6DSO32 accelerometer and gyroscope.

This Subsystem emits AccelerometerDataMsg and GyroDataMsg messages to its subscribers.

Constructor & Destructor Documentation

◆ Sensor_LSM6DSO32()

Sensor_LSM6DSO32::Sensor_LSM6DSO32 ( uint8_t  id,
uint8_t  chip_select,
SPIClass &  spi,
uint32_t  frequency 
)
inline

Construct a new Sensor_LSM6DSO32 object.

Parameters
idThe ID of the Subsystem
chip_selectThe chip select pin for the LSM6DSO32
spiThe SPI object to use
frequencyThe frequency to use for the SPI connection

Member Function Documentation

◆ loop()

int8_t Sensor_LSM6DSO32::loop ( )
overridevirtual

Implements Subsystem.

◆ setup()

int8_t Sensor_LSM6DSO32::setup ( )
overridevirtual

Implements Subsystem.


The documentation for this class was generated from the following files: