From bce9840cb1d8199a3be9e5a29815656f0068635b Mon Sep 17 00:00:00 2001 From: John Ronan Date: Sun, 4 Jun 2017 10:27:49 +0100 Subject: [PATCH] Float does not appear to have enough precision for the calculation --- YSFGateway/APRSWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YSFGateway/APRSWriter.cpp b/YSFGateway/APRSWriter.cpp index 2314135..283b53f 100644 --- a/YSFGateway/APRSWriter.cpp +++ b/YSFGateway/APRSWriter.cpp @@ -150,8 +150,8 @@ void CAPRSWriter::sendIdFrames() char desc[100U]; if (m_txFrequency != 0U) { float offset = float(int(m_rxFrequency) - int(m_txFrequency)) / 1000000.0F; - ::sprintf(desc, "MMDVM Voice %.5lfMHz %c%.4lfMHz", - float(m_txFrequency) / 1000000.0F, + ::sprintf(desc, "MMDVM Voice %.5LfMHz %c%.4lfMHz", + float(m_txFrequency) / 1000000.0L, offset < 0.0F ? '-' : '+', ::fabs(offset)); } else {