17#include "../../../runtime/Runtime.hpp"
18#include "../HeadingSensor.hpp"
77 const unsigned long kSamplingInterval;
79 unsigned long mPreviousSample{ 0 };
80 bool mAttached{
false };
81 float mAngularDisplacement{ 0 };
84 int getAngularVelocity();
85 int readL3G4200DRegister(uint8_t registerAddress);
86 void writeL3G4200DRegister(uint8_t registerAddress, uint8_t value);
The class representing a GY-50 gyroscope module based on the L3G4200D sensor.
int getOffset(int measurements=smartcarlib::constants::gy50::kDefaultCalibrationMeasurements)
Get the sensor's offset which is the value the sensor returns when still.
int getHeading() override
Returns the current heading of the vehicle.
void update() override
Updates the sensor's readings.
A heading sensor is an interface that can represent all sensors which can provide the vehicle's headi...
An interface to serve as a wrapper for the native runtime environment, greatly inspired by the Arduin...
const uint8_t kDefaultSamplingInterval
const int kDefaultCalibrationMeasurements