Skip to content

Commit

Permalink
Merge pull request #131 from BlueAndi/release/v2.0.x
Browse files Browse the repository at this point in the history
Release/v2.0.x
  • Loading branch information
gabryelreyes authored Jul 2, 2024
2 parents 9b59443 + 0d60c2d commit 42b5245
Show file tree
Hide file tree
Showing 9 changed files with 5,746 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
needs: intro
strategy:
matrix:
environment: ["CalibTarget", "ConvoyFollowerTarget", "ConvoyLeaderTarget", "LineFollowerTarget", "RemoteControlTarget", "SensorFusionTarget"]
environment: ["CalibTarget", "ConvoyFollowerTarget", "ConvoyLeaderTarget", "LineFollowerTarget", "LineFollowerSimpleTarget", "RemoteControlTarget", "SensorFusionTarget"]

# Steps represent a sequence of tasks that will be executed as part of the job.
steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
needs: intro
strategy:
matrix:
environment: ["CalibTarget", "ConvoyFollowerTarget", "ConvoyLeaderTarget", "LineFollowerTarget", "RemoteControlTarget", "SensorFusionTarget", "TestSim"]
environment: ["CalibTarget", "ConvoyFollowerTarget", "ConvoyLeaderTarget", "LineFollowerTarget", "LineFollowerSimpleTarget", "RemoteControlTarget", "SensorFusionTarget", "TestSim"]

steps:
- name: Checkout repository
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
needs: intro
strategy:
matrix:
environment: ["CalibTarget", "ConvoyFollowerTarget", "ConvoyLeaderTarget", "LineFollowerTarget", "RemoteControlTarget", "SensorFusionTarget", "CalibSim", "ConvoyFollowerSim", "ConvoyLeaderSim", "LineFollowerSim", "RemoteControlSim", "SensorFusionSim"]
environment: ["CalibTarget", "ConvoyFollowerTarget", "ConvoyLeaderTarget", "LineFollowerTarget", "LineFollowerSimpleTarget", "RemoteControlTarget", "SensorFusionTarget", "CalibSim", "ConvoyFollowerSim", "ConvoyLeaderSim", "LineFollowerSim", "LineFollowerSimpleSim", "RemoteControlSim", "SensorFusionSim"]

steps:
- name: Checkout repository
Expand Down
2,862 changes: 2,862 additions & 0 deletions doc/doxygen/LineFollowerSimpleSimDoxyfile

Large diffs are not rendered by default.

2,862 changes: 2,862 additions & 0 deletions doc/doxygen/LineFollowerSimpleTargetDoxyfile

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions lib/APPLineFollowerSimple/src/DrivingState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const int16_t DrivingState::POSITION_SET_POINT =
(SENSOR_VALUE_MAX * (Board::getInstance().getLineSensors().getNumLineSensors() - 1)) / 2;

/* Initialize the required sensor IDs to be generic. */
const uint8_t DrivingState::SENSOR_ID_MOST_LEFT = 0U;
const uint8_t DrivingState::SENSOR_ID_MIDDLE = (Board::getInstance().getLineSensors().getNumLineSensors() - 1U) / 2U;
const uint8_t DrivingState::SENSOR_ID_MOST_LEFT = 0U;
const uint8_t DrivingState::SENSOR_ID_MIDDLE = (Board::getInstance().getLineSensors().getNumLineSensors() - 1U) / 2U;
const uint8_t DrivingState::SENSOR_ID_MOST_RIGHT = Board::getInstance().getLineSensors().getNumLineSensors() - 1U;

/* Initialize the position values used by the algorithmic. */
Expand Down Expand Up @@ -124,6 +124,14 @@ void DrivingState::process(StateMachine& sm)
bool isPosition3Valid = calcPosition3(position3, lineSensorValues, numLineSensors);
bool isTrackLost = isNoLineDetected(lineSensorValues, numLineSensors);

/* If the position calculated with the inner sensors is not valid, the
* position will be taken.
*/
if (true == isPosition3Valid)
{
position3 = position;
}

/* ========================================================================
* Evaluate the situation based on the sensor values.
* ========================================================================
Expand Down Expand Up @@ -411,7 +419,8 @@ bool DrivingState::isNoLineDetected(const uint16_t* lineSensorValues, uint8_t le
return isDetected;
}

void DrivingState::processSituation(int16_t& position, bool& allowNegativeMotorSpeed, TrackStatus trackStatus, int16_t position3)
void DrivingState::processSituation(int16_t& position, bool& allowNegativeMotorSpeed, TrackStatus trackStatus,
int16_t position3)
{
switch (trackStatus)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ void LineSensorsCalibrationState::exit()
bool LineSensorsCalibrationState::turnAndCalibrate(int32_t calibAlpha, bool isGreaterEqual)
{
IBoard& board = Board::getInstance();
IMotors& motors = board.getMotors();
ILineSensors& lineSensors = board.getLineSensors();
bool isSuccesful = false;

Expand Down
10 changes: 1 addition & 9 deletions lib/HALTest/src/ButtonA.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* @brief Button A realization
* @author Andreas Merkle <[email protected]>
*
*
* @addtogroup HALTarget
*
* @{
Expand Down Expand Up @@ -81,15 +81,7 @@ class ButtonA : public IButton
return false;
}

/**
* Wait until button is released.
*/
void waitForRelease() final
{
}

private:

};

/******************************************************************************
Expand Down
10 changes: 1 addition & 9 deletions lib/HALTest/src/ButtonB.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* @brief Button B realization
* @author Andreas Merkle <[email protected]>
*
*
* @addtogroup HALTarget
*
* @{
Expand Down Expand Up @@ -81,15 +81,7 @@ class ButtonB : public IButton
return false;
}

/**
* Wait until button is released.
*/
void waitForRelease() final
{
}

private:

};

/******************************************************************************
Expand Down
10 changes: 1 addition & 9 deletions lib/HALTest/src/ButtonC.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* @brief Button C realization
* @author Andreas Merkle <[email protected]>
*
*
* @addtogroup HALTarget
*
* @{
Expand Down Expand Up @@ -81,15 +81,7 @@ class ButtonC : public IButton
return false;
}

/**
* Wait until button is released.
*/
void waitForRelease() final
{
}

private:

};

/******************************************************************************
Expand Down
10 changes: 4 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ build_flags =
-Wno-switch
-Werror
lib_deps =
BlueAndi/ZumoHALATmega32u4 @ ~0.2.0
BlueAndi/ZumoHALATmega32u4 @ ~1.0.0
lib_ignore =
ArduinoNative
HALTest
extra_scripts =

Expand Down Expand Up @@ -100,8 +99,7 @@ build_flags =
-I./lib/Webots/include/cpp
lib_deps =
MainNative
BlueAndi/ArduinoNative @ ~0.1.0
BlueAndi/ZumoHALWebots @ ~0.2.0
BlueAndi/ZumoHALWebots @ ~1.0.0
Webots
lib_ignore =
HALTest
Expand All @@ -127,8 +125,8 @@ build_flags =
-Itest/common
lib_deps =
MainTestNative
BlueAndi/ArduinoNative @ ~0.1.0
BlueAndi/ZumoHALInterfaces @ ~0.2.0
BlueAndi/ArduinoNative @ ~0.1.1
BlueAndi/ZumoHALInterfaces @ ~1.0.0
HALTest
lib_ignore =
Webots
Expand Down

0 comments on commit 42b5245

Please sign in to comment.