Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Commit 5a029ad

Browse files
committed
Add stop function.
1 parent 5cb6800 commit 5a029ad

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

robot-control-src/Drives.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ DriveInterface::DriveInterface() :
8888
DriveInterface::~DriveInterface() {
8989
}
9090

91+
IRAM_ATTR void stopDrives() {
92+
leftDrive.stop();
93+
rightDrive.stop();
94+
}
95+
9196
}
9297

9398

robot-control-src/Drives.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ void rotate(const float deg, const Amplitude amplitude, bool const clockwise);
104104
void driveCounter(const Counter distance, const Amplitude amplitude, const bool backwards);
105105
void drive(const float distance, const Amplitude amplitude, const bool backwards);
106106

107+
void stopDrives();
108+
107109
};
108110

109111
#endif // DRIVES_HPP

0 commit comments

Comments
 (0)