From 292efcc358f8f8f6093a87dfbd632855be70073e Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 18 May 2019 19:43:04 +0200 Subject: [PATCH] Update support.ino Add optional debug info --- sonoff/support.ino | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sonoff/support.ino b/sonoff/support.ino index 65ca62d7e..da79be0e0 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -696,7 +696,18 @@ double TaylorLog(double x) totalValue = totalValue + y; powe = powe + 2; } - return 2 * totalValue; + totalValue *= 2; +/* + char logxs[33]; + dtostrfd(x, 8, logxs); + double log1 = log(x); + char log1s[33]; + dtostrfd(log1, 8, log1s); + char log2s[33]; + dtostrfd(totalValue, 8, log2s); + AddLog_P2(LOG_LEVEL_DEBUG, PSTR("input %s, log %s, taylor %s"), logxs, log1s, log2s); +*/ + return totalValue; } uint32_t SqrtInt(uint32_t num)