mirror of https://github.com/g4klx/MMDVM.git
Merge branch 'master' into mqtt
This commit is contained in:
commit
65c51bf849
3
Config.h
3
Config.h
|
@ -100,6 +100,9 @@
|
|||
// Use the modem as a serial repeater for Nextion displays
|
||||
#define SERIAL_REPEATER
|
||||
|
||||
// Set the baud rate of the modem serial repeater for Nextion displays
|
||||
#define SERIAL_REPEATER_BAUD_RATE 9600
|
||||
|
||||
// Use the modem as an I2C repeater for OLED displays
|
||||
// #define I2C_REPEATER
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@ class CFMDirectFormI
|
|||
public:
|
||||
|
||||
// convenience function which takes the a0 argument but ignores it!
|
||||
CFMDirectFormI(const q31_t b0, const q31_t b1, const q31_t b2,
|
||||
const q31_t, const q31_t a1, const q31_t a2)
|
||||
CFMDirectFormI(const q31_t b0, const q31_t b1, const q31_t b2, const q31_t, const q31_t a1, const q31_t a2)
|
||||
{
|
||||
// FIR coefficients
|
||||
c_b0 = b0;
|
||||
|
@ -71,7 +70,7 @@ public:
|
|||
c_a2 = my.c_a2; // IIR
|
||||
}
|
||||
|
||||
void reset ()
|
||||
void reset()
|
||||
{
|
||||
m_x1 = 0;
|
||||
m_x2 = 0;
|
||||
|
@ -83,11 +82,7 @@ public:
|
|||
inline q15_t filter(const q15_t in)
|
||||
{
|
||||
// calculate the output
|
||||
register q31_t out_upscaled = c_b0 * in
|
||||
+ c_b1 * m_x1
|
||||
+ c_b2 * m_x2
|
||||
- c_a1 * m_y1
|
||||
- c_a2 * m_y2;
|
||||
q31_t out_upscaled = c_b0 * in + c_b1 * m_x1 + c_b2 * m_x2 - c_a1 * m_y1 - c_a2 * m_y2;
|
||||
|
||||
q15_t out = __SSAT(out_upscaled >> 15, 15);
|
||||
|
||||
|
|
|
@ -896,7 +896,11 @@ void CSerialPort::start()
|
|||
beginInt(1U, SERIAL_SPEED);
|
||||
|
||||
#if defined(SERIAL_REPEATER)
|
||||
#if defined(SERIAL_REPEATER_BAUD_RATE)
|
||||
beginInt(3U, SERIAL_REPEATER_BAUD_RATE);
|
||||
#else
|
||||
beginInt(3U, 9600);
|
||||
#endif
|
||||
#endif
|
||||
#if defined(I2C_REPEATER)
|
||||
beginInt(10U, 9600);
|
||||
|
|
Loading…
Reference in New Issue