Smartcar Shield
Public Member Functions | List of all members
HeadingSensor Interface Referenceabstract

#include <HeadingSensor.hpp>

Inheritance diagram for HeadingSensor:
Inheritance graph
Collaboration diagram for HeadingSensor:
Collaboration graph

Public Member Functions

virtual ~HeadingSensor ()=default
 
virtual int getHeading ()=0
 Returns the current heading of the vehicle. More...
 
virtual void update ()=0
 Updates the sensor's readings. More...
 

Detailed Description

A heading sensor is an interface that can represent all sensors which can provide the vehicle's heading.

Definition at line 8 of file HeadingSensor.hpp.

Constructor & Destructor Documentation

◆ ~HeadingSensor()

virtual HeadingSensor::~HeadingSensor ( )
virtualdefault

Member Function Documentation

◆ getHeading()

virtual int HeadingSensor::getHeading ( )
pure virtual

Returns the current heading of the vehicle.

Returns
The current heading of the vehicle in the range of [0-360)

Example:

sensor.getHeading();

Implemented in GY50.

Here is the caller graph for this function:

◆ update()

virtual void HeadingSensor::update ( )
pure virtual

Updates the sensor's readings.

This method must be be able to be executed as often as possible.

Example:

void loop() {
sensor.update();
// More code
}

Implemented in GY50.

Here is the caller graph for this function:

The documentation for this interface was generated from the following file: