getByName was not used anywhere in the code so that change is safe.

Please TEST this as i don't have a working Json setup in mqtt at the moment.
This commit is contained in:
Thomas Göttgens
2023-01-09 11:28:21 +01:00
parent 49172e416e
commit 5cec370cf5
2 changed files with 30 additions and 10 deletions

View File

@@ -199,7 +199,7 @@ Channel &Channels::getByIndex(ChannelIndex chIndex)
Channel &Channels::getByName(const char* chName)
{
for (ChannelIndex i = 0; i < getNumChannels(); i++) {
if (strcasecmp(channelFile.channels[i].settings.name, chName) == 0) {
if (strcasecmp(getGlobalId(i), chName) == 0) {
return channelFile.channels[i];
}
}