Browse Source

0.6.5

fix max module power read
pull/883/head
lumapu 2 years ago
parent
commit
1e1696ca15
  1. 4
      src/config/settings.h

4
src/config/settings.h

@ -607,8 +607,8 @@ class settings {
getChar(obj, F("name"), cfg->name, MAX_NAME_LENGTH);
getVal<uint64_t>(obj, F("sn"), &cfg->serial.u64);
for(uint8_t i = 0; i < 4; i++) {
getVal<int32_t>(obj, F("yield"), &cfg->yieldCor[i]);
getVal<uint16_t>(obj, F("pwr"), &cfg->chMaxPwr[i]);
if(obj.containsKey(F("yield"))) cfg->yieldCor[i] = obj[F("yield")][i];
if(obj.containsKey(F("pwr"))) cfg->chMaxPwr[i] = obj[F("pwr")][i];
if(obj.containsKey(F("chName"))) snprintf(cfg->chName[i], MAX_NAME_LENGTH, "%s", obj[F("chName")][i].as<const char*>());
}
}

Loading…
Cancel
Save