mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
Master to Develop
This commit is contained in:
@@ -196,6 +196,17 @@ Channel &Channels::getByIndex(ChannelIndex chIndex)
|
||||
return *ch;
|
||||
}
|
||||
|
||||
Channel &Channels::getByName(const char* chName)
|
||||
{
|
||||
for (ChannelIndex i = 0; i < getNumChannels(); i++) {
|
||||
if (strcasecmp(channelFile.channels[i].settings.name, chName) == 0) {
|
||||
return channelFile.channels[i];
|
||||
}
|
||||
}
|
||||
|
||||
return getByIndex(getPrimaryIndex());
|
||||
}
|
||||
|
||||
void Channels::setChannel(const Channel &c)
|
||||
{
|
||||
Channel &old = getByIndex(c.index);
|
||||
|
||||
Reference in New Issue
Block a user