From 78216afbb746875cc341d5b53185d1b2a5ecf03d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 18 Feb 2026 13:40:05 +0000 Subject: [PATCH] Clean up the ring buffer. --- .gitignore | 2 ++ RingBuffer.h | 4 ++-- RingBuffer.impl.h | 4 ++-- Version.h | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index d68e462..c1e20c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.pio +.vscode *.o obj/ bin/ diff --git a/RingBuffer.h b/RingBuffer.h index a76caf0..19d4dbf 100644 --- a/RingBuffer.h +++ b/RingBuffer.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 by Jonathan Naylor G4KLX + * Copyright (C) 2020,2026 by Jonathan Naylor G4KLX * Copyright (C) 2020 by Geoffrey Merck F4FXL - KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -50,7 +50,7 @@ public: uint16_t getData() const; - bool put(TDATATYPE item) volatile; + bool put(const TDATATYPE& item) volatile; bool get(TDATATYPE& item) volatile; diff --git a/RingBuffer.impl.h b/RingBuffer.impl.h index ddcb21c..eb8d893 100644 --- a/RingBuffer.impl.h +++ b/RingBuffer.impl.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 by Jonathan Naylor G4KLX + * Copyright (C) 2020,2026 by Jonathan Naylor G4KLX * Copyright (C) 2020 by Geoffrey Merck F4FXL - KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -56,7 +56,7 @@ template uint16_t CRingBuffer::getData() const return m_length - m_tail + m_head; } -template bool CRingBuffer::put(TDATATYPE item) volatile +template bool CRingBuffer::put(const TDATATYPE& item) volatile { if (m_full) { m_overflow = true; diff --git a/Version.h b/Version.h index 2cace49..1807021 100644 --- a/Version.h +++ b/Version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020,2021,2022,2023,2025 by Jonathan Naylor G4KLX + * Copyright (C) 2020,2021,2022,2023,2025,2026 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 @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -#define VERSION "20240113" +#define VERSION "20260218" #endif