fixed calcTxOffset to use a signed integer; (#72)

(uint32_t)calcTxOffset would result in the offset being 0 if the value was negative in iden_table.dat
pull/73/head
jsb5151 1 year ago committed by GitHub
parent 3ed87d4f89
commit e41fec1253
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -170,7 +170,7 @@ bool Host::readParams()
float calcTxOffset = entry.txOffsetMhz() * 1000000.0;
m_txFrequency = (uint32_t)((entry.baseFrequency() + ((calcSpace * 125) * m_channelNo)));
m_rxFrequency = (uint32_t)(m_txFrequency + (uint32_t)calcTxOffset);
m_rxFrequency = (uint32_t)(m_txFrequency + (int32_t)calcTxOffset);
if (calcTxOffset < 0.0f && m_rxFrequency < entry.baseFrequency()) {
::LogWarning(LOG_HOST, "Channel Id %u Channel No $%04X has an invalid frequency. Rx Frequency (%u) is less then the base frequency (%u), this may result in incorrect trunking behavior.", m_channelId, m_channelNo,

Loading…
Cancel
Save

Powered by TurnKey Linux.