mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
More Sonar fixes
This commit is contained in:
parent
28262ca5fb
commit
189d5a6a01
@ -1949,8 +1949,8 @@ void FT8::soft_decode_mags(FT8Params& params, const std::vector<std::vector<floa
|
||||
int lli = 0;
|
||||
int zoX = 1<<(nbSymbolBits-1);
|
||||
int zoY = nbSymbolBits;
|
||||
int *zeroi = new int[zoX*zoY];
|
||||
int *onei = new int[zoX*zoY];
|
||||
std::vector<int> zeroi(zoX*zoY);
|
||||
std::vector<int> onei(zoX*zoY);
|
||||
|
||||
for (int biti = 0; biti < nbSymbolBits; biti++)
|
||||
{
|
||||
@ -2006,9 +2006,6 @@ void FT8::soft_decode_mags(FT8Params& params, const std::vector<std::vector<floa
|
||||
ll174[lli++] = ll;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] zeroi;
|
||||
delete[] onei;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -31,8 +31,10 @@ template <typename TYPE>
|
||||
class LDPCEncoder
|
||||
{
|
||||
LDPCInterface *ldpc;
|
||||
int N, K, R;
|
||||
bool initialized;
|
||||
int N = 2;
|
||||
int K = 1;
|
||||
int R = 1;
|
||||
bool initialized = false;
|
||||
|
||||
TYPE one()
|
||||
{
|
||||
@ -43,11 +45,7 @@ class LDPCEncoder
|
||||
return b < TYPE(0) ? -a : b > TYPE(0) ? a : TYPE(0);
|
||||
}
|
||||
public:
|
||||
LDPCEncoder() :
|
||||
N(2),
|
||||
K(1),
|
||||
R(1),
|
||||
initialized(false)
|
||||
LDPCEncoder()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -78,12 +78,21 @@ template <typename TYPE, typename ALG>
|
||||
class LDPCDecoder
|
||||
{
|
||||
private:
|
||||
TYPE *bnl, *pty, *inp, *out;
|
||||
uint16_t *pos;
|
||||
uint8_t *cnc;
|
||||
TYPE *bnl = nullptr;
|
||||
TYPE *pty = nullptr;
|
||||
TYPE *inp = nullptr;
|
||||
TYPE *out = nullptr;
|
||||
uint16_t *pos = nullptr;
|
||||
uint8_t *cnc = nullptr;
|
||||
ALG alg;
|
||||
int M, N, K, R, q, CNL, LT;
|
||||
bool initialized;
|
||||
int M = 0;
|
||||
int N = 0;
|
||||
int K = 0;
|
||||
int R = 0;
|
||||
int q = 0;
|
||||
int CNL = 0;
|
||||
int LT = 0;
|
||||
bool initialized = false;
|
||||
|
||||
void reset()
|
||||
{
|
||||
@ -140,21 +149,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
LDPCDecoder() :
|
||||
bnl(nullptr),
|
||||
pty(nullptr),
|
||||
inp(nullptr),
|
||||
out(nullptr),
|
||||
pos(nullptr),
|
||||
cnc(nullptr),
|
||||
M(0),
|
||||
N(0),
|
||||
K(0),
|
||||
R(0),
|
||||
q(0),
|
||||
CNL(0),
|
||||
LT(0),
|
||||
initialized(false)
|
||||
LDPCDecoder()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -125,16 +125,16 @@ int main(int argc, char **argv)
|
||||
// DVB-S2 MODCOD definitions
|
||||
static const char *mc_tabnames[2][32] = { // [shortframes][modcod]
|
||||
{// Normal frames
|
||||
0, "B1", "B2", "B3", "B4", "B5", "B6", "B7",
|
||||
nullptr, "B1", "B2", "B3", "B4", "B5", "B6", "B7",
|
||||
"B8", "B9", "B10", "B11", "B5", "B6", "B7", "B9",
|
||||
"B10", "B11", "B6", "B7", "B8", "B9", "B10", "B11",
|
||||
"B7", "B8", "B8", "B10", "B11", 0, 0, 0
|
||||
"B7", "B8", "B8", "B10", "B11", nullptr, nullptr, nullptr
|
||||
},
|
||||
{// Short frames
|
||||
0, "C1", "C2", "C3", "C4", "C5", "C6", "C7",
|
||||
"C8", "C9", "C10", 0, "C5", "C6", "C7", "C9",
|
||||
"C10", 0, "C6", "C7", "C8", "C9", "C10", 0,
|
||||
"C7", "C8", "C8", "C10", 0, 0, 0, 0
|
||||
nullptr, "C1", "C2", "C3", "C4", "C5", "C6", "C7",
|
||||
"C8", "C9", "C10", nullptr, "C5", "C6", "C7", "C9",
|
||||
"C10", nullptr, "C6", "C7", "C8", "C9", "C10", nullptr,
|
||||
"C7", "C8", "C8", "C10", nullptr, nullptr, nullptr, nullptr
|
||||
}};
|
||||
|
||||
const char *tabname = mc_tabnames[shortframes][modcod];
|
||||
|
@ -50,19 +50,16 @@ struct IEEE_802_15_4_MacFrame
|
||||
uint16_t m_frameControl;
|
||||
uint8_t m_sequenceNumber;
|
||||
uint16_t m_destPANID;
|
||||
uint16_t m_destShortAddress;
|
||||
uint16_t m_destShortAddress = 0;
|
||||
ieee_802_15_4_address m_destAddress;
|
||||
uint16_t m_sourcePANID;
|
||||
uint16_t m_sourceShortAddress;
|
||||
uint16_t m_sourceShortAddress = 0;
|
||||
ieee_802_15_4_address m_sourceAddress;
|
||||
uint8_t m_payload[IEEE_802_15_4_MAC_PAYLOAD_MAX_LENGTH];
|
||||
uint8_t m_payloadLength;
|
||||
|
||||
IEEE_802_15_4_MacFrame()
|
||||
{
|
||||
m_destShortAddress = 0;
|
||||
m_sourceShortAddress = 0;
|
||||
|
||||
if (false)
|
||||
{
|
||||
// Example ACK frame
|
||||
|
Loading…
Reference in New Issue
Block a user