float fix

This commit is contained in:
HTotoo
2025-09-19 17:31:33 +02:00
parent e84fd70a80
commit bb85e7544e
+2 -2
View File
@@ -24,13 +24,13 @@ class TConfig {
if (err == ESP_OK) {
// Parse frequency string
std::string freq_string(tmpstr);
lora_config.frequency = std::stof(freq_string);
lora_config.frequency = std::stod(freq_string);
}
err = nvs_get_str(handle, "bwstr", tmpstr, &tmpstrlen);
if (err == ESP_OK) {
// Parse bandwidth string
std::string bw_string(tmpstr);
lora_config.bandwidth = std::stof(bw_string);
lora_config.bandwidth = std::stod(bw_string);
}
err = nvs_get_u8(handle, "sf", &lora_config.spreading_factor);
if (err != ESP_OK) lora_config.spreading_factor = 11;