From f8c7844c1cb0ebafb9f0b2cc6ca6af253e2be0a0 Mon Sep 17 00:00:00 2001 From: laszloh Date: Mon, 13 Nov 2023 15:17:41 +0100 Subject: [PATCH] Remove prototype code --- src/Queues.cpp | 8 -------- src/Queues.h | 32 +------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/src/Queues.cpp b/src/Queues.cpp index cc8ec1303..85991199e 100644 --- a/src/Queues.cpp +++ b/src/Queues.cpp @@ -1,17 +1,9 @@ #include #include "settings.h" -#include "Queues.h" - #include "Log.h" -#include "Playlist.h" #include "Rfid.h" -SharedObject gVolume; -SharedObject gTrackControl; -SharedObject> gTrack; -SharedObject gRfidCard; - QueueHandle_t gVolumeQueue; QueueHandle_t gTrackQueue; QueueHandle_t gTrackControlQueue; diff --git a/src/Queues.h b/src/Queues.h index 384b85161..83aff5c30 100644 --- a/src/Queues.h +++ b/src/Queues.h @@ -4,34 +4,4 @@ extern QueueHandle_t gVolumeQueue; extern QueueHandle_t gTrackControlQueue; extern QueueHandle_t gRfidCardQueue; -void Queues_Init(void); - -#include "Rfid.h" - -#include -#include - -template -class SharedObject { -public: - SharedObject() = default; - ~SharedObject() = default; - - const T &get() { - std::lock_guard guard(mutex); - return obj; - } - - void put(T newObj) { - std::lock_guard guard(mutex); - obj = newObj; - } - -private: - T obj {}; - std::mutex mutex {}; -}; - -extern SharedObject gVolume; -extern SharedObject gTrackControl; -extern SharedObject gRfidCard; +void Queues_Init(void); \ No newline at end of file