From 8c970b26db1bf98c3a9496be98b78ab8fde7c225 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 6 Mar 2017 20:36:44 +0000 Subject: [PATCH] Change size of space in transmit routines. --- DMRDMOTX.cpp | 4 ++-- DMRDMOTX.h | 4 ++-- DMRTX.cpp | 6 +++--- DMRTX.h | 6 +++--- DStarTX.cpp | 2 +- DStarTX.h | 2 +- P25TX.cpp | 4 ++-- P25TX.h | 2 +- YSFTX.cpp | 4 ++-- YSFTX.h | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/DMRDMOTX.cpp b/DMRDMOTX.cpp index 3ba6830..5068f0a 100644 --- a/DMRDMOTX.cpp +++ b/DMRDMOTX.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2016 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2017 by Jonathan Naylor G4KLX * Copyright (C) 2016 by Colin Durbridge G4EML * * This program is free software; you can redistribute it and/or modify @@ -158,7 +158,7 @@ void CDMRDMOTX::writeByte(uint8_t c) io.write(STATE_DMR, outBuffer, blockSize); } -uint16_t CDMRDMOTX::getSpace() const +uint8_t CDMRDMOTX::getSpace() const { return m_fifo.getSpace() / (DMR_FRAME_LENGTH_BYTES + 2U); } diff --git a/DMRDMOTX.h b/DMRDMOTX.h index d904ca6..9afafde 100644 --- a/DMRDMOTX.h +++ b/DMRDMOTX.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX * Copyright (C) 2016 by Colin Durbridge G4EML * * This program is free software; you can redistribute it and/or modify @@ -35,7 +35,7 @@ public: void setTXDelay(uint8_t delay); - uint16_t getSpace() const; + uint8_t getSpace() const; private: CSerialRB m_fifo; diff --git a/DMRTX.cpp b/DMRTX.cpp index 684f659..68ef0c3 100644 --- a/DMRTX.cpp +++ b/DMRTX.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2016 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2017 by Jonathan Naylor G4KLX * Copyright (C) 2016 by Colin Durbridge G4EML * * This program is free software; you can redistribute it and/or modify @@ -301,12 +301,12 @@ void CDMRTX::writeByte(uint8_t c, uint8_t control) io.write(STATE_DMR, outBuffer, blockSize, controlBuffer); } -uint16_t CDMRTX::getSpace1() const +uint8_t CDMRTX::getSpace1() const { return m_fifo[0U].getSpace() / (DMR_FRAME_LENGTH_BYTES + 2U); } -uint16_t CDMRTX::getSpace2() const +uint8_t CDMRTX::getSpace2() const { return m_fifo[1U].getSpace() / (DMR_FRAME_LENGTH_BYTES + 2U); } diff --git a/DMRTX.h b/DMRTX.h index 599b8fe..7dce628 100644 --- a/DMRTX.h +++ b/DMRTX.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX * Copyright (C) 2016 by Colin Durbridge G4EML * * This program is free software; you can redistribute it and/or modify @@ -49,8 +49,8 @@ public: void process(); - uint16_t getSpace1() const; - uint16_t getSpace2() const; + uint8_t getSpace1() const; + uint8_t getSpace2() const; void setColorCode(uint8_t colorCode); diff --git a/DStarTX.cpp b/DStarTX.cpp index 3e08aa9..d9170e3 100644 --- a/DStarTX.cpp +++ b/DStarTX.cpp @@ -460,7 +460,7 @@ void CDStarTX::setTXDelay(uint8_t delay) m_txDelay = 300U + uint16_t(delay) * 6U; // 250ms + tx delay } -uint16_t CDStarTX::getSpace() const +uint8_t CDStarTX::getSpace() const { return m_buffer.getSpace() / (DSTAR_DATA_LENGTH_BYTES + 1U); } diff --git a/DStarTX.h b/DStarTX.h index 24bb7af..aaecadf 100644 --- a/DStarTX.h +++ b/DStarTX.h @@ -35,7 +35,7 @@ public: void setTXDelay(uint8_t delay); - uint16_t getSpace() const; + uint8_t getSpace() const; private: CSerialRB m_buffer; diff --git a/P25TX.cpp b/P25TX.cpp index 909fb56..3f6e1fa 100644 --- a/P25TX.cpp +++ b/P25TX.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 by Jonathan Naylor G4KLX + * Copyright (C) 2016,2017 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 @@ -189,7 +189,7 @@ void CP25TX::setTXDelay(uint8_t delay) m_txDelay = 600U + uint16_t(delay) * 12U; // 500ms + tx delay } -uint16_t CP25TX::getSpace() const +uint8_t CP25TX::getSpace() const { return m_buffer.getSpace() / P25_LDU_FRAME_LENGTH_BYTES; } diff --git a/P25TX.h b/P25TX.h index 4340d35..3a10776 100644 --- a/P25TX.h +++ b/P25TX.h @@ -33,7 +33,7 @@ public: void setTXDelay(uint8_t delay); - uint16_t getSpace() const; + uint8_t getSpace() const; private: CSerialRB m_buffer; diff --git a/YSFTX.cpp b/YSFTX.cpp index d3e20a3..47db1a8 100644 --- a/YSFTX.cpp +++ b/YSFTX.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2016 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2017 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 @@ -169,7 +169,7 @@ void CYSFTX::setTXDelay(uint8_t delay) m_txDelay = 600U + uint16_t(delay) * 12U; // 500ms + tx delay } -uint16_t CYSFTX::getSpace() const +uint8_t CYSFTX::getSpace() const { return m_buffer.getSpace() / YSF_FRAME_LENGTH_BYTES; } diff --git a/YSFTX.h b/YSFTX.h index 21fcabc..a7f7c55 100644 --- a/YSFTX.h +++ b/YSFTX.h @@ -33,7 +33,7 @@ public: void setTXDelay(uint8_t delay); - uint16_t getSpace() const; + uint8_t getSpace() const; private: CSerialRB m_buffer;