From e4d621c6d6cda3b10a970f183a459758deff4c07 Mon Sep 17 00:00:00 2001 From: Dmitry Demenchuk Date: Sat, 6 Jun 2020 17:17:07 +0100 Subject: [PATCH] Fix a call of overloaded 'map(double&, int, int, int, int)' is ambiguous --- src/CO2Sensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CO2Sensor.cpp b/src/CO2Sensor.cpp index c1a204a..e3d5d94 100644 --- a/src/CO2Sensor.cpp +++ b/src/CO2Sensor.cpp @@ -53,7 +53,7 @@ int CO2Sensor::read(){ if (_co2ppmCO2_HIGHT) _greenLevel = 0; - else _greenLevel = map(_co2ppm, CO2_LOW, CO2_HIGHT, 255, 0); + else _greenLevel = map((int)_co2ppm, CO2_LOW, CO2_HIGHT, 255, 0); } return _co2ppm;