We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c781487 + 8ff68f0 commit 8e2c8cbCopy full SHA for 8e2c8cb
libraries/MySensors/core/MySensorCore.cpp
@@ -241,7 +241,11 @@ void _processInternalMessages() {
241
} else if (type == I_CONFIG) {
242
// Pick up configuration from controller (currently only metric/imperial)
243
// and store it in eeprom if changed
244
- isMetric = _msg.getString()[0] == 'M' ;
+ if (_msg.getString() == NULL) {
245
+ isMetric = true;
246
+ } else {
247
+ isMetric = _msg.getString()[0] == 'M' ;
248
+ }
249
_cc.isMetric = isMetric;
250
hwWriteConfig(EEPROM_CONTROLLER_CONFIG_ADDRESS, isMetric);
251
} else if (type == I_PRESENTATION) {
0 commit comments