Skip to content

Commit 15152be

Browse files
committed
Add global remove of profiles
1 parent 91a3bef commit 15152be

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/MainClasses/ANTPLUS_AntPlusRouter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ void AntPlusRouter::removeProfile(uint8_t channel) {
8080
}
8181
}
8282

83+
void AntPlusRoute::removeAllProfiles() {
84+
for (uint8_t i = 0; i < ANTPLUS_MAX_CHANNELS_POSSIBLE; i++) {
85+
removeProfile(i);
86+
}
87+
}
88+
8389
void AntPlusRouter::send(AntRequest& msg) {
8490
if (_ant) {
8591
_ant->send(msg);

src/MainClasses/ANTPLUS_AntPlusRouter.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ class AntPlusRouter {
3535
*/
3636
uint8_t addProfileToNextChannel(BaseProfile* profile);
3737
/**
38-
* Stops a provile at the given channel
38+
* Stops a profile at the given channel
3939
* Unassigns channel
4040
* Removes the profile from index
4141
*/
4242
void removeProfile(uint8_t channel);
43+
/**
44+
* Stops all profiles
45+
* Unassigns all channels
46+
* Removes all profiles from index
47+
*/
48+
void removeAllProfiles();
4349
/**
4450
* Send an ANT message to the associated router.
4551
* Do not use until a router has been associated.

0 commit comments

Comments
 (0)