Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for settings in non-volatile memory, configurable via web interface #5

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4629a64
Modifications for different hardware platforms
Nov 1, 2020
8ce4f24
Moved configuration to separate file
Nov 1, 2020
7e0d9c9
Allow enabling/disabling of serial
Nov 1, 2020
1019906
Dynamic WiFi names with MAC suffix, GPIO config twiddling
Nov 5, 2020
f229cdc
Added calibration via button press feature
Nov 5, 2020
cbcfcc2
Dump WiFi hotspot name regularly
Nov 14, 2020
9fd5689
Changed LED and buzzer GPIO config
Nov 14, 2020
62abe5f
Removed support for WiFi client mode (hotspot mode only)
Nov 14, 2020
93d4c5f
Removed support for BME280 pressure sensor
Nov 14, 2020
b81e90f
Fixed recalibration with fresh air
Nov 14, 2020
0ae5f65
Changed minimum concentration as well as calibration reference
Nov 14, 2020
5cf2fa1
Changed buzzer alarms with max beep count, changed sanity check of CO…
Nov 28, 2020
87ca55b
Updated README.md
Nov 28, 2020
e7d5016
Removed obsolete image
Nov 28, 2020
804a1d3
Switched off serial console by default
Dec 3, 2020
4767cc2
Moved comment about CO2 to header, changed log duration (2h) and labe…
Dec 3, 2020
0d6beca
Optimized setting of NeoPixel ring colors (for speed)
Dec 3, 2020
54a896f
Clear NeoPixel ring at startup
Dec 3, 2020
8fb75b6
Use std::max() instead of solely max()
Feb 5, 2021
99f132a
Updated instructions in README.md
Feb 5, 2021
1ee059e
Remove platformio.ini file due to missing test/support from my side
maehw Jan 24, 2023
6dce841
Hide things only MacOS needs
maehw Jan 30, 2023
ab18561
Support for settings in non-volatile memory that can be accessed via …
maehw Jan 30, 2023
c3476d6
Update README.md (the lazy way)
maehw Jan 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use std::max() instead of solely max()
  • Loading branch information
maehw committed Feb 5, 2021
commit 8fb75b67914bd6f5d97fcb62af0f4f1235bc94ac
4 changes: 2 additions & 2 deletions coro2sens/coro2sens.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool alarmHasTriggered = false;
uint16_t alarmActiveTimer = 0;
uint16_t co2log[LOG_SIZE] = {0}; // Ring buffer.
uint32_t co2logPos = 0; // Current buffer start position.
uint16_t co2logDownsample = max(1, ((((LOG_MINUTES) * 60) / MEASURE_INTERVAL_S) / LOG_SIZE));
uint16_t co2logDownsample = std::max(1, ((((LOG_MINUTES) * 60) / MEASURE_INTERVAL_S) / LOG_SIZE));
uint16_t co2avg, co2avgSamples = 0; // Used for downsampling.
char hotspot_name[WIFI_HOTSPOT_SIZE]; // the buffer for the Wifi hotspot name

Expand Down Expand Up @@ -372,7 +372,7 @@ void handleCaptivePortal(AsyncWebServerRequest *request) {
res->print("<!DOCTYPE html><html><head>");
res->print("<title>coro2sens</title>");
res->print(R"(<meta content="width=device-width,initial-scale=1" name="viewport">)");
res->printf(R"(<meta http-equiv="refresh" content="%d">)", max(MEASURE_INTERVAL_S, 10));
res->printf(R"(<meta http-equiv="refresh" content="%d">)", std::max(MEASURE_INTERVAL_S, 10));
res->print(R"(<style type="text/css">* { font-family:sans-serif }</style>)");
res->print("</head><body>");

Expand Down