[SSTV] Reworked macro configuration system
This commit is contained in:
parent
eddde76371
commit
974c027452
2 changed files with 10 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue