From 10f11aac885c0ea95c0124ec3ab1e5728a7d73ae Mon Sep 17 00:00:00 2001 From: jgromes Date: Tue, 30 Jun 2020 10:46:04 +0200 Subject: [PATCH] [SSTV] Reworked driver exclusion --- src/protocols/SSTV/SSTV.cpp | 5 +++++ src/protocols/SSTV/SSTV.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/protocols/SSTV/SSTV.cpp b/src/protocols/SSTV/SSTV.cpp index 4bc16902..73b9b1d9 100644 --- a/src/protocols/SSTV/SSTV.cpp +++ b/src/protocols/SSTV/SSTV.cpp @@ -1,4 +1,5 @@ #include "SSTV.h" +#if !defined(RADIOLIB_EXCLUDE_SSTV) const SSTVMode_t Scottie1 { .visCode = SSTV_SCOTTIE_1, @@ -158,10 +159,12 @@ SSTVClient::SSTVClient(PhysicalLayer* phy) { _audio = nullptr; } +#if !defined(RADIOLIB_EXCLUDE_AFSK) SSTVClient::SSTVClient(AFSKClient* audio) { _phy = audio->_phy; _audio = audio; } +#endif int16_t SSTVClient::begin(SSTVMode_t mode, float correction) { if(_audio == nullptr) { @@ -290,3 +293,5 @@ void SSTVClient::tone(float freq, uint32_t len) { yield(); } } + +#endif diff --git a/src/protocols/SSTV/SSTV.h b/src/protocols/SSTV/SSTV.h index 4c6777d0..1ab9225b 100644 --- a/src/protocols/SSTV/SSTV.h +++ b/src/protocols/SSTV/SSTV.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_SSTV_H +#if !defined(_RADIOLIB_SSTV_H) && !defined(RADIOLIB_EXCLUDE_SSTV) #define _RADIOLIB_SSTV_H #include "../../TypeDef.h" @@ -123,12 +123,14 @@ class SSTVClient { */ SSTVClient(PhysicalLayer* phy); + #if !defined(RADIOLIB_EXCLUDE_AFSK) /*! \brief Constructor for AFSK mode. \param audio Pointer to the AFSK instance providing audio. */ SSTVClient(AFSKClient* phy); + #endif // basic methods @@ -184,7 +186,11 @@ class SSTVClient { private: #endif PhysicalLayer* _phy; + #if !defined(RADIOLIB_EXCLUDE_AFSK) AFSKClient* _audio; + #else + void* _audio; + #endif uint32_t _base; SSTVMode_t _mode;