Skip to content

Commit

Permalink
Merge pull request #13 from cederlys/use-sizeof
Browse files Browse the repository at this point in the history
More sizeof, less magic numbers
  • Loading branch information
leon-anavi committed May 18, 2019
2 parents 10833eb + e8dc4ce commit 7e28f2f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions anavi-thermometer-sw/anavi-thermometer-sw.ino
Expand Up @@ -330,11 +330,11 @@ void setup()
// The extra parameters to be configured (can be either global or just in the setup)
// After connecting, parameter.getValue() will get you the configured value
// id/name placeholder/prompt default length
WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, 40);
WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port, 6);
WiFiManagerParameter custom_workgroup("workgroup", "workgroup", workgroup, 32);
WiFiManagerParameter custom_mqtt_user("user", "MQTT username", username, 20);
WiFiManagerParameter custom_mqtt_pass("pass", "MQTT password", password, 20);
WiFiManagerParameter custom_mqtt_server("server", "mqtt server", mqtt_server, sizeof(mqtt_server));
WiFiManagerParameter custom_mqtt_port("port", "mqtt port", mqtt_port, sizeof(mqtt_port));
WiFiManagerParameter custom_workgroup("workgroup", "workgroup", workgroup, sizeof(workgroup));
WiFiManagerParameter custom_mqtt_user("user", "MQTT username", username, sizeof(username));
WiFiManagerParameter custom_mqtt_pass("pass", "MQTT password", password, sizeof(password));
#ifdef HOME_ASSISTANT_DISCOVERY
WiFiManagerParameter custom_mqtt_ha_name("ha_name", "Sensor name for Home Assistant", ha_name, sizeof(ha_name));
#endif
Expand Down

0 comments on commit 7e28f2f

Please sign in to comment.