Skip to content

Commit f5229db

Browse files
committed
Beging adding sensor config to config file
1 parent 0f9e52e commit f5229db

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Firmware/OpenLog_Artemis/nvm.ino

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ void recordSettingsToFile()
9494
settingsFile.println("qwiicBusMaxSpeed=" + (String)settings.qwiicBusMaxSpeed);
9595
// settingsFile.println("=" + (String)settings.sensor_LPS25HB.);
9696

97+
settingsFile.println("sensor_MS8607.log=" + (String)settings.sensor_MS8607.log);
98+
settingsFile.println("sensor_MS8607.logHumidity=" + (String)settings.sensor_MS8607.logHumidity);
99+
settingsFile.println("sensor_MS8607.logPressure=" + (String)settings.sensor_MS8607.logPressure);
100+
settingsFile.println("sensor_MS8607.logTemperature=" + (String)settings.sensor_MS8607.logTemperature);
101+
settingsFile.println("sensor_MS8607.enableHeater=" + (String)settings.sensor_MS8607.enableHeater);
102+
settingsFile.println("sensor_MS8607.pressureResolution=" + (String)settings.sensor_MS8607.pressureResolution);
103+
settingsFile.println("sensor_MS8607.humidityResolution=" + (String)settings.sensor_MS8607.humidityResolution);
104+
97105
settingsFile.close();
98106
}
99107
}
@@ -284,6 +292,29 @@ bool parseLine(char* str) {
284292
settings.powerDownQwiicBusBetweenReads = d;
285293
else if (strcmp(settingName, "qwiicBusMaxSpeed") == 0)
286294
settings.qwiicBusMaxSpeed = d;
295+
296+
/*
297+
LPS25HB
298+
NAU7802
299+
MCP9600
300+
VCNL4040
301+
*/
302+
303+
else if (strcmp(settingName, "sensor_MS8607.log") == 0)
304+
settings.sensor_MS8607.log = d;
305+
else if (strcmp(settingName, "sensor_MS8607.logHumidity") == 0)
306+
settings.sensor_MS8607.logHumidity = d;
307+
else if (strcmp(settingName, "sensor_MS8607.logPressure") == 0)
308+
settings.sensor_MS8607.logPressure = d;
309+
else if (strcmp(settingName, "sensor_MS8607.logTemperature") == 0)
310+
settings.sensor_MS8607.logTemperature = d;
311+
else if (strcmp(settingName, "sensor_MS8607.enableHeater") == 0)
312+
settings.sensor_MS8607.enableHeater = d;
313+
else if (strcmp(settingName, "sensor_MS8607.pressureResolution") == 0)
314+
settings.sensor_MS8607.pressureResolution = (MS8607_pressure_resolution)d;
315+
else if (strcmp(settingName, "sensor_MS8607.humidityResolution") == 0)
316+
settings.sensor_MS8607.humidityResolution = (MS8607_humidity_resolution)d;
317+
287318
// else if (strcmp(settingName, "") == 0)
288319
// settings. = d;
289320
else

0 commit comments

Comments
 (0)