From c37a4a43984a6d4bef17ef9d00d9d08dac4cdfb1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 18 Feb 2019 11:06:16 +0100 Subject: [PATCH] Update xsns_01_counter.ino Fix non floating point use function (#5265) --- sonoff/xsns_01_counter.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xsns_01_counter.ino b/sonoff/xsns_01_counter.ino index d62885cc5..6fe0cf333 100644 --- a/sonoff/xsns_01_counter.ino +++ b/sonoff/xsns_01_counter.ino @@ -103,7 +103,7 @@ void CounterShow(bool json) dtostrfd((double)RtcSettings.pulse_counter[i] / 1000000, 6, counter); } else { dsxflg++; - dtostrfd(RtcSettings.pulse_counter[i], 0, counter); + snprintf_P(counter, sizeof(counter), PSTR("%lu"), RtcSettings.pulse_counter[i]); } if (json) {