From 974c027452afa896300004795b9009b04c125ae6 Mon Sep 17 00:00:00 2001 From: jgromes Date: Mon, 27 Nov 2023 21:19:04 +0100 Subject: [PATCH] [SSTV] Reworked macro configuration system --- src/protocols/SSTV/SSTV.cpp | 10 +++++----- src/protocols/SSTV/SSTV.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/protocols/SSTV/SSTV.cpp b/src/protocols/SSTV/SSTV.cpp index 107674fd..b06df297 100644 --- a/src/protocols/SSTV/SSTV.cpp +++ b/src/protocols/SSTV/SSTV.cpp @@ -1,5 +1,5 @@ #include "SSTV.h" -#if !defined(RADIOLIB_EXCLUDE_SSTV) +#if !RADIOLIB_EXCLUDE_SSTV const SSTVMode_t Scottie1 { .visCode = RADIOLIB_SSTV_SCOTTIE_1, @@ -156,19 +156,19 @@ const SSTVMode_t PasokonP7 { SSTVClient::SSTVClient(PhysicalLayer* phy) { phyLayer = phy; - #if !defined(RADIOLIB_EXCLUDE_AFSK) + #if !RADIOLIB_EXCLUDE_AFSK audioClient = nullptr; #endif } -#if !defined(RADIOLIB_EXCLUDE_AFSK) +#if !RADIOLIB_EXCLUDE_AFSK SSTVClient::SSTVClient(AFSKClient* audio) { phyLayer = audio->phyLayer; audioClient = audio; } #endif -#if !defined(RADIOLIB_EXCLUDE_AFSK) +#if !RADIOLIB_EXCLUDE_AFSK int16_t SSTVClient::begin(const SSTVMode_t& mode) { if(audioClient == nullptr) { // this initialization method can only be used in AFSK mode @@ -292,7 +292,7 @@ uint16_t SSTVClient::getPictureHeight() const { void SSTVClient::tone(float freq, uint32_t len) { Module* mod = phyLayer->getMod(); uint32_t start = mod->hal->micros(); - #if !defined(RADIOLIB_EXCLUDE_AFSK) + #if !RADIOLIB_EXCLUDE_AFSK if(audioClient != nullptr) { audioClient->tone(freq, false); } else { diff --git a/src/protocols/SSTV/SSTV.h b/src/protocols/SSTV/SSTV.h index df73d8f2..cbf69d8c 100644 --- a/src/protocols/SSTV/SSTV.h +++ b/src/protocols/SSTV/SSTV.h @@ -3,7 +3,7 @@ #include "../../TypeDef.h" -#if !defined(RADIOLIB_EXCLUDE_SSTV) +#if !RADIOLIB_EXCLUDE_SSTV #include "../PhysicalLayer/PhysicalLayer.h" #include "../AFSK/AFSK.h" @@ -122,7 +122,7 @@ class SSTVClient { */ explicit SSTVClient(PhysicalLayer* phy); - #if !defined(RADIOLIB_EXCLUDE_AFSK) + #if !RADIOLIB_EXCLUDE_AFSK /*! \brief Constructor for AFSK mode. \param audio Pointer to the AFSK instance providing audio. @@ -141,7 +141,7 @@ class SSTVClient { */ int16_t begin(float base, const SSTVMode_t& mode); - #if !defined(RADIOLIB_EXCLUDE_AFSK) + #if !RADIOLIB_EXCLUDE_AFSK /*! \brief Initialization method for AFSK. \param mode SSTV mode to be used. Currently supported modes are Scottie1, Scottie2, @@ -182,11 +182,11 @@ class SSTVClient { */ uint16_t getPictureHeight() const; -#if !defined(RADIOLIB_GODMODE) +#if !RADIOLIB_GODMODE private: #endif PhysicalLayer* phyLayer; - #if !defined(RADIOLIB_EXCLUDE_AFSK) + #if !RADIOLIB_EXCLUDE_AFSK AFSKClient* audioClient; #endif