mirror of
https://github.com/sigmasternchen/MH-Z-CO2-Sensors
synced 2025-03-15 06:38:55 +00:00
added upper L for Arduino Uno to preheating time
The literals for the preheating time are interpreted as int. On Arduino Uno an int is 2 bytes in size, ranging from -32,768 to 32,767. Therefore, the calculated number of 3*60*1000=180000 does not fit in. Added upper L to force the literal to long.
This commit is contained in:
parent
b14f103251
commit
d79581a1e1
1 changed files with 2 additions and 2 deletions
4
MHZ.cpp
4
MHZ.cpp
|
@ -8,8 +8,8 @@
|
|||
const int MHZ14A = 14;
|
||||
const int MHZ19B = 19;
|
||||
|
||||
const unsigned long MHZ14A_PREHEATING_TIME = 3 * 60 * 1000;
|
||||
const unsigned long MHZ19B_PREHEATING_TIME = 3 * 60 * 1000;
|
||||
const unsigned long MHZ14A_PREHEATING_TIME = 3L * 60L * 1000L;
|
||||
const unsigned long MHZ19B_PREHEATING_TIME = 3L * 60L * 1000L;
|
||||
|
||||
const unsigned long MHZ14A_RESPONSE_TIME = 60 * 1000;
|
||||
const unsigned long MHZ19B_RESPONSE_TIME = 120 * 1000;
|
||||
|
|
Loading…
Reference in a new issue