File tree Expand file tree Collapse file tree 6 files changed +27
-8
lines changed Expand file tree Collapse file tree 6 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,8 @@ void setup(void) {
140140 Serial.println (" NW onConfig Received" );
141141
142142 // Print new parameter values
143- Serial.printf (" Host: %s\n " , nw_mqtt_host.getValue ().c_str ());
144- Serial.printf (" Port: %s\n " , nw_mqtt_port.getValue ().c_str ());
143+ Serial.printf (" Host: %s\n " , nw_mqtt_host.getValueStr ().c_str ());
144+ Serial.printf (" Port: %s\n " , nw_mqtt_port.getValueStr ().c_str ());
145145 return true ; // <-- return true to approve request, false to reject
146146 });
147147
Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ void setup(void) {
130130 Serial.println (" NW onConfig Received" );
131131
132132 // Print new parameter values
133- Serial.printf (" Host: %s\n " , nw_mqtt_host.getValue ().c_str ());
134- Serial.printf (" Port: %s\n " , nw_mqtt_port.getValue ().c_str ());
133+ Serial.printf (" Host: %s\n " , nw_mqtt_host.getValueStr ().c_str ());
134+ Serial.printf (" Port: %s\n " , nw_mqtt_port.getValueStr ().c_str ());
135135 return true ; // <-- return true to approve request, false to reject
136136 });
137137
Original file line number Diff line number Diff line change 3535 "platforms" : [" espressif8266" , " raspberrypi" ]
3636 }
3737 ],
38- "version" : " 1.0.5 " ,
38+ "version" : " 1.0.6 " ,
3939 "frameworks" : " arduino" ,
4040 "platforms" : [" espressif32" , " raspberrypi" ]
4141}
Original file line number Diff line number Diff line change 11name =NetWizard
2- version =1.0.5
2+ version =1.0.6
33author =Ayush Sharma
44category =Communication
55maintainer =Ayush Sharma <
[email protected] >
Original file line number Diff line number Diff line change @@ -20,10 +20,22 @@ const int NetWizardParameter::getType() {
2020 return _type;
2121}
2222
23- String NetWizardParameter::getValue () {
23+ const String& NetWizardParameter::getValue () {
2424 return _value;
2525}
2626
27+ const String& NetWizardParameter::getValueStr () {
28+ return _value;
29+ }
30+
31+ void NetWizardParameter::getValue (String& value) {
32+ value = _value;
33+ }
34+
35+ void NetWizardParameter::setValue (const String& value) {
36+ _value = value;
37+ }
38+
2739void NetWizardParameter::setValue (const char * value) {
2840 _value = value;
2941}
Original file line number Diff line number Diff line change @@ -26,7 +26,14 @@ class NetWizardParameter {
2626
2727 const int getType ();
2828
29- String getValue ();
29+ [[deprecated(" getValue has been replaced by getValueStr()" )]]
30+ const String& getValue ();
31+
32+ const String& getValueStr ();
33+
34+ void getValue (String& value);
35+
36+ void setValue (const String& value);
3037 void setValue (const char * value);
3138
3239 String getPlaceholder ();
You can’t perform that action at this time.
0 commit comments