diff --git a/lorahandler.go b/lorahandler.go index ac7e531..3285f6f 100644 --- a/lorahandler.go +++ b/lorahandler.go @@ -480,8 +480,8 @@ func WriteDatapoint(mytime int64, deveui string, devaddr string, v uint8, h uint if h > 0 { sv := "" if supercap { - // vp for supercapacitor (180 is 0%, 225 is 100%) - vp = int16((float32(v) - 180) / 45.0 * 100.0) + // vp for supercapacitor (165 is 0%, 210 is 100%) + vp = int16((float32(v) - 165) / 45.0 * 100.0) if vp < 0 { vp = 0 } else if vp > 100 {