Feeds are matched with a case-sensitive search when adding new feed
data to a Group. This can cause different values to be published
for the same feed in a single call to save() in a way that's not
easy to see from the code.
Avoid the problem by matching feeds case-insensitively when searching
for existing feeds in the Group data list.
Note: I added the new strcmp_nocase function inline in the
AdafruitIO_Group.cpp module since I didn't see any clear place to put
these kinds of utility functions in the library. I'm open to moving
it, renaming, restructuring it or whatever. Perhaps a better option
is to use the String::equalsIgnoreCase(), but constructing String
temporaries for each comparison seemed excessive to me.
Feeds are matched with a case-sensitive search when adding new feed data to a Group. This can cause different values to be published for the same feed in a single call to save() in a way that's not easy to see from the code.
Avoid the problem by matching feeds case-insensitively when searching for existing feeds in the Group data list.
Note: I added the new
strcmp_nocase
function inline in the AdafruitIO_Group.cpp module since I didn't see any clear place to put these kinds of utility functions in the library. I'm open to moving it, renaming, restructuring it or whatever. Perhaps a better option is to use theString::equalsIgnoreCase()
, but constructing String temporaries for each comparison seemed excessive to me.Fixes #123