Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignalReceiver PR #88

Open
wants to merge 153 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
34991e3
Changed project settings to include SignalReceiver
Nov 21, 2023
4cf9b2e
Copied over RemoteControl files.
Nov 21, 2023
684716c
Added SMP and MQTT TL Color ID channels to list.
Nov 21, 2023
f043367
SMP TL Colors CH is now called in constructor.
Nov 21, 2023
cbe6bb4
Implemented the Handshake ID system.
Nov 21, 2023
10effac
Remove unused methods and constants.
Nov 24, 2023
057e798
Publishing robot coordinates periodically.
Nov 27, 2023
9bc67f9
Merge branch 'main' into SignalReceiver
gabryelreyes Nov 28, 2023
e284151
Moved dependencies to platformio.ini
gabryelreyes Nov 28, 2023
a785703
PAssed App instance to SMP server
gabryelreyes Nov 28, 2023
429598a
Added Doxygen for SignalReceiver
gabryelreyes Nov 28, 2023
169c492
Added SignalReceiver to CI
gabryelreyes Nov 28, 2023
192f488
Fixed doxygen findings.
Nov 28, 2023
eeed4d2
Removed unused return type of createPackage.
Nov 28, 2023
f69ad02
Fixed more doxygen findings.
Nov 28, 2023
41f8ffb
Fixed setup issues, robot now reacts to color IDs.
Nov 29, 2023
401cc2f
Moved package creation in the intern callback.
Nov 30, 2023
4ba9a5d
Merge branch 'main' into SignalReceiver
Dec 4, 2023
9adeb08
Signaling GreenLED on succesful initialization.
Dec 4, 2023
a1c738c
Running tests on Target, commenting Odometry funct
Dec 5, 2023
b45437c
Merge branch 'main' into SignalReceiver
Dec 5, 2023
aa439af
Commented out unused timer used for Odom.
Dec 5, 2023
46cb7cc
Uncommented Odometry for testing.
Dec 7, 2023
9439a79
Uncommented Odometry for testing.
Dec 7, 2023
5f1ec47
Removed unused Line sensor define.
Dec 7, 2023
adfd08c
DCS now handles trigger area recognition.
Dec 19, 2023
846bd12
DCS now processes orientation as well.
Dec 21, 2023
4d3a248
Moved IE attributes to Participants.h
Dec 21, 2023
320be7b
Implemented basic Queuer.
Dec 21, 2023
53ee475
Fixed doxygen findings.
Dec 21, 2023
7a07e4f
Fixed more doxygen findings.
Dec 21, 2023
a71e9b0
Fixed more doxygen findings.
Dec 21, 2023
dfc5a44
Merge branch 'SignalReceiver' of https://github.com/BlueAndi/DroidCon…
Dec 21, 2023
e272fa9
Fixed more doxygen findings.
Dec 21, 2023
a8e6284
Fixed more Doxygen findings.
Dec 21, 2023
7b203fc
Using abs val instead of trigger area.
Jan 4, 2024
c463652
Merge branch 'main' into SignalReceiver
Jan 4, 2024
d6fc99c
Fixed doxygen findings.
Jan 4, 2024
5737031
Using abs val instead of trigger area.
Jan 4, 2024
5a16582
Merge branch 'SignalReceiver' of https://github.com/BlueAndi/DroidCon…
Jan 4, 2024
0127943
Using abs val instead of trigger area.
Jan 4, 2024
666ae95
Merged with main.
Jan 4, 2024
f1fb42b
Merge branch 'SignalReceiver' of https://github.com/BlueAndi/DroidCon…
Jan 4, 2024
5c6205b
Fix
Jan 4, 2024
1cc4b81
Removed interval value processing.
Jan 5, 2024
36fb510
Moved isMovingTowards logging in Queuer.process()
Jan 5, 2024
f44728c
Removed interval value attributes and processing methods.
Jan 5, 2024
d8a3462
Queuer::process() has boolean return type.
Jan 5, 2024
9d4970e
Removed unused lines in App.
Jan 5, 2024
a56711b
Fixing pull issues.
Jan 16, 2024
64134c5
Changed names and replaced queue with list of arrays.
Jan 16, 2024
a8f282d
Fixed doxygen findings (1)
Jan 16, 2024
5a478a5
Fixed doxygen findings (2)
Jan 16, 2024
0ef0c5d
Fixed doxygen findings (3)
Jan 16, 2024
5157691
Fixed clang-tidy findings.
Jan 16, 2024
f6c451b
Fixed clang-tidy findings.
Jan 16, 2024
b56a880
SignalReceiver class diagram.
Jan 17, 2024
0cf8bdd
SignalReceiver sequence diagram.
Jan 17, 2024
130172f
RU+DCS+IE sequence diagram.
Jan 17, 2024
7763ec9
Global variables in App are now private.
Jan 17, 2024
6b6536f
Global array of IEs is now private.
Jan 17, 2024
c772a3c
Renamed a few methods to better suit their purpose.
Jan 17, 2024
d0f7398
Fixed check (Test) finding.
Jan 17, 2024
2681183
Improvements to traffic handling.
Jan 26, 2024
99fb016
Removed extra HAL logs.
Jan 29, 2024
5e6ea6b
Merge branch 'main' into SignalReceiver
Jan 29, 2024
ca05341
Decreased robot-IE distance threshhold for listening.
Jan 31, 2024
3695f90
Removed unused logs.
Jan 31, 2024
de47dab
Changed the config files for target uploads.
Jan 31, 2024
90ab117
Merge branch 'main' into SignalReceiver
Jan 31, 2024
41ef8b2
Fixed doxygen finding.
Jan 31, 2024
19f94a1
Removed unnecessary setting change.
Feb 1, 2024
4c9dfc9
Removed unnecesary workspace settings.
Feb 1, 2024
0564403
Copied over the config from main branch.
Feb 1, 2024
968851d
Copied configurations from main.
Feb 1, 2024
79a4b0f
Resolved copyright notices.
Feb 1, 2024
517b59e
Re-resolved config file.
Feb 1, 2024
b206f6e
Re-resolved config file.
Feb 1, 2024
b5d3b43
Added missing line ending in config file.
Feb 1, 2024
1ed9596
Undid auto-formatted library file in RemoteControl.
Feb 1, 2024
6803aa2
Undid auto-formatted space in IBoard.
Feb 1, 2024
979e4aa
I am the author of SignalReceiver.
Feb 1, 2024
6649ac2
Resolved auto-format in platform.ini file.
Feb 1, 2024
03a7864
SignalReceiver is ignored in all other apps.
Feb 1, 2024
7cfd23e
Added SMP callbacks to be used with RU ConvoyLeader.
Feb 2, 2024
b113fb9
Initializing the new SMP server and channels.
Feb 2, 2024
c38d8a0
Setting up periodic processing.
Feb 2, 2024
6547f40
Copied over States from ConvoyLeader.
Feb 2, 2024
f48f9b4
Updated App.h to fit with the changes made above. (System init is wor…
Feb 2, 2024
9b2712f
Limiting speed to 1000. It's a magic nr. for now :)
Feb 2, 2024
25a5771
Improvement to isMovingTowards() function.
Feb 2, 2024
5a03085
App now processes robot coordinates and IE positions.
Feb 2, 2024
95691c0
Processing traffic only when robot is driving.
Feb 2, 2024
6cb58db
Removed unused TxSMP method.
Feb 6, 2024
aa780b7
Processing traffic is a periodic task now.
Feb 6, 2024
de31d61
Limiting the motor speed to 1000 steps.
Feb 6, 2024
e9add19
Added methods to process the received color.
Feb 6, 2024
36dfe47
Fixed finding.
Feb 6, 2024
180c752
Moved traffic processing into a private function.
Feb 6, 2024
8ab2f3c
Fixed documentation path.
Feb 6, 2024
9834b50
Wrong comment fixed.
Feb 7, 2024
8de31f0
Removed out/doc exports and folder.
Feb 7, 2024
6121f04
Fixed magic number, renamed variable.
Feb 7, 2024
254f9d9
Fixed TrafficElement constructor string initialization.
Feb 7, 2024
a6ed74a
STATUS_IDLE is 0U.
Feb 7, 2024
7bab54a
Resolved constructor issues.
Feb 7, 2024
10aab44
Resolved doxygen note.
Feb 7, 2024
fc96888
Fixed CoordinateHandler description.
Feb 7, 2024
0652411
Removed commented code.
Feb 7, 2024
691de0c
Improved distance calculation.
Feb 7, 2024
7517a29
Resolved doxygen-styled comments inside code.
Feb 7, 2024
4fd3545
Removed empty lines inbetween includes.
Feb 7, 2024
6bacf91
Added variables to App constructor.
Feb 7, 2024
d483f55
Removed non-standard Doxygen documentation.
Feb 7, 2024
2885b0c
Fixed class and constructor descriptions.
Feb 7, 2024
5397d87
Fixed doxygen finding.
Feb 7, 2024
76e4233
Deleted .vscode/settings.json
paulgrammy Feb 7, 2024
02d2325
Removed empty line in config file.
Feb 7, 2024
6c7a158
Merge branch 'SignalReceiver' of https://github.com/BlueAndi/DroidCon…
Feb 7, 2024
44f9c34
Fixed convoy follower copyright diff.
Feb 7, 2024
6356ecf
Fixed external file LateralController (1).
Feb 7, 2024
4a59a7e
Renormalized Line Endings
Feb 7, 2024
d499855
Revert "Renormalized Line Endings"
Feb 7, 2024
2b4e5e0
Fixed line endings in SignalReceiver
gabryelreyes Feb 7, 2024
1389de4
Merge branch 'main' into SignalReceiver
gabryelreyes Feb 7, 2024
683f99b
Merge branch 'LineEndings' into SignalReceiver
gabryelreyes Feb 7, 2024
39796be
Removed wrong/old config file
gabryelreyes Feb 7, 2024
28b29bf
Removed debug message
gabryelreyes Feb 7, 2024
c28eea7
Added missing line
gabryelreyes Feb 7, 2024
ede2809
Fixed doxygen-like comment inside of code.
Feb 7, 2024
43f846b
Added U to 0s in SMP enums.
Feb 7, 2024
6b38696
Fixed more descriptions.
Feb 7, 2024
76940b4
Removed double init.
Feb 7, 2024
c229f48
Fixed getInstance function description.
Feb 7, 2024
20f477a
Traffic handler construcor and deconstructor are private.
Feb 7, 2024
c14c6a5
Fixed constructor initialization.
Feb 7, 2024
17b5eef
Fixed include signs.
Feb 7, 2024
3623ff0
Updated function description.
Feb 7, 2024
f2ddc68
Removed unused boolean variable.
Feb 8, 2024
7598a47
Removed unused String.
Feb 8, 2024
a5bb495
Removed unused const char.
Feb 8, 2024
5783da1
Removed unused smp channel.
Feb 8, 2024
608364d
Updated class diagram to fit new architecture.
Feb 8, 2024
e50c9a8
Fixing odometry smp callback.
Feb 12, 2024
f87f8f5
Deleted unused SMP channel.
Feb 12, 2024
739d386
Removed doxygen flag.
Feb 12, 2024
1353f1c
Merge branch 'main' into SignalReceiver
Feb 12, 2024
5d32476
Updated the smp channel to be compatible with ConvoyLeader.
Feb 15, 2024
b5ff250
Robot shall barely move between RedtoGreen.
Feb 16, 2024
f036e41
Removed repeated line.
Mar 1, 2024
974fab7
Removed illogical if statement.
Mar 1, 2024
86c0fe6
Removed magic number.
Mar 1, 2024
e2d239a
Removed magic number.
Mar 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/SignalReceiver/src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void App::setup()
m_motorSpeedTimer.start(SEND_MOTOR_SPEED_TIMER_INTERVAL);
m_statusTimer.start(SEND_STATUS_TIMER_INTERVAL);

/**
/*
* Asyncronous time amount to avoid a syncronization (a time amount equal to a multiple
* of 5) between the RU odometry callback and traffic processing.
*
Expand Down
8 changes: 4 additions & 4 deletions lib/SignalReceiver/src/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
DESCRIPTION
*******************************************************************************/
/**
* @brief RemoteControl application
* @author Gabryel Reyes <gabryelrdiaz@gmail.com>
* @brief SignalReceiver application
* @author Paul Gramescu <paul.gramescu@gmail.com>
*
* @addtogroup Application
*
Expand Down Expand Up @@ -206,10 +206,10 @@ class App
SimpleTimer m_statusTimeoutTimer;

/** Sending color Id only when near IE. */
bool m_isListening = false;
bool m_isListening;

/** Used for unique subscription. */
bool m_isSubscribed = false;
bool m_isSubscribed;

/** Save current deserialized value of COLOR ID. */
Color clr;
Expand Down
6 changes: 5 additions & 1 deletion lib/SignalReceiver/src/CoordinateHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@
class CoordinateHandler
{
public:
/** The CoordinateHandler instance. */
/**
* Get the coordinate handler instance.
*
* @return the instance of coordinate handler.
*/
static CoordinateHandler& getInstance()
paulgrammy marked this conversation as resolved.
Show resolved Hide resolved
{
static CoordinateHandler instance;
Expand Down
8 changes: 4 additions & 4 deletions lib/SignalReceiver/src/SerialMuxChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace SMPChannelPayload
/** Remote control commands. */
typedef enum : uint8_t
{
CMD_ID_IDLE = 0, /**< Nothing to do. */
CMD_ID_IDLE = 0U, /**< Nothing to do. */
CMD_ID_START_LINE_SENSOR_CALIB, /**< Start line sensor calibration. */
CMD_ID_START_MOTOR_SPEED_CALIB, /**< Start motor speed calibration. */
CMD_ID_REINIT_BOARD, /**< Re-initialize the board. Required for webots simulation. */
Expand All @@ -112,7 +112,7 @@ namespace SMPChannelPayload
/** Remote control command responses. */
typedef enum : uint8_t
{
RSP_ID_OK = 0, /**< Command successful executed. */
RSP_ID_OK = 0U, /**< Command successful executed. */
RSP_ID_PENDING, /**< Command is pending. */
RSP_ID_ERROR /**< Command failed. */

Expand All @@ -121,8 +121,8 @@ namespace SMPChannelPayload
/** Status flags. */
typedef enum : uint8_t
{
STATUS_FLAG_OK = 0, /**< Everything is fine. */
STATUS_FLAG_ERROR /**< Something is wrong. */
STATUS_FLAG_OK = 0U, /**< Everything is fine. */
STATUS_FLAG_ERROR /**< Something is wrong. */

} Status; /**< Status flag */

Expand Down
22 changes: 11 additions & 11 deletions lib/SignalReceiver/src/TrafficHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
DESCRIPTION
*******************************************************************************/
/**
* @brief The green light phase realization.
* @brief The traffic handler realization.
* @author Paul Gramescu <[email protected]>
*
* @addtogroup Application
Expand Down Expand Up @@ -158,16 +158,6 @@ class TrafficHandler
lockedOnto = "";
}

/** Traffic handler constructor. */
TrafficHandler() : m_colorID(0U)
{
}

/** Traffic handler deconstructor. */
~TrafficHandler()
{
}

private:
/** Max number of elements in the list. */
static const uint8_t MAX_ELEMENTS = 10;
Expand All @@ -184,6 +174,16 @@ class TrafficHandler
/** List of infrastructure elements. */
TrafficElement listOfElements[MAX_ELEMENTS];

/** Traffic handler constructor. */
TrafficHandler() : m_colorID(0U)
paulgrammy marked this conversation as resolved.
Show resolved Hide resolved
{
}

/** Traffic handler deconstructor. */
~TrafficHandler()
{
}

TrafficHandler(const TrafficHandler& state); /**< Copy construction of an instance. */
TrafficHandler& operator=(const TrafficHandler& state); /**< Assignment of an instance. */
};
Expand Down
Loading