This commit is contained in:
@@ -39,13 +39,16 @@ Firmware OTA::getLatestVersionOnServer() {
|
||||
|
||||
std::vector<Configuration> configs;
|
||||
for (JsonObject config : doc["Configurations"].as<JsonArray>()) {
|
||||
if (config.containsKey("Version") && config.containsKey("URL")) {
|
||||
configs.push_back(Configuration{
|
||||
parseVersion(config["Version"]),
|
||||
config["URL"],
|
||||
config["Board"],
|
||||
config["Configuration"]
|
||||
});
|
||||
if (config.containsKey("Version") && config.containsKey("URL") && config.containsKey("Configuration")) {
|
||||
String deviceConfig = config["Configuration"].as<String>();
|
||||
if (deviceConfig == _current_device_configuration) {
|
||||
configs.push_back(Configuration{
|
||||
parseVersion(config["Version"]),
|
||||
config["URL"],
|
||||
config["Board"],
|
||||
deviceConfig
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
#define water_level_min_key "water_level_min"
|
||||
#define water_level_max_key "water_level_max"
|
||||
#define water_volume_key "water_volume"
|
||||
#define current_software_version Version{0, 0, 5}
|
||||
#define current_software_version Version{0, 0, 6}
|
||||
|
||||
#define RESISTOR_VALUE 4
|
||||
Reference in New Issue
Block a user