Skip to content

Commit

Permalink
Added Missing Components to Test Board
Browse files Browse the repository at this point in the history
  • Loading branch information
jkerpe committed Nov 15, 2023
1 parent faa68ca commit b397371
Showing 1 changed file with 63 additions and 5 deletions.
68 changes: 63 additions & 5 deletions lib/HALTest/Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* @brief The robot board realization for testing purposes.
* @author Andreas Merkle <[email protected]>
*
*
* @addtogroup HALSim
*
* @{
Expand All @@ -45,13 +45,17 @@
#include <stdint.h>
#include <IBoard.h>
#include <ButtonA.h>
#include <ButtonB.h>
#include <ButtonC.h>
#include <Buzzer.h>
#include <Display.h>
#include <Encoders.h>
#include <LineSensors.h>
#include <Motors.h>
#include <LedRed.h>
#include <LedYellow.h>
#include <LedGreen.h>
#include <ProximitySensors.h>
#include <IMU.h>

/******************************************************************************
Expand Down Expand Up @@ -95,6 +99,36 @@ class Board : public IBoard
return m_buttonA;
}

/**
* Get button B driver.
*
* @return Button B driver.
*/
IButton& getButtonB() final
{
return m_buttonB;
}

/**
* Get button C driver.
*
* @return Button C driver.
*/
IButton& getButtonC() final
{
return m_buttonC;
}

/**
* Get buzzer driver.
*
* @return Buzzer driver.
*/
IBuzzer& getBuzzer() final
{
return m_buzzer;
}

/**
* Get LCD driver.
*
Expand Down Expand Up @@ -165,9 +199,19 @@ class Board : public IBoard
return m_ledGreen;
}

/**
* Get proximity sensors driver.
*
* @return Proximity sensors driver
*/
IProximitySensors& getProximitySensors() final
{
return m_proximitySensors;
}

/**
* Get IMU (=Inertial Measurement Unit) driver.
*
*
* @return IMU driver
*/
IIMU& getIMU()
Expand Down Expand Up @@ -196,12 +240,19 @@ class Board : public IBoard
}

protected:

private:

/** Button A driver */
ButtonA m_buttonA;

/** Button B driver */
ButtonB m_buttonB;

/** Button C driver */
ButtonC m_buttonC;

/** Buzzer driver */
Buzzer m_buzzer;

/** Display driver */
Display m_display;

Expand All @@ -223,22 +274,29 @@ class Board : public IBoard
/** Red LED driver */
LedGreen m_ledGreen;

/** Proximity sensors */
ProximitySensors m_proximitySensors;

/** IMU driver */
IMU m_imu;

/**
* Constructs the concrete board.
*/
Board() :
IBoard(),
m_buttonA(),
m_buttonB(),
m_buttonC(),
m_buzzer(),
m_display(),
m_encoders(),
m_lineSensors(),
m_motors(),
m_ledRed(),
m_ledYellow(),
m_ledGreen(),
m_proximitySensors(),
m_imu()
{
}
Expand Down

0 comments on commit b397371

Please sign in to comment.