-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74cfdef
commit 03f8a75
Showing
4 changed files
with
68 additions
and
26 deletions.
There are no files selected for viewing
Submodule vehicle_control_system
updated
176 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "shared/periph/gpio.h" | ||
|
||
class Subsystem { | ||
public: | ||
/** | ||
* @brief Construct a new Subsystem object | ||
* | ||
* @param enable_output Digital Output which enables the subsystem. | ||
* enabled). | ||
*/ | ||
Subsystem(shared::periph::DigitalOutput& enable_output) | ||
: enable_output_(enable_output) {} | ||
|
||
inline virtual void Enable() const { | ||
enable_output_.SetHigh(); | ||
} | ||
|
||
inline virtual void Disable() const { | ||
enable_output_.SetLow(); | ||
} | ||
|
||
private: | ||
shared::periph::DigitalOutput& enable_output_; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters