Skip to content

Commit 8940aa0

Browse files
authored
Merge pull request #4 from gigapod/main
Fix compiler warnings being thrown - remove debug print
2 parents e84bb35 + f67764a commit 8940aa0

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/config.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
/**
22
* @file config.h
33
* @brief Define library configurations
4-
*
5-
*
4+
*
5+
*
66
* @version 1.0
77
* @date 2024-08-08
8-
*
8+
*
99
* @license MIT
1010
* Permission is hereby granted, free of charge, to any person obtaining a copy
1111
* of this software and associated documentation files (the "Software"), to deal
1212
* in the Software without restriction, including without limitation the rights
1313
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1414
* copies of the Software, and to permit persons to whom the Software is
1515
* furnished to do so, subject to the following conditions:
16-
*
16+
*
1717
* The above copyright notice and this permission notice shall be included in all
1818
* copies or substantial portions of the Software.
19-
*
19+
*
2020
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2121
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2222
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2323
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2424
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2525
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2626
* SOFTWARE.
27-
*
27+
*
2828
* @author Felix Galindo
2929
* @contact felix.galindo@digi.com
3030
*/
@@ -40,19 +40,19 @@ extern "C"
4040
#include "port.h"
4141

4242
// Constants
43-
#define UART_READ_TIMEOUT_MS 3000
43+
#define UART_READ_TIMEOUT_MS 3000
4444
#define UART_WRITE_TIMEOUT_MS 10
4545

4646
#define API_FRAME_DEBUG_PRINT_ENABLED 0
4747
#if API_FRAME_DEBUG_PRINT_ENABLED
48-
#define APIFrameDebugPrint(...) portDebugPrintf(__VA_ARGS__)
48+
#define APIFrameDebugPrint(...) portDebugPrintf(__VA_ARGS__)
4949
#else
5050
#define APIFrameDebugPrint(...)
5151
#endif
5252

53-
#define XBEE_DEBUG_PRINT_ENABLED 1
53+
#define XBEE_DEBUG_PRINT_ENABLED 0
5454
#if XBEE_DEBUG_PRINT_ENABLED
55-
#define XBEEDebugPrintEnabled(...) portDebugPrintf(__VA_ARGS__)
55+
#define XBEEDebugPrintEnabled(...) portDebugPrintf(__VA_ARGS__)
5656
#else
5757
#define XBEEDebugPrintEnabled(...)
5858
#endif

src/xbee_lr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ bool XBeeLRSetJoinRX1Delay(XBee* self, const uint32_t value) {
477477
uint8_t responseLength;
478478
uint8_t paramLength = sizeof(value);
479479

480-
int status = apiSendAtCommandAndGetResponse(self, AT_J1, &value, paramLength, response, &responseLength, 5000);
480+
int status = apiSendAtCommandAndGetResponse(self, AT_J1, (const uint8_t*)&value, paramLength, response, &responseLength, 5000);
481481

482482
if (status != API_SEND_SUCCESS) {
483483
XBEEDebugPrintEnabled("Failed to set Join RX1 Delay\n");
@@ -500,7 +500,7 @@ bool XBeeLRSetJoinRX2Delay(XBee* self, const uint32_t value) {
500500
uint8_t responseLength;
501501
uint8_t paramLength = sizeof(value);
502502

503-
int status = apiSendAtCommandAndGetResponse(self, AT_J2, &value, paramLength, response, &responseLength, 5000);
503+
int status = apiSendAtCommandAndGetResponse(self, AT_J2, (const uint8_t*)&value, paramLength, response, &responseLength, 5000);
504504

505505
if (status != API_SEND_SUCCESS) {
506506
XBEEDebugPrintEnabled("Failed to set Join RX2 Delay\n");
@@ -523,7 +523,7 @@ bool XBeeLRSetRX1Delay(XBee* self, const uint32_t value) {
523523
uint8_t responseLength;
524524
uint8_t paramLength = sizeof(value);
525525

526-
int status = apiSendAtCommandAndGetResponse(self, AT_D1, &value, paramLength, response, &responseLength, 5000);
526+
int status = apiSendAtCommandAndGetResponse(self, AT_D1, (const uint8_t*)&value, paramLength, response, &responseLength, 5000);
527527

528528
if (status != API_SEND_SUCCESS) {
529529
XBEEDebugPrintEnabled("Failed to set RX1 Delay\n");
@@ -546,7 +546,7 @@ bool XBeeLRSetRX2Delay(XBee* self, const uint32_t value) {
546546
uint8_t responseLength;
547547
uint8_t paramLength = sizeof(value);
548548

549-
int status = apiSendAtCommandAndGetResponse(self, AT_D2, &value, paramLength, response, &responseLength, 5000);
549+
int status = apiSendAtCommandAndGetResponse(self, AT_D2, (const uint8_t*)&value, paramLength, response, &responseLength, 5000);
550550

551551
if (status != API_SEND_SUCCESS) {
552552
XBEEDebugPrintEnabled("Failed to set RX2 Delay\n");

0 commit comments

Comments
 (0)