mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-06 06:53:42 +00:00
Merge branch 'master' into mqtt
This commit is contained in:
commit
62c33086ca
102 changed files with 1621 additions and 1489 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2015,2016,2023 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2015,2016,2023,2025 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
#include <cstring>
|
||||
|
||||
CDMRShortLC::CDMRShortLC() :
|
||||
m_rawData(NULL),
|
||||
m_deInterData(NULL)
|
||||
m_rawData(nullptr),
|
||||
m_deInterData(nullptr)
|
||||
{
|
||||
m_rawData = new bool[72U];
|
||||
m_deInterData = new bool[68U];
|
||||
|
|
@ -43,8 +43,8 @@ CDMRShortLC::~CDMRShortLC()
|
|||
// The main decode function
|
||||
bool CDMRShortLC::decode(const unsigned char* in, unsigned char* out)
|
||||
{
|
||||
assert(in != NULL);
|
||||
assert(out != NULL);
|
||||
assert(in != nullptr);
|
||||
assert(out != nullptr);
|
||||
|
||||
// Get the raw binary
|
||||
decodeExtractBinary(in);
|
||||
|
|
@ -66,8 +66,8 @@ bool CDMRShortLC::decode(const unsigned char* in, unsigned char* out)
|
|||
// The main encode function
|
||||
void CDMRShortLC::encode(const unsigned char* in, unsigned char* out)
|
||||
{
|
||||
assert(in != NULL);
|
||||
assert(out != NULL);
|
||||
assert(in != nullptr);
|
||||
assert(out != nullptr);
|
||||
|
||||
// Extract Data
|
||||
encodeExtractData(in);
|
||||
|
|
@ -84,7 +84,7 @@ void CDMRShortLC::encode(const unsigned char* in, unsigned char* out)
|
|||
|
||||
void CDMRShortLC::decodeExtractBinary(const unsigned char* in)
|
||||
{
|
||||
assert(in != NULL);
|
||||
assert(in != nullptr);
|
||||
|
||||
CUtils::byteToBitsBE(in[0U], m_rawData + 0U);
|
||||
CUtils::byteToBitsBE(in[1U], m_rawData + 8U);
|
||||
|
|
@ -134,7 +134,7 @@ bool CDMRShortLC::decodeErrorCheck()
|
|||
// Extract the 36 bits of payload
|
||||
void CDMRShortLC::decodeExtractData(unsigned char* data) const
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(data != nullptr);
|
||||
|
||||
bool bData[40U];
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ void CDMRShortLC::decodeExtractData(unsigned char* data) const
|
|||
// Extract the 36 bits of payload
|
||||
void CDMRShortLC::encodeExtractData(const unsigned char* in) const
|
||||
{
|
||||
assert(in != NULL);
|
||||
assert(in != nullptr);
|
||||
|
||||
bool bData[40U];
|
||||
CUtils::byteToBitsBE(in[0U], bData + 0U);
|
||||
|
|
@ -215,7 +215,7 @@ void CDMRShortLC::encodeInterleave()
|
|||
|
||||
void CDMRShortLC::encodeExtractBinary(unsigned char* data)
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(data != nullptr);
|
||||
|
||||
CUtils::bitsToByteBE(m_rawData + 0U, data[0U]);
|
||||
CUtils::bitsToByteBE(m_rawData + 8U, data[1U]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue