Commit b85a725d authored by Eric Duminil's avatar Eric Duminil
Browse files

Merge branch 'develop'

parents efdfde46 4705ed5b
Pipeline #6589 passed with stage
in 2 minutes and 23 seconds
all:
ifdef board
pio -f -c vim run -e $(board)
else
pio -f -c vim run
endif
upload:
pio -f -c vim run --target upload -e $(board)
......
......@@ -148,5 +148,5 @@ The commands can be sent via the Serial interface, from the webpage or via MQTT.
## License
Copyright © 2021, [HfT Stuttgart](https://www.hft-stuttgart.de/)
Copyright © 2022, [HfT Stuttgart](https://www.hft-stuttgart.de/)
[GPLv3](https://choosealicense.com/licenses/gpl-3.0/)
......@@ -19,7 +19,7 @@
/*
* This file is part of the "CO2 Ampel" project ( https://transfer.hft-stuttgart.de/gitlab/co2ampel and
* https://transfer.hft-stuttgart.de/gitlab/co2ampel/ampel-firmware )
* Copyright (c) 2020 HfT Stuttgart.
* Copyright (c) 2022 HfT Stuttgart.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -56,6 +56,8 @@ namespace sensor {
void calibrateSensorToSpecificPPM(int32_t calibrationLevel);
void calibrateSensorRightNow(int32_t calibrationLevel);
void setAutoCalibration(int32_t autoCalibration);
void setTimer(int32_t timestep);
void resetSCD();
void initialize() {
#if defined(ESP8266)
......@@ -71,11 +73,12 @@ namespace sensor {
* SDA --- SDA (GPIO21) //NOTE: GPIO1 would be more convenient (right next to GPO3)
*/
#endif
Serial.println(F("Sensor : Sensirion SCD30"));
Serial.println();
scd30.enableDebugging(); // Prints firmware version in the console.
if (!scd30.begin(config::auto_calibrate_sensor)) {
Serial.println(F("ERROR - CO2 sensor not detected. Please check wiring!"));
Serial.println(F("ERROR - Sensirion SCD30 not detected. Please check wiring!"));
led_effects::showKITTWheel(color::red, 30);
ESP.restart();
}
......@@ -99,6 +102,7 @@ namespace sensor {
Serial.print(getTemperatureOffset());
Serial.println(F(" K"));
//FIXME: Actually set auto_calibrate_sensor, depending on the config.
Serial.print(F("Auto-calibration is "));
Serial.println(config::auto_calibrate_sensor ? "ON." : "OFF.");
......
......@@ -12,8 +12,6 @@ namespace sensor {
void initialize();
bool processData();
void startCalibrationProcess();
void setTimer(int32_t timestep);
void resetSCD();
float getTemperatureOffset();
}
#endif
......@@ -26,7 +26,7 @@ class Ampel {
private:
static void showFreeSpace();
public:
const char *version = "v0.3.0"; // Update manually after significant changes.
const char *version = "v0.3.1-DEV"; // Update manually after significant changes.
const char *board;
const char *sensorId;
const char *macAddress;
......
......@@ -26,5 +26,7 @@ lib_deps =
MCCI LoRaWAN LMIC library
build_flags =
-D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS
; Conflict between 2 hal_init functions. see https://community.platformio.org/t/multiple-definitions-warning-cant-fix-it/27534/9
-D hal_init=LMICHAL_init
-D CFG_eu868=1
-D CFG_sx1276_radio=1
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