Commit 6fc10a75 authored by Eric Duminil's avatar Eric Duminil
Browse files

Trying to remove unneeded parameters, to save some memory

parent 096c204a
Pipeline #6601 passed with stage
in 2 minutes and 15 seconds
...@@ -156,7 +156,6 @@ namespace sensor { ...@@ -156,7 +156,6 @@ namespace sensor {
Serial.print(F("Calibrating S8 now...")); Serial.print(F("Calibrating S8 now..."));
//TODO: Apply ppm offset, e.g. +25ppm for 425ppm? //TODO: Apply ppm offset, e.g. +25ppm for 425ppm?
Serial.println(F("WARNING! FORCING CALIBRATION TO 400ppm, regardless of configuration.")); Serial.println(F("WARNING! FORCING CALIBRATION TO 400ppm, regardless of configuration."));
config::co2_calibration_level = 400; //NOTE: Seems to be hard-coded in S8
sensor_S8->manual_calibration(); sensor_S8->manual_calibration();
Serial.println(F(" Done!")); Serial.println(F(" Done!"));
Serial.println(F("Sensor calibrated.")); Serial.println(F("Sensor calibrated."));
......
...@@ -26,7 +26,7 @@ class Ampel { ...@@ -26,7 +26,7 @@ class Ampel {
private: private:
static void showFreeSpace(); static void showFreeSpace();
public: public:
const char *version = "v0.3.1-S8"; // Update manually after significant changes. const char *version = "v0.3.2-S8"; // Update manually after significant changes.
const char *board; const char *board;
const char *sensorId; const char *sensorId;
const char *macAddress; const char *macAddress;
......
...@@ -55,17 +55,6 @@ namespace web_config { ...@@ -55,17 +55,6 @@ namespace web_config {
Builder<IntTParameter<uint16_t>>("timestep").label("Measurement timestep").defaultValue(MEASUREMENT_TIMESTEP).min( Builder<IntTParameter<uint16_t>>("timestep").label("Measurement timestep").defaultValue(MEASUREMENT_TIMESTEP).min(
2).max(1800).placeholder("[s]").build(); 2).max(1800).placeholder("[s]").build();
FloatTParameter temperatureOffsetParam =
Builder<FloatTParameter>("temp_offset").label("Temperature offset").defaultValue(TEMPERATURE_OFFSET).placeholder(
"[K]").step(0.1).build();
IntTParameter<uint16_t> altitudeParam = Builder<IntTParameter<uint16_t>>("altitude").label("Altitude").defaultValue(
ALTITUDE_ABOVE_SEA_LEVEL).min(0).step(1).placeholder("[m]").build();
IntTParameter<uint16_t> atmosphericCO2Param = Builder<IntTParameter<uint16_t>>("atmospheric_co2").label(
"Atmospheric CO2 concentration").defaultValue(
ATMOSPHERIC_CO2_CONCENTRATION).min(400).max(2000).step(1).placeholder("ppm").build();
CheckboxTParameter autoCalibrateParam = Builder<CheckboxTParameter>("asc").label("Auto-calibration?").defaultValue( CheckboxTParameter autoCalibrateParam = Builder<CheckboxTParameter>("asc").label("Auto-calibration?").defaultValue(
AUTO_CALIBRATE_SENSOR).build(); AUTO_CALIBRATE_SENSOR).build();
...@@ -196,12 +185,6 @@ namespace web_config { ...@@ -196,12 +185,6 @@ namespace web_config {
iotWebConf->getApTimeoutParameter()->defaultValue = STRINGIFY(ACCESS_POINT_TIMEOUT); // Defined as number in config.h but stored as string in webconf. iotWebConf->getApTimeoutParameter()->defaultValue = STRINGIFY(ACCESS_POINT_TIMEOUT); // Defined as number in config.h but stored as string in webconf.
co2Params.addItem(&timestepParam); co2Params.addItem(&timestepParam);
co2Params.addItem(&temperatureOffsetParam);
temperatureOffsetParam.visible = false; // Not needed for S8
co2Params.addItem(&altitudeParam);
altitudeParam.visible = false; // Not needed either for S8
co2Params.addItem(&atmosphericCO2Param);
atmosphericCO2Param.visible = false; // Hard coded 400ppm for S8 :-/
co2Params.addItem(&autoCalibrateParam); co2Params.addItem(&autoCalibrateParam);
ledParams.addItem(&minBrightnessParam); ledParams.addItem(&minBrightnessParam);
...@@ -342,10 +325,7 @@ namespace config { ...@@ -342,10 +325,7 @@ namespace config {
// Sensor // Sensor
uint16_t &measurement_timestep = web_config::timestepParam.value(); // [s] Measurement happen every 4s anyway on S8. How often should the values be displayed? uint16_t &measurement_timestep = web_config::timestepParam.value(); // [s] Measurement happen every 4s anyway on S8. How often should the values be displayed?
uint16_t &altitude_above_sea_level = web_config::altitudeParam.value(); // [m]
uint16_t &co2_calibration_level = web_config::atmosphericCO2Param.value(); // [ppm]
bool &auto_calibrate_sensor = web_config::autoCalibrateParam.value(); // [true / false] bool &auto_calibrate_sensor = web_config::autoCalibrateParam.value(); // [true / false]
float &temperature_offset = web_config::temperatureOffsetParam.value(); // [K] Sign isn't relevant.
bool &is_wifi_on = web_config::ampelWifiParam.value(); bool &is_wifi_on = web_config::ampelWifiParam.value();
uint16_t &wifi_timeout = web_config::wifiTimeoutParam.value(); uint16_t &wifi_timeout = web_config::wifiTimeoutParam.value();
......
...@@ -19,10 +19,7 @@ namespace config { ...@@ -19,10 +19,7 @@ namespace config {
// Sensor // Sensor
extern uint16_t &measurement_timestep; // [s] How often measurements are displayed extern uint16_t &measurement_timestep; // [s] How often measurements are displayed
extern uint16_t &altitude_above_sea_level; // [m]
extern uint16_t &co2_calibration_level; // [ppm]
extern bool &auto_calibrate_sensor; // [true / false] extern bool &auto_calibrate_sensor; // [true / false]
extern float &temperature_offset; // [K] Sign isn't relevant.
// LED // LED
extern uint8_t &max_brightness; extern uint8_t &max_brightness;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment