Skip to content

Commit

Permalink
only enable the field if it is a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
caco3 authored Nov 16, 2023
1 parent 8614e4a commit fe85ca8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions code/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,20 +642,17 @@ void migrateConfiguration(void) {
/* Fieldname has a <NUMBER> as prefix! */
if (isInString(configLines[i], "Fieldname")) { // It is the parameter "Fieldname"
migrated = migrated | replaceString(configLines[i], "Fieldname", "Field"); // Rename it to Field
migrated = migrated | replaceString(configLines[i], ";", ""); // Enable it
}
}

if (section == "[InfluxDBv2]") {
/* Fieldname has a <NUMBER> as prefix! */
if (isInString(configLines[i], "Fieldname")) { // It is the parameter "Fieldname"
migrated = migrated | replaceString(configLines[i], "Fieldname", "Field"); // Rename it to Field
migrated = migrated | replaceString(configLines[i], ";", ""); // Enable it
}
/* Database got renamed to Basket! */
if (isInString(configLines[i], "Database")) { // It is the parameter "Database"
migrated = migrated | replaceString(configLines[i], "Database", "Basket"); // Rename it to Basket
migrated = migrated | replaceString(configLines[i], ";", ""); // Enable it
}
}

Expand Down Expand Up @@ -819,4 +816,4 @@ bool setCpuFrequency(void) {
}

return true;
}
}

0 comments on commit fe85ca8

Please sign in to comment.