From af5c565990aedf0f258ba7f1d3eee499f019496d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Sch=C3=BCrg?= Date: Sun, 8 Sep 2019 11:21:55 +0200 Subject: [PATCH] Make times `unsigned long` to avoid overlow on 16 bit architectures. Closes #10 --- MHZ.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MHZ.cpp b/MHZ.cpp index 0da32da..43b6bfa 100644 --- a/MHZ.cpp +++ b/MHZ.cpp @@ -8,11 +8,11 @@ const int MHZ14A = 14; const int MHZ19B = 19; -const int MHZ14A_PREHEATING_TIME = 3 * 60 * 1000; -const int MHZ19B_PREHEATING_TIME = 3 * 60 * 1000; +const unsigned long MHZ14A_PREHEATING_TIME = 3 * 60 * 1000; +const unsigned long MHZ19B_PREHEATING_TIME = 3 * 60 * 1000; -const int MHZ14A_RESPONSE_TIME = 60 * 1000; -const int MHZ19B_RESPONSE_TIME = 120 * 1000; +const unsigned long MHZ14A_RESPONSE_TIME = 60 * 1000; +const unsigned long MHZ19B_RESPONSE_TIME = 120 * 1000; const int STATUS_NO_RESPONSE = -2; const int STATUS_CHECKSUM_MISMATCH = -3;