[Hell] Reworked macro configuration system
This commit is contained in:
parent
71dbf371e7
commit
ac18a2c8f7
2 changed files with 9 additions and 9 deletions
|
@ -1,16 +1,16 @@
|
|||
#include "Hellschreiber.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_HELLSCHREIBER)
|
||||
#if !RADIOLIB_EXCLUDE_HELLSCHREIBER
|
||||
|
||||
HellClient::HellClient(PhysicalLayer* phy) {
|
||||
phyLayer = phy;
|
||||
lineFeed = " ";
|
||||
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||
#if !RADIOLIB_EXCLUDE_AFSK
|
||||
audioClient = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||
#if !RADIOLIB_EXCLUDE_AFSK
|
||||
HellClient::HellClient(AFSKClient* audio) {
|
||||
phyLayer = audio->phyLayer;
|
||||
lineFeed = " ";
|
||||
|
@ -82,7 +82,7 @@ size_t HellClient::write(uint8_t b) {
|
|||
}
|
||||
|
||||
int16_t HellClient::transmitDirect(uint32_t freq, uint32_t freqHz) {
|
||||
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||
#if !RADIOLIB_EXCLUDE_AFSK
|
||||
if(audioClient != nullptr) {
|
||||
return(audioClient->tone(freqHz));
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ int16_t HellClient::transmitDirect(uint32_t freq, uint32_t freqHz) {
|
|||
}
|
||||
|
||||
int16_t HellClient::standby() {
|
||||
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||
#if !RADIOLIB_EXCLUDE_AFSK
|
||||
if(audioClient != nullptr) {
|
||||
return(audioClient->noTone(invert));
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "../../TypeDef.h"
|
||||
|
||||
#if !defined(RADIOLIB_EXCLUDE_HELLSCHREIBER)
|
||||
#if !RADIOLIB_EXCLUDE_HELLSCHREIBER
|
||||
|
||||
#include "../PhysicalLayer/PhysicalLayer.h"
|
||||
#include "../AFSK/AFSK.h"
|
||||
|
@ -95,7 +95,7 @@ class HellClient: public RadioLibPrint {
|
|||
*/
|
||||
explicit HellClient(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.
|
||||
|
@ -132,11 +132,11 @@ class HellClient: public RadioLibPrint {
|
|||
*/
|
||||
size_t write(uint8_t b);
|
||||
|
||||
#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