jasoncoon / esp32-fastled-webserver

Work in progress ESP32 port of https://github.com/jasoncoon/esp8266-fastled-webserver
GNU General Public License v3.0
197 stars 66 forks source link

Update to build cleanly #21

Closed henrygab closed 4 years ago

henrygab commented 4 years ago

Fixes #20 Fixes #10

Use webserver.h instead of ESP8266WebServer.h

Makes this build without dependencies.

Fix Missing field initializers warnings.

In fields.h, while FieldList is an array, the array elements are each a POD struct of type Field, which has no non-default constructor. Therefore, according to the specification:

The effects of default initialization are: … otherwise, nothing is done: the objects with automatic storage duration (and their subobjects) are initialized to indeterminate values.

Fix Comparisons always false due to limited range of data type warning

Simply put, the long result from string.toInt() was placed into an uint8_t, prior to clamping the value. This change stores the conversion result in a long to perform the clamping prior to storing the value in the uint8_t field.

Fix warning: extra tokens at end of #include directive

Remove semi-colons from #include lines

Fix error: multi-line comment [-Werror=comment]

Ensure the last character of a comment line is not a backslash character.

Fix warning: 'typedef' was ignored in this declaration

Move the name Field to follow the struct definition.

henrygab commented 4 years ago

@jasoncoon Fixed. Thanks for review and catching that!