1
0
mirror of https://github.com/revspace/operame synced 2024-10-05 09:27:32 +00:00
Commit Graph

29 Commits

Author SHA1 Message Date
Juerd Waalboer
94c39eaf0d Don't catch up with missed intervals 2020-12-27 21:10:38 +01:00
Juerd Waalboer
f4fe6e3a1e Code cleanup
- Removed unused #define and 'using namespace'
- Moved magic literals to global const
- Reordered functions
- Changed timers in main loop to simple macro instead of Timer class
- Changed several identifiers
- Reformatted global variable assignments
2020-12-27 20:57:53 +01:00
Juerd Waalboer
a9242b549b Remove useless line
Was visible for only 50 ms...
2020-12-27 20:25:29 +01:00
Juerd Waalboer
d2177e450f Tiny refactor 2020-12-27 19:56:22 +01:00
Juerd Waalboer
5889fcdaa5 Smarter debouncing; act after key release 2020-12-27 19:37:39 +01:00
Juerd Waalboer
e70efe35d7 Display message before restarting 2020-12-26 18:09:11 +01:00
Juerd Waalboer
663816223b Avoid possibility of using char* without initialization 2020-12-26 17:44:49 +01:00
Juerd Waalboer
fe392acfbd Change type for consistency
(Now it's inconsistent with the char* in readBytes, but at least it's
consistent in this file...)

Thanks, supakeen!

Also changed the type for the returned value.
2020-12-26 17:39:10 +01:00
Juerd Waalboer
14f917b84f Document special-case return values
Thanks, supakeen!

Additional thought: should maybe be an enum
2020-12-26 17:35:20 +01:00
Juerd Waalboer
7be2c6368c Remove redundant check.
Thanks, supakeen!
2020-12-26 17:23:53 +01:00
Juerd Waalboer
7b989eda31 More detailed on-screen portal instructions 2020-12-26 03:42:57 +01:00
Juerd Waalboer
e9c6cd49ec Portal instructions on screen 2020-12-23 23:15:14 +01:00
Juerd Waalboer
5687e04440 Don't publish invalid sensor readings to MQTT 2020-12-22 05:19:51 +01:00
Juerd Waalboer
e5167278ee Ignore unknown response from AQC
Haven't seen any non-0x86 responses yet, but who knows...
2020-12-22 05:19:40 +01:00
Juerd Waalboer
8a3efb3061 Whitespace 2020-12-22 05:12:08 +01:00
Juerd Waalboer
c3671a07ad Exit demo with demo button 2020-12-22 05:11:33 +01:00
Juerd Waalboer
7f0bb70a93 Refactor timed events
Also, I learned that empty () after [] are optional; reduces linenoise a little.
2020-12-22 03:48:41 +01:00
Juerd Waalboer
f4d1271109 Exit portal with portal button 2020-12-22 01:56:52 +01:00
Juerd Waalboer
468961e94c Use lowercase variable name
There was no good technical reason for using an allcaps identifier for CO2.
2020-12-20 05:17:51 +01:00
Juerd Waalboer
49a624d358 Remove debug printf 2020-12-20 03:56:25 +01:00
Juerd Waalboer
420868585d Support both AQC and MH-Z19B 2020-12-20 03:53:43 +01:00
Juerd Waalboer
6f4ac2b01b Experimental support for mystery sensor 2020-12-15 02:25:24 +01:00
Juerd Waalboer
6c7bb2c4a3 Deal with weird MH-Z19(B?) version
This one, with version number 0436, has a magic "I'm still booting" value
of 436 PPM instead of 410 PPM.

Interestingly, another sensor with version 0430 returns 430 for an instant,
but then goes to 410. During the short 430-phase the clamped CO2 value is
actually 0, so it doesn't require checking.
2020-11-27 05:33:15 +01:00
Juerd Waalboer
0ab1ea28e6 Add logo 2020-11-25 01:55:40 +01:00
Juerd Waalboer
df27d1474a Make compatible with millis() rollover 2020-11-18 23:45:20 +01:00
Juerd Waalboer
5359e62b12 Change RX and TX pins for MH-Z19
Per PCB layout change
2020-11-18 23:44:44 +01:00
Juerd Waalboer
5fdd5596cf Detect rotated TTGO 2020-11-17 21:40:43 +01:00
Juerd Waalboer
4f33490310 Typo 2020-11-16 23:51:38 +01:00
Juerd Waalboer
56d4912e87 First commit 2020-11-16 23:48:15 +01:00