Added tolower() to color_picker()
This commit is contained in:
@@ -306,6 +306,9 @@ uint8_t mqtt_application_init(void) {
|
|||||||
* @return color Define to use with the LCD_API
|
* @return color Define to use with the LCD_API
|
||||||
*/
|
*/
|
||||||
uint32_t color_picker(char* color_in) {
|
uint32_t color_picker(char* color_in) {
|
||||||
|
for (int i = 0; i < strlen(color_in); i++) {
|
||||||
|
color_in[i] = tolower(color_in[i]);
|
||||||
|
}
|
||||||
if (strcmp((const char*)color_in, "blue") == 0) {
|
if (strcmp((const char*)color_in, "blue") == 0) {
|
||||||
return LCD_BLUE;
|
return LCD_BLUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user