mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-02 07:58:24 +02:00
fix HMT with 6 channels
This commit is contained in:
parent
2c1a32f9e8
commit
72cdaf326a
1 changed files with 4 additions and 1 deletions
|
@ -643,7 +643,10 @@ class settings {
|
|||
getVal<bool>(obj, F("en"), &cfg->enabled);
|
||||
getChar(obj, F("name"), cfg->name, MAX_NAME_LENGTH);
|
||||
getVal<uint64_t>(obj, F("sn"), &cfg->serial.u64);
|
||||
for(uint8_t i = 0; i < (sizeof(obj[F("yield")])/sizeof(int32_t)); i++) {
|
||||
uint8_t size = 4;
|
||||
if(obj.containsKey(F("pwr")))
|
||||
size = obj[F("pwr")].size();
|
||||
for(uint8_t i = 0; i < size; 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…
Add table
Add a link
Reference in a new issue