mirror of
https://github.com/g4klx/DMRGateway
synced 2025-12-27 01:06:12 +08:00
float doesn't appear to have enough precision for the calculation
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user