Skip to content

Commit 114c2bc

Browse files
committed
Handle extended packet lengths.
1 parent 6dbda27 commit 114c2bc

30 files changed

+410
-380
lines changed

CWIdTX.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2017,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
*
55
* This program is free software; you can redistribute it and/or modify
@@ -125,7 +125,7 @@ void CCWIdTX::process()
125125
}
126126
}
127127

128-
uint8_t CCWIdTX::write(const uint8_t* data, uint8_t length)
128+
uint8_t CCWIdTX::write(const uint8_t* data, uint16_t length)
129129
{
130130
::memset(m_poBuffer, 0x00U, 1000U * sizeof(uint8_t));
131131

CWIdTX.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
3-
* Copyright (C) 2016 by Colin Durbridge G4EML
3+
* Copyright (C) 2016,2020 by Colin Durbridge G4EML
44
*
55
* This program is free software; you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ class CCWIdTX {
2828

2929
void process();
3030

31-
uint8_t write(const uint8_t* data, uint8_t length);
31+
uint8_t write(const uint8_t* data, uint16_t length);
3232

3333
void reset();
3434

CalDMR.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2015,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
*
55
* This program is free software; you can redistribute it and/or modify
@@ -208,7 +208,7 @@ void CCalDMR::dmrdmo1k()
208208
}
209209
}
210210

211-
uint8_t CCalDMR::write(const uint8_t* data, uint8_t length)
211+
uint8_t CCalDMR::write(const uint8_t* data, uint16_t length)
212212
{
213213
if (length != 1U)
214214
return 4U;

CalDMR.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2015,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
*
55
* This program is free software; you can redistribute it and/or modify
@@ -41,7 +41,7 @@ class CCalDMR {
4141
void createData1k(uint8_t n);
4242
void createDataDMO1k(uint8_t n);
4343

44-
uint8_t write(const uint8_t* data, uint8_t length);
44+
uint8_t write(const uint8_t* data, uint16_t length);
4545

4646
private:
4747
bool m_transmit;

CalDStarTX.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2016 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2016,2020 by Jonathan Naylor G4KLX
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -162,7 +162,7 @@ void CCalDStarTX::process()
162162
m_count = (m_count + 1U) % (30U * 21U);
163163
}
164164

165-
uint8_t CCalDStarTX::write(const uint8_t* data, uint8_t length)
165+
uint8_t CCalDStarTX::write(const uint8_t* data, uint16_t length)
166166
{
167167
if (length != 1U)
168168
return 4U;

CalDStarTX.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2015,2016,2020 by Jonathan Naylor G4KLX
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ class CCalDStarTX {
2626
public:
2727
CCalDStarTX();
2828

29-
uint8_t write(const uint8_t* data, uint8_t length);
29+
uint8_t write(const uint8_t* data, uint16_t length);
3030

3131
void process();
3232

CalFM.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2015,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
* Copyright (C) 2020 by Phil Taylor M0VSE
55
*
@@ -116,7 +116,7 @@ void CCalFM::process()
116116
}
117117

118118

119-
uint8_t CCalFM::write(const uint8_t* data, uint8_t length)
119+
uint8_t CCalFM::write(const uint8_t* data, uint16_t length)
120120
{
121121
if (length != 1U)
122122
return 4U;

CalFM.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2015 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2015,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
* Copyright (C) 2020 by Phil Taylor M0VSE
55
*
@@ -35,7 +35,7 @@ class CCalFM {
3535
void fm25kcal();
3636
void fm30kcal();
3737

38-
uint8_t write(const uint8_t* data, uint8_t length);
38+
uint8_t write(const uint8_t* data, uint16_t length);
3939

4040
private:
4141
uint16_t m_frequency;

CalNXDN.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2018 by Andy Uribe CA6JAU
3+
* Copyright (C) 2020 by Jonathan Naylor G4KLX
34
*
45
* This program is free software; you can redistribute it and/or modify
56
* it under the terms of the GNU General Public License as published by
@@ -79,7 +80,7 @@ void CCalNXDN::process()
7980
}
8081
}
8182

82-
uint8_t CCalNXDN::write(const uint8_t* data, uint8_t length)
83+
uint8_t CCalNXDN::write(const uint8_t* data, uint16_t length)
8384
{
8485
if (length != 1U)
8586
return 4U;

CalNXDN.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2018 by Andy Uribe CA6JAU
3+
* Copyright (C) 2020 by Jonathan Naylor G4KLX
34
*
45
* This program is free software; you can redistribute it and/or modify
56
* it under the terms of the GNU General Public License as published by
@@ -32,7 +33,7 @@ class CCalNXDN {
3233

3334
void process();
3435

35-
uint8_t write(const uint8_t* data, uint8_t length);
36+
uint8_t write(const uint8_t* data, uint16_t length);
3637

3738
private:
3839
bool m_transmit;

CalP25.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2018 by Andy Uribe CA6JAU
3+
* Copyright (C) 2020 by Jonathan Naylor G4KLX
34
*
45
* This program is free software; you can redistribute it and/or modify
56
* it under the terms of the GNU General Public License as published by
@@ -82,7 +83,7 @@ void CCalP25::process()
8283
}
8384
}
8485

85-
uint8_t CCalP25::write(const uint8_t* data, uint8_t length)
86+
uint8_t CCalP25::write(const uint8_t* data, uint16_t length)
8687
{
8788
if (length != 1U)
8889
return 4U;

CalP25.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2018 by Andy Uribe CA6JAU
3+
* Copyright (C) 2020 by Jonathan Naylor G4KLX
34
*
45
* This program is free software; you can redistribute it and/or modify
56
* it under the terms of the GNU General Public License as published by
@@ -34,7 +35,7 @@ class CCalP25 {
3435

3536
void process();
3637

37-
uint8_t write(const uint8_t* data, uint8_t length);
38+
uint8_t write(const uint8_t* data, uint16_t length);
3839

3940
private:
4041
bool m_transmit;

CalPOCSAG.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2019 by Florian Wolters DF2ET
3+
* Copyright (C) 2020 by Jonathan Naylor G4KLX
34
*
45
* This program is free software; you can redistribute it and/or modify
56
* it under the terms of the GNU General Public License as published by
@@ -38,7 +39,7 @@ void CCalPOCSAG::process()
3839
pocsagTX.writeByte(0xAAU);
3940
}
4041

41-
uint8_t CCalPOCSAG::write(const uint8_t* data, uint8_t length)
42+
uint8_t CCalPOCSAG::write(const uint8_t* data, uint16_t length)
4243
{
4344
if (length != 1U)
4445
return 4U;

CalPOCSAG.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (C) 2019 by Florian Wolters DF2ET
3+
* Copyright (C) 2020 by Jonathan Naylor G4KLX
34
*
45
* This program is free software; you can redistribute it and/or modify
56
* it under the terms of the GNU General Public License as published by
@@ -32,7 +33,7 @@ class CCalPOCSAG {
3233

3334
void process();
3435

35-
uint8_t write(const uint8_t* data, uint8_t length);
36+
uint8_t write(const uint8_t* data, uint16_t length);
3637

3738
private:
3839
POCSAGCAL m_state;

DMRDMOTX.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2017,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
* Copyright (C) 2017 by Andy Uribe CA6JAU
55
*
@@ -104,7 +104,7 @@ void CDMRDMOTX::process()
104104
}
105105
}
106106

107-
uint8_t CDMRDMOTX::writeData(const uint8_t* data, uint8_t length)
107+
uint8_t CDMRDMOTX::writeData(const uint8_t* data, uint16_t length)
108108
{
109109
if (length != (DMR_FRAME_LENGTH_BYTES + 1U))
110110
return 4U;

DMRDMOTX.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2015,2016,2017,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
*
55
* This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ class CDMRDMOTX {
2929
public:
3030
CDMRDMOTX();
3131

32-
uint8_t writeData(const uint8_t* data, uint8_t length);
32+
uint8_t writeData(const uint8_t* data, uint16_t length);
3333

3434
void process();
3535

DMRTX.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2017,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
* Copyright (C) 2017 by Andy Uribe CA6JAU
55
*
@@ -144,7 +144,7 @@ void CDMRTX::process()
144144
}
145145
}
146146

147-
uint8_t CDMRTX::writeData1(const uint8_t* data, uint8_t length)
147+
uint8_t CDMRTX::writeData1(const uint8_t* data, uint16_t length)
148148
{
149149
if (length != (DMR_FRAME_LENGTH_BYTES + 1U))
150150
return 4U;
@@ -168,7 +168,7 @@ uint8_t CDMRTX::writeData1(const uint8_t* data, uint8_t length)
168168
return 0U;
169169
}
170170

171-
uint8_t CDMRTX::writeData2(const uint8_t* data, uint8_t length)
171+
uint8_t CDMRTX::writeData2(const uint8_t* data, uint16_t length)
172172
{
173173
if (length != (DMR_FRAME_LENGTH_BYTES + 1U))
174174
return 4U;
@@ -192,7 +192,7 @@ uint8_t CDMRTX::writeData2(const uint8_t* data, uint8_t length)
192192
return 0U;
193193
}
194194

195-
uint8_t CDMRTX::writeShortLC(const uint8_t* data, uint8_t length)
195+
uint8_t CDMRTX::writeShortLC(const uint8_t* data, uint16_t length)
196196
{
197197
if (length != 9U)
198198
return 4U;
@@ -208,7 +208,7 @@ uint8_t CDMRTX::writeShortLC(const uint8_t* data, uint8_t length)
208208
return 0U;
209209
}
210210

211-
uint8_t CDMRTX::writeAbort(const uint8_t* data, uint8_t length)
211+
uint8_t CDMRTX::writeAbort(const uint8_t* data, uint16_t length)
212212
{
213213
if (length != 1U)
214214
return 4U;

DMRTX.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2015,2016,2017,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2016 by Colin Durbridge G4EML
44
*
55
* This program is free software; you can redistribute it and/or modify
@@ -38,11 +38,11 @@ class CDMRTX {
3838
public:
3939
CDMRTX();
4040

41-
uint8_t writeData1(const uint8_t* data, uint8_t length);
42-
uint8_t writeData2(const uint8_t* data, uint8_t length);
41+
uint8_t writeData1(const uint8_t* data, uint16_t length);
42+
uint8_t writeData2(const uint8_t* data, uint16_t length);
4343

44-
uint8_t writeShortLC(const uint8_t* data, uint8_t length);
45-
uint8_t writeAbort(const uint8_t* data, uint8_t length);
44+
uint8_t writeShortLC(const uint8_t* data, uint16_t length);
45+
uint8_t writeAbort(const uint8_t* data, uint16_t length);
4646

4747
void setStart(bool start);
4848
void setCal(bool start);

DStarTX.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2009-2017,2020 by Jonathan Naylor G4KLX
33
* Copyright (C) 2017 by Andy Uribe CA6JAU
44
*
55
* This program is free software; you can redistribute it and/or modify
@@ -277,7 +277,7 @@ void CDStarTX::process()
277277
}
278278
}
279279

280-
uint8_t CDStarTX::writeHeader(const uint8_t* header, uint8_t length)
280+
uint8_t CDStarTX::writeHeader(const uint8_t* header, uint16_t length)
281281
{
282282
if (length != DSTAR_HEADER_LENGTH_BYTES)
283283
return 4U;
@@ -296,7 +296,7 @@ uint8_t CDStarTX::writeHeader(const uint8_t* header, uint8_t length)
296296
return 0U;
297297
}
298298

299-
uint8_t CDStarTX::writeData(const uint8_t* data, uint8_t length)
299+
uint8_t CDStarTX::writeData(const uint8_t* data, uint16_t length)
300300
{
301301
if (length != DSTAR_DATA_LENGTH_BYTES)
302302
return 4U;

DStarTX.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2015,2016,2017,2020 by Jonathan Naylor G4KLX
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -27,8 +27,8 @@ class CDStarTX {
2727
public:
2828
CDStarTX();
2929

30-
uint8_t writeHeader(const uint8_t* header, uint8_t length);
31-
uint8_t writeData(const uint8_t* data, uint8_t length);
30+
uint8_t writeHeader(const uint8_t* header, uint16_t length);
31+
uint8_t writeData(const uint8_t* data, uint16_t length);
3232
uint8_t writeEOT();
3333

3434
void process();

NXDNTX.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void CNXDNTX::process()
122122
}
123123
}
124124

125-
uint8_t CNXDNTX::writeData(const uint8_t* data, uint8_t length)
125+
uint8_t CNXDNTX::writeData(const uint8_t* data, uint16_t length)
126126
{
127127
if (length != (NXDN_FRAME_LENGTH_BYTES + 1U))
128128
return 4U;

NXDNTX.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CNXDNTX {
2727
public:
2828
CNXDNTX();
2929

30-
uint8_t writeData(const uint8_t* data, uint8_t length);
30+
uint8_t writeData(const uint8_t* data, uint16_t length);
3131

3232
void process();
3333

P25TX.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void CP25TX::process()
118118
}
119119
}
120120

121-
uint8_t CP25TX::writeData(const uint8_t* data, uint8_t length)
121+
uint8_t CP25TX::writeData(const uint8_t* data, uint16_t length)
122122
{
123123
if (length < (P25_TERM_FRAME_LENGTH_BYTES + 1U))
124124
return 4U;

0 commit comments

Comments
 (0)