-
Notifications
You must be signed in to change notification settings - Fork 7
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
hugo/feature/Add reboot to EmergencyStooped #856
Conversation
HPezz
commented
Jun 8, 2022
- ✨ (sm): Add EmergencyStopped State + Emergency Stop Event
- ⚡ (rc): Add on_entry EmergencyStopped State, RC turnOffActuators
- 🚸 (os): Link RFID event to SM event (Emergency Stop)
- 🚸 (sm): Add transition from EmergencyStopped to Working
- 🚸 (sm): Add transition from EmergencyStopped to Charging
- 🚸 (sm): Add transition from Charging to EmergencyStopped
- 🚸 (sm): Add transition from Idle to EmergencyStopped
- 🚸 (sm): Add transition from Sleeping to EmergencyStopped
- 🔥 (os): Remove Emergency stop logs and stop
- ✅ (tests): Add tests to cover up every transitions
- ⚡ (rc): Move reboot to RC
File comparision analysis report🔖 Info
Click to show memory sections
📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
File comparision analysis report🔖 Info
Click to show memory sections
📝 SummaryClick to show summary
🗺️ Map files diff outputClick to show diff list
|
7308c6c
to
f5fe52b
Compare
Codecov Report
@@ Coverage Diff @@
## develop #856 +/- ##
===========================================
- Coverage 95.39% 95.36% -0.03%
===========================================
Files 115 115
Lines 2560 2568 +8
===========================================
+ Hits 2442 2449 +7
- Misses 118 119 +1
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
f5fe52b
to
650ced5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
il faut juste renommer iteration
par counter
, c'est plus logique dans ce cas là.
@@ -209,6 +209,8 @@ class RobotController : public interface::RobotController | |||
stopActuators(); | |||
} | |||
|
|||
void resetEmergencyStopIteration() final { _emergency_stop_iteration = 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void resetEmergencyStopIteration() final { _emergency_stop_iteration = 0; } | |
void resetEmergencyStopCounter() final { _emergency_stop_counter = 0; } |
@@ -379,6 +388,8 @@ class RobotController : public interface::RobotController | |||
&_service_battery, &_service_commands, &_service_device_information, | |||
&_service_monitoring, &_service_file_reception, &_service_update, | |||
}; | |||
|
|||
uint8_t _emergency_stop_iteration {0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint8_t _emergency_stop_iteration {0}; | |
uint8_t _emergency_stop_counter {0}; |
++_emergency_stop_iteration; | ||
raise(system::robot::sm::event::emergency_stop {}); | ||
if (_emergency_stop_iteration >= 7) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++_emergency_stop_iteration; | |
raise(system::robot::sm::event::emergency_stop {}); | |
if (_emergency_stop_iteration >= 7) { | |
++_emergency_stop_counter; | |
raise(system::robot::sm::event::emergency_stop {}); | |
if (_emergency_stop_counter >= 7) { |
libs/RobotKit/include/StateMachine.h
Outdated
struct reset_emergency_stop_iteration { | ||
auto operator()(irc &rc) const { rc.resetEmergencyStopIteration(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct reset_emergency_stop_iteration { | |
auto operator()(irc &rc) const { rc.resetEmergencyStopIteration(); } | |
struct reset_emergency_stop_counter { | |
auto operator()(irc &rc) const { rc.resetEmergencyStopCounter(); } |
@@ -41,7 +41,8 @@ class RobotController | |||
virtual auto isReadyToUpdate() -> bool = 0; | |||
virtual void applyUpdate() = 0; | |||
|
|||
virtual void turnOffActuators() = 0; | |||
virtual void turnOffActuators() = 0; | |||
virtual void resetEmergencyStopIteration() = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual void resetEmergencyStopIteration() = 0; | |
virtual void resetEmergencyStopCounter() = 0; |
650ced5
to
97a6ab2
Compare
97a6ab2
to
1c70ecb
Compare
Kudos, SonarCloud Quality Gate passed! |