Boboter
Loading...
Searching...
No Matches
Device::Bumpers Class Reference

#include <bumpers.h>

Public Types

enum class  bumper_id_t : uint8_t { LEFT = 0 , RIGHT = 1 }

Public Member Functions

 Bumpers (Robot &robot)
 ~Bumpers ()
void initialize ()
 Sets up the necessary GPIO pins.
bool is_hit (bumper_id_t bumper_id) const
 Checks if the bumper is hit.

Member Enumeration Documentation

◆ bumper_id_t

enum class Device::Bumpers::bumper_id_t : uint8_t
strong
Enumerator
LEFT 
RIGHT 

Constructor & Destructor Documentation

◆ Bumpers()

Device::Bumpers::Bumpers ( Robot & robot)
explicit

◆ ~Bumpers()

Device::Bumpers::~Bumpers ( )

Member Function Documentation

◆ initialize()

void Device::Bumpers::initialize ( )

Sets up the necessary GPIO pins.

◆ is_hit()

bool Device::Bumpers::is_hit ( bumper_id_t bumper_id) const
nodiscard

Checks if the bumper is hit.

Returns
(bool) The state of the bumper (false -> not hit, true -> hit)

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