Rescale some of the tone levels.

This commit is contained in:
Jonathan Naylor 2020-04-24 13:13:25 +01:00
parent 242bc7b322
commit 9fab1e0823
3 changed files with 6 additions and 8 deletions

8
FM.h
View File

@ -71,9 +71,9 @@ private:
CFMTimer m_ackMinTimer; CFMTimer m_ackMinTimer;
CFMTimer m_ackDelayTimer; CFMTimer m_ackDelayTimer;
CFMTimer m_hangTimer; CFMTimer m_hangTimer;
CFMDirectFormI m_filterStage1; CFMDirectFormI m_filterStage1;
CFMDirectFormI m_filterStage2; CFMDirectFormI m_filterStage2;
CFMDirectFormI m_filterStage3; CFMDirectFormI m_filterStage3;
void stateMachine(bool validSignal, uint8_t length); void stateMachine(bool validSignal, uint8_t length);
void listeningState(bool validSignal); void listeningState(bool validSignal);
@ -86,8 +86,6 @@ private:
void sendCallsign(); void sendCallsign();
void beginRelaying(); void beginRelaying();
q15_t filter(q15_t sample);
}; };
#endif #endif

View File

@ -106,7 +106,7 @@ uint8_t CFMCTCSSTX::setParams(uint8_t frequency, uint8_t level)
q15_t arg = 0; q15_t arg = 0;
for (uint16_t i = 0U; i < m_length; i++) { for (uint16_t i = 0U; i < m_length; i++) {
q31_t value = ::arm_sin_q15(arg) * q15_t(level * 128); q31_t value = ::arm_sin_q15(arg) * q15_t(level * 1280);
m_values[i] = q15_t(__SSAT((value >> 15), 16)); m_values[i] = q15_t(__SSAT((value >> 15), 16));
arg += entry->increment; arg += entry->increment;

View File

@ -111,8 +111,8 @@ uint8_t CFMKeyer::setParams(const char* text, uint8_t speed, uint16_t frequency,
} }
} }
m_highLevel = q15_t(highLevel * 128); m_highLevel = q15_t(highLevel);
m_lowLevel = q15_t(lowLevel * 128); m_lowLevel = q15_t(lowLevel);
m_dotLen = 24000U / speed; // In samples m_dotLen = 24000U / speed; // In samples