diff --git a/_build_opt_8h_source.html b/_build_opt_8h_source.html index adecc4fa..4ad99eb1 100644 --- a/_build_opt_8h_source.html +++ b/_build_opt_8h_source.html @@ -543,57 +543,62 @@ $(document).ready(function(){initNavTree('_build_opt_8h_source.html',''); initRe
455  #if defined(RADIOLIB_BUILD_ARDUINO)
456  #define RADIOLIB_DEBUG_PRINT(...) Module::serialPrintf(__VA_ARGS__)
457  #define RADIOLIB_DEBUG_PRINTLN(M, ...) Module::serialPrintf(M "\n", ##__VA_ARGS__)
-
458  #else
-
459  #if !defined(RADIOLIB_DEBUG_PRINT)
-
460  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
-
461  #endif
-
462  #if !defined(RADIOLIB_DEBUG_PRINTLN)
-
463  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
458 
+
459  // some platforms do not support printf("%f"), so it has to be done this way
+
460  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PORT.print(VAL, DECIMALS)
+
461  #else
+
462  #if !defined(RADIOLIB_DEBUG_PRINT)
+
463  #define RADIOLIB_DEBUG_PRINT(...) fprintf(RADIOLIB_DEBUG_PORT, __VA_ARGS__)
464  #endif
-
465  #endif
-
466  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
-
467 #else
-
468  #define RADIOLIB_DEBUG_PRINT(...) {}
-
469  #define RADIOLIB_DEBUG_PRINTLN(...) {}
-
470  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
-
471 #endif
-
472 
-
473 #if defined(RADIOLIB_VERBOSE)
-
474  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
-
475  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
-
476 #else
-
477  #define RADIOLIB_VERBOSE_PRINT(...) {}
-
478  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
-
479 #endif
-
480 
-
484 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
465  #if !defined(RADIOLIB_DEBUG_PRINTLN)
+
466  #define RADIOLIB_DEBUG_PRINTLN(M, ...) fprintf(RADIOLIB_DEBUG_PORT, M "\n", ##__VA_ARGS__)
+
467  #endif
+
468  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) RADIOLIB_DEBUG_PRINT("%.3f", VAL)
+
469  #endif
+
470  #define RADIOLIB_DEBUG_HEXDUMP(...) Module::hexdump(__VA_ARGS__)
+
471 #else
+
472  #define RADIOLIB_DEBUG_PRINT(...) {}
+
473  #define RADIOLIB_DEBUG_PRINTLN(...) {}
+
474  #define RADIOLIB_DEBUG_PRINT_FLOAT(VAL, DECIMALS) {}
+
475  #define RADIOLIB_DEBUG_HEXDUMP(...) {}
+
476 #endif
+
477 
+
478 #if defined(RADIOLIB_VERBOSE)
+
479  #define RADIOLIB_VERBOSE_PRINT(...) RADIOLIB_DEBUG_PRINT(__VA_ARGS__)
+
480  #define RADIOLIB_VERBOSE_PRINTLN(...) RADIOLIB_DEBUG_PRINTLN(__VA_ARGS__)
+
481 #else
+
482  #define RADIOLIB_VERBOSE_PRINT(...) {}
+
483  #define RADIOLIB_VERBOSE_PRINTLN(...) {}
+
484 #endif
485 
-
489 #if defined(RADIOLIB_CHECK_PARAMS)
-
490  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
-
491 #else
-
492  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
-
493 #endif
-
494 
-
495 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
-
496  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
-
497 #else
-
498  #define RADIOLIB_ERRATA_SX127X(...) {}
-
499 #endif
-
500 
-
501 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
-
502 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
-
503 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
-
504 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
489 #define RADIOLIB_ASSERT(STATEVAR) { if((STATEVAR) != RADIOLIB_ERR_NONE) { return(STATEVAR); } }
+
490 
+
494 #if defined(RADIOLIB_CHECK_PARAMS)
+
495  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) { if(!(((VAR) >= (MIN)) && ((VAR) <= (MAX)))) { return(ERR); } }
+
496 #else
+
497  #define RADIOLIB_CHECK_RANGE(VAR, MIN, MAX, ERR) {}
+
498 #endif
+
499 
+
500 #if defined(RADIOLIB_FIX_ERRATA_SX127X)
+
501  #define RADIOLIB_ERRATA_SX127X(...) { errataFix(__VA_ARGS__); }
+
502 #else
+
503  #define RADIOLIB_ERRATA_SX127X(...) {}
+
504 #endif
505 
-
506 // version definitions
-
507 #define RADIOLIB_VERSION_MAJOR (0x06)
-
508 #define RADIOLIB_VERSION_MINOR (0x02)
-
509 #define RADIOLIB_VERSION_PATCH (0x00)
-
510 #define RADIOLIB_VERSION_EXTRA (0x00)
-
511 
-
512 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
-
513 
-
514 #endif
+
506 // these macros are usually defined by Arduino, but some platforms undef them, so its safer to use our own
+
507 #define RADIOLIB_MIN(a,b) ((a)<(b)?(a):(b))
+
508 #define RADIOLIB_MAX(a,b) ((a)>(b)?(a):(b))
+
509 #define RADIOLIB_ABS(x) ((x)>0?(x):-(x))
+
510 
+
511 // version definitions
+
512 #define RADIOLIB_VERSION_MAJOR (0x06)
+
513 #define RADIOLIB_VERSION_MINOR (0x02)
+
514 #define RADIOLIB_VERSION_PATCH (0x00)
+
515 #define RADIOLIB_VERSION_EXTRA (0x00)
+
516 
+
517 #define RADIOLIB_VERSION ((RADIOLIB_VERSION_MAJOR << 24) | (RADIOLIB_VERSION_MINOR << 16) | (RADIOLIB_VERSION_PATCH << 8) | (RADIOLIB_VERSION_EXTRA))
+
518 
+
519 #endif
diff --git a/_lo_ra_w_a_n_8h_source.html b/_lo_ra_w_a_n_8h_source.html index 31108ba1..6982da91 100644 --- a/_lo_ra_w_a_n_8h_source.html +++ b/_lo_ra_w_a_n_8h_source.html @@ -470,14 +470,14 @@ $(document).ready(function(){initNavTree('_lo_ra_w_a_n_8h_source.html',''); init
LoRaWANNode
LoRaWAN-compatible node (class A device).
Definition: LoRaWAN.h:278
LoRaWANNode::beginOTAA
int16_t beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t *nwkKey, uint8_t *appKey, bool force=false)
Join network by performing over-the-air activation. By this procedure, the device will perform an exc...
Definition: LoRaWAN.cpp:67
LoRaWANNode::FSK
bool FSK
Set to true to force the node to only use FSK channels. Set to false by default.
Definition: LoRaWAN.h:281
-
LoRaWANNode::beginAPB
int16_t beginAPB(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:334
-
LoRaWANNode::setDeviceStatus
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:777
-
LoRaWANNode::downlink
int16_t downlink(uint8_t *data, size_t *len)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:520
+
LoRaWANNode::beginAPB
int16_t beginAPB(uint32_t addr, uint8_t *nwkSKey, uint8_t *appSKey, uint8_t *fNwkSIntKey=NULL, uint8_t *sNwkSIntKey=NULL)
Join network by performing activation by personalization. In this procedure, all necessary configurat...
Definition: LoRaWAN.cpp:338
+
LoRaWANNode::setDeviceStatus
void setDeviceStatus(uint8_t battLevel)
Set device status.
Definition: LoRaWAN.cpp:781
+
LoRaWANNode::downlink
int16_t downlink(uint8_t *data, size_t *len)
Wait for downlink from the server in either RX1 or RX2 window.
Definition: LoRaWAN.cpp:524
LoRaWANNode::numChannels
int8_t numChannels
Number of supported channels. Some band plans only support a subset of available channels....
Definition: LoRaWAN.h:293
LoRaWANNode::wipe
void wipe()
Wipe internal persistent parameters. This will reset all counters and saved variables,...
Definition: LoRaWAN.cpp:42
LoRaWANNode::startChannel
int8_t startChannel
Starting channel offset. Some band plans only support a subset of available channels....
Definition: LoRaWAN.h:287
LoRaWANNode::LoRaWANNode
LoRaWANNode(PhysicalLayer *phy, const LoRaWANBand_t *band)
Default constructor.
Definition: LoRaWAN.cpp:33
-
LoRaWANNode::uplink
int16_t uplink(const char *str, uint8_t port)
Send a message to the server.
Definition: LoRaWAN.cpp:363
+
LoRaWANNode::uplink
int16_t uplink(const char *str, uint8_t port)
Send a message to the server.
Definition: LoRaWAN.cpp:367
LoRaWANNode::begin
int16_t begin()
Join network by loading information from persistent storage.
Definition: LoRaWAN.cpp:47
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:34
LoRaWANBand_t
Structure to save information about LoRaWAN band.
Definition: LoRaWAN.h:208