Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
Serial_Sim_LIS2MDL.h
Go to the documentation of this file.
1#ifndef SERIAL_SIM_LIS2MDL_H
2#define SERIAL_SIM_LIS2MDL_H
3
4#include "Serial_Sim.h"
5
6#ifndef LIS2MDL_RATE_100_HZ
7#define LIS2MDL_RATE_100_HZ 0x06
8#endif
9
11public:
13
14 bool begin_SPI(int cs) { return true; } // Mock successful initialization SPI
15 bool begin(int addr) { return true; } // Mock successful initialization I2C
16
17 void setDataRate(int rate) { dataRate_ = rate; }
18 void enableInterrupts(bool a) {}
19
20 int getDataRate() { return dataRate_; }
21
22 void getEvent(sensors_event_t *mag) {
24
25 }
26
27private:
28 int dataRate_ = LIS2MDL_RATE_100_HZ;
29
30};
31
32#endif // SERIAL_SIM_LIS2MDL_H
#define LIS2MDL_RATE_100_HZ
bool begin(int addr)
void getEvent(sensors_event_t *mag)
void enableInterrupts(bool a)
void setDataRate(int rate)
void updateMag(sensors_event_t *mag)
Definition Serial_Sim.h:76
static SerialSim & getInstance()
Definition Serial_Sim.h:16