Skip to content

Commit

Permalink
Removed IBoard, Removed Dummy Components
Browse files Browse the repository at this point in the history
  • Loading branch information
jkerpe committed Nov 17, 2023
1 parent 17f4080 commit ee034bf
Show file tree
Hide file tree
Showing 40 changed files with 205 additions and 2,467 deletions.
24 changes: 24 additions & 0 deletions doc/doxygen/doxygen_warnings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/App.h:127: error: Member App(const App &app) (function) of class App is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/App.h:128: error: Member operator=(const App &app) (function) of class App is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/DrivingState.h:159: error: Member DrivingState(const DrivingState &state) (function) of class DrivingState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/DrivingState.h:160: error: Member operator=(const DrivingState &state) (function) of class DrivingState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/DrivingState.h:163: error: argument 'lineSensorValue' of command @param is not found in the argument list of DrivingState::processOnTrack(int16_t position, const uint16_t *lineSensorValues)
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/DrivingState.h:163: error: The following parameter of DrivingState::processOnTrack(int16_t position, const uint16_t *lineSensorValues) is not documented:
parameter 'lineSensorValues'
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/DrivingState.h:171: error: argument 'lineSensorValue' of command @param is not found in the argument list of DrivingState::processTrackLost(int16_t position, const uint16_t *lineSensorValues)
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/DrivingState.h:171: error: The following parameter of DrivingState::processTrackLost(int16_t position, const uint16_t *lineSensorValues) is not documented:
parameter 'lineSensorValues'
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ErrorState.h:125: error: Member ErrorState(const ErrorState &state) (function) of class ErrorState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ErrorState.h:126: error: Member operator=(const ErrorState &state) (function) of class ErrorState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/LineSensorsCalibrationState.h:134: error: Member LineSensorsCalibrationState(const LineSensorsCalibrationState &state) (function) of class LineSensorsCalibrationState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/LineSensorsCalibrationState.h:135: error: Member operator=(const LineSensorsCalibrationState &state) (function) of class LineSensorsCalibrationState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/MotorSpeedCalibrationState.h:140: error: Member MotorSpeedCalibrationState(const MotorSpeedCalibrationState &state) (function) of class MotorSpeedCalibrationState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/MotorSpeedCalibrationState.h:141: error: Member operator=(const MotorSpeedCalibrationState &state) (function) of class MotorSpeedCalibrationState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ParameterSets.h:135: error: Member ParameterSets(const ParameterSets &set) (function) of class ParameterSets is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ParameterSets.h:136: error: Member operator=(const ParameterSets &set) (function) of class ParameterSets is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ReadyState.h:119: error: Member ReadyState(const ReadyState &state) (function) of class ReadyState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ReadyState.h:120: error: Member operator=(const ReadyState &state) (function) of class ReadyState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ReleaseTrackState.h:114: error: Member ReleaseTrackState(const ReleaseTrackState &state) (function) of class ReleaseTrackState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/ReleaseTrackState.h:115: error: Member operator=(const ReleaseTrackState &state) (function) of class ReleaseTrackState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/StartupState.h:113: error: Member StartupState(const StartupState &state) (function) of class StartupState is not documented.
C:/Users/jkerpe/MasterArbeit/10_Code/Launcher/RadonUlzer/lib/APPSensorFusion/StartupState.h:114: error: Member operator=(const StartupState &state) (function) of class StartupState is not documented.
2 changes: 1 addition & 1 deletion lib/AppSensorFusion/DrivingState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
DESCRIPTION
*******************************************************************************/
/**
* @brief Calibration state
* @brief Driving state
* @author Andreas Merkle <[email protected]>
*/

Expand Down
7 changes: 1 addition & 6 deletions lib/AppSensorFusion/ErrorState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@

void ErrorState::entry()
{
IDisplay& display = Board::getInstance().getDisplay();

display.clear();
display.print("Error");
display.gotoXY(0, 1);
display.print(m_errorMsg);
/* Nothing to do. */
}

void ErrorState::process(StateMachine& sm)
Expand Down
6 changes: 0 additions & 6 deletions lib/AppSensorFusion/LineSensorsCalibrationState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,9 @@

void LineSensorsCalibrationState::entry()
{
IDisplay& display = Board::getInstance().getDisplay();
DifferentialDrive& diffDrive = DifferentialDrive::getInstance();
Odometry& odometry = Odometry::getInstance();

display.clear();
display.print("Calib");
display.gotoXY(0, 1);
display.print("LineS");

/* Prepare calibration drive. */
m_calibrationSpeed = diffDrive.getMaxMotorSpeed() / 3;
m_orientation = odometry.getOrientation();
Expand Down
7 changes: 0 additions & 7 deletions lib/AppSensorFusion/MotorSpeedCalibrationState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ static const char* TAG = "MSCState";

void MotorSpeedCalibrationState::entry()
{
IDisplay& display = Board::getInstance().getDisplay();

display.clear();
display.print("Calib");
display.gotoXY(0, 1);
display.print("MSpeed");

/* Setup relative encoders */
m_relEncoders.clear();

Expand Down
10 changes: 0 additions & 10 deletions lib/AppSensorFusion/ReadyState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,8 @@ static const char* TAG = "RState";

void ReadyState::entry()
{
IDisplay& display = Board::getInstance().getDisplay();
const int32_t SENSOR_VALUE_OUT_PERIOD = 1000; /* ms */

display.clear();
display.print("Rdy.");

if (true == m_isLapTimeAvailable)
{
display.gotoXY(0, 1);
display.print(m_lapTime);
}

/* The line sensor value shall be output on console cyclic. */
m_timer.start(SENSOR_VALUE_OUT_PERIOD);
}
Expand Down
10 changes: 1 addition & 9 deletions lib/AppSensorFusion/ReleaseTrackState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,7 @@ void ReleaseTrackState::exit()

void ReleaseTrackState::showParSet() const
{
IDisplay& display = Board::getInstance().getDisplay();
uint8_t parSetId = ParameterSets::getInstance().getCurrentSetId();
const char* parSetName = ParameterSets::getInstance().getParameterSet().name;

display.clear();
display.print("Set ");
display.print(parSetId);
display.gotoXY(0, 1);
display.print(parSetName);
/* Nothing to do. */
}

/******************************************************************************
Expand Down
18 changes: 0 additions & 18 deletions lib/AppSensorFusion/StartupState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,8 @@

void StartupState::entry()
{
IDisplay& display = Board::getInstance().getDisplay();

/* Initialize HAL */
Board::getInstance().init();

/* Surprise the audience. */
Sound::playStartup();

/* Show team id / team name */
display.clear();
display.print(TEAM_NAME_LINE_1);
display.gotoXY(0, 1);
display.print(TEAM_NAME_LINE_2);
delay(TEAM_NAME_DURATION);

/* Show operator info on LCD */
display.clear();
display.print("Press A");
display.gotoXY(0, 1);
display.print("to calib");
}

void StartupState::process(StateMachine& sm)
Expand Down
11 changes: 1 addition & 10 deletions lib/HALConvoyLeaderSim/Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ const char* Board::PROXIMITY_SENSOR_FRONT_LEFT_NAME = "proxim_sensor_fl";
/* Name of the front right proximity sensor in the robot simulation. */
const char* Board::PROXIMITY_SENSOR_FRONT_RIGHT_NAME = "proxim_sensor_fr";

/* Name of the accelerometer in the robot simulation. */
const char* Board::ACCELEROMETER_NAME = "accelerometer";

/* Name of the gyro in the robot simulation. */
const char* Board::GYRO_NAME = "gyro";

/* Name of the magnetometer in the robot simulation. */
const char* Board::MAGNETOMETER_NAME = "magnetometer";

/******************************************************************************
* Protected Methods
*****************************************************************************/
Expand All @@ -149,4 +140,4 @@ void Board::init()

/******************************************************************************
* Local Functions
*****************************************************************************/
*****************************************************************************/
63 changes: 18 additions & 45 deletions lib/HALConvoyLeaderSim/Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
* Includes
*****************************************************************************/
#include <stdint.h>
#include <IBoard.h>
#include <ButtonA.h>
#include <ButtonB.h>
#include <ButtonC.h>
Expand All @@ -56,7 +55,6 @@
#include <LedYellow.h>
#include <LedGreen.h>
#include <ProximitySensors.h>
#include <IMU.h>

#include <math.h>
#include <webots/Robot.hpp>
Expand All @@ -74,7 +72,7 @@
/**
* The concrete simulation robot board.
*/
class Board : public IBoard
class Board
{
public:
/**
Expand All @@ -92,14 +90,14 @@ class Board : public IBoard
/**
* Initialize the hardware.
*/
void init() final;
void init();

/**
* Get button A driver.
*
* @return Button A driver.
*/
IButton& getButtonA() final
IButton& getButtonA()
{
return m_buttonA;
}
Expand All @@ -109,7 +107,7 @@ class Board : public IBoard
*
* @return Button B driver.
*/
IButton& getButtonB() final
IButton& getButtonB()
{
return m_buttonB;
}
Expand All @@ -119,7 +117,7 @@ class Board : public IBoard
*
* @return Button C driver.
*/
IButton& getButtonC() final
IButton& getButtonC()
{
return m_buttonC;
}
Expand All @@ -129,7 +127,7 @@ class Board : public IBoard
*
* @return Buzzer driver.
*/
IBuzzer& getBuzzer() final
IBuzzer& getBuzzer()
{
return m_buzzer;
}
Expand All @@ -139,7 +137,7 @@ class Board : public IBoard
*
* @return LCD driver.
*/
IDisplay& getDisplay() final
IDisplay& getDisplay()
{
return m_display;
}
Expand All @@ -149,7 +147,7 @@ class Board : public IBoard
*
* @return Encoders driver.
*/
IEncoders& getEncoders() final
IEncoders& getEncoders()
{
return m_encoders;
}
Expand All @@ -159,7 +157,7 @@ class Board : public IBoard
*
* @return Line sensor driver.
*/
ILineSensors& getLineSensors() final
ILineSensors& getLineSensors()
{
return m_lineSensors;
}
Expand All @@ -169,7 +167,7 @@ class Board : public IBoard
*
* @return Motor driver.
*/
IMotors& getMotors() final
IMotors& getMotors()
{
return m_motors;
}
Expand All @@ -179,7 +177,7 @@ class Board : public IBoard
*
* @return Red LED driver.
*/
ILed& getRedLed() final
ILed& getRedLed()
{
return m_ledRed;
}
Expand All @@ -189,7 +187,7 @@ class Board : public IBoard
*
* @return Yellow LED driver.
*/
ILed& getYellowLed() final
ILed& getYellowLed()
{
return m_ledYellow;
}
Expand All @@ -199,7 +197,7 @@ class Board : public IBoard
*
* @return Green LED driver.
*/
ILed& getGreenLed() final
ILed& getGreenLed()
{
return m_ledGreen;
}
Expand All @@ -209,21 +207,11 @@ class Board : public IBoard
*
* @return Proximity sensors driver
*/
IProximitySensors& getProximitySensors() final
IProximitySensors& getProximitySensors()
{
return m_proximitySensors;
}

/**
* Get IMU (Inertial Measurement Unit) driver.
*
* @return IMU driver
*/
IIMU& getIMU() final
{
return m_imu;
}

protected:
private:
/** Name of the speaker in the robot simulation. */
Expand Down Expand Up @@ -289,15 +277,6 @@ class Board : public IBoard
/** Name of the front right proximity sensor in the robot simulation. */
static const char* PROXIMITY_SENSOR_FRONT_RIGHT_NAME;

/** Name of the accelerometer in the robot simulation. */
static const char* ACCELEROMETER_NAME;

/** Name of the gyro in the robot simulation. */
static const char* GYRO_NAME;

/** Name of the Magnetometer in the robot simulation. */
static const char* MAGNETOMETER_NAME;

/** Simulated roboter instance. */
webots::Robot m_robot;

Expand Down Expand Up @@ -334,23 +313,19 @@ class Board : public IBoard
/** Red LED driver */
LedRed m_ledRed;

/** Red LED driver */
/** Yellow LED driver */
LedYellow m_ledYellow;

/** Red LED driver */
/** Green LED driver */
LedGreen m_ledGreen;

/** Proximity sensors */
ProximitySensors m_proximitySensors;

/** IMU driver */
IMU m_imu;

/**
* Constructs the concrete board.
*/
Board() :
IBoard(),
m_robot(),
m_simTime(m_robot),
m_keyboard(m_simTime, m_robot.getKeyboard()),
Expand All @@ -371,9 +346,7 @@ class Board : public IBoard
m_ledYellow(m_robot.getLED(LED_YELLOW_NAME)),
m_ledGreen(m_robot.getLED(LED_GREEN_NAME)),
m_proximitySensors(m_simTime, m_robot.getDistanceSensor(PROXIMITY_SENSOR_FRONT_LEFT_NAME),
m_robot.getDistanceSensor(PROXIMITY_SENSOR_FRONT_RIGHT_NAME)),
m_imu(m_simTime, m_robot.getAccelerometer(ACCELEROMETER_NAME), m_robot.getGyro(GYRO_NAME),
m_robot.getCompass(MAGNETOMETER_NAME))
m_robot.getDistanceSensor(PROXIMITY_SENSOR_FRONT_RIGHT_NAME))
{
}

Expand Down Expand Up @@ -422,4 +395,4 @@ class Board : public IBoard
*****************************************************************************/

#endif /* BOARD_H */
/** @} */
/** @} */
7 changes: 1 addition & 6 deletions lib/HALConvoyLeaderTarget/Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,8 @@ void Board::init()
m_lineSensors.init();
m_motors.init();
m_proximitySensors.initFrontSensor();
/* TODO: TD084 React if IMU initialization fails */
(void)m_imu.init();
m_imu.enableDefault();
m_imu.configureForTurnSensing();
m_imu.calibrate();
}

/******************************************************************************
* Local Functions
*****************************************************************************/
*****************************************************************************/
Loading

0 comments on commit ee034bf

Please sign in to comment.