Skip to content

Commit fad45f8

Browse files
committed
Notify profiles of what channel they occupy
Turns out the router was never notifying the profiles of what channel it was occupying and as a result if you setup two profiles at the same time they would trying and write their configuration over each other. Oops.
1 parent 3c89ef8 commit fad45f8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/MainClasses/ANTPLUS_AntPlusRouter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void AntPlusRouter::setProfile(uint8_t channel, BaseProfile* profile) {
6767
if (channel >= ANTPLUS_MAX_CHANNELS_POSSIBLE)
6868
return;
6969
// TODO close channel to make sure it hasn't been randomly replaced
70+
profile->setChannelNumber(channel);
7071
_profiles[channel] = profile;
7172
profile->setRouter(this);
7273
}

0 commit comments

Comments
 (0)