[SSTV] Reworked driver exclusion
This commit is contained in:
parent
80fa8ba99d
commit
10f11aac88
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue