tobiasschuerg/MH-Z-CO2-Sensors

Preheat constant calculation overflows

stellanl opened this issue · 1 comments

On ATmega an int is only 16 bits, so the preheating constants get bad values ( -16608), and the preheat check does not work as intended. I had to change the declarations like this to make it work:

const unsigned long MHZ14A_PREHEATING_TIME = 3 * 60 * 1000ul;

Thanks for the note.