File tree 6 files changed +27
-8
lines changed
6 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,8 @@ void setup(void) {
140
140
Serial.println (" NW onConfig Received" );
141
141
142
142
// 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 ());
145
145
return true ; // <-- return true to approve request, false to reject
146
146
});
147
147
Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ void setup(void) {
130
130
Serial.println (" NW onConfig Received" );
131
131
132
132
// 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 ());
135
135
return true ; // <-- return true to approve request, false to reject
136
136
});
137
137
Original file line number Diff line number Diff line change 35
35
"platforms" : [" espressif8266" , " raspberrypi" ]
36
36
}
37
37
],
38
- "version" : " 1.0.5 " ,
38
+ "version" : " 1.0.6 " ,
39
39
"frameworks" : " arduino" ,
40
40
"platforms" : [" espressif32" , " raspberrypi" ]
41
41
}
Original file line number Diff line number Diff line change 1
1
name =NetWizard
2
- version =1.0.5
2
+ version =1.0.6
3
3
author =Ayush Sharma
4
4
category =Communication
5
5
maintainer =Ayush Sharma <
[email protected] >
Original file line number Diff line number Diff line change @@ -20,10 +20,22 @@ const int NetWizardParameter::getType() {
20
20
return _type;
21
21
}
22
22
23
- String NetWizardParameter::getValue () {
23
+ const String& NetWizardParameter::getValue () {
24
24
return _value;
25
25
}
26
26
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
+
27
39
void NetWizardParameter::setValue (const char * value) {
28
40
_value = value;
29
41
}
Original file line number Diff line number Diff line change @@ -26,7 +26,14 @@ class NetWizardParameter {
26
26
27
27
const int getType ();
28
28
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);
30
37
void setValue (const char * value);
31
38
32
39
String getPlaceholder ();
You can’t perform that action at this time.
0 commit comments