@@ -63,35 +63,35 @@ int LoRaConnectionHandler::write(const uint8_t *buf, size_t size) {
63
63
if (err != size) {
64
64
switch (err) {
65
65
case LoRaCommunicationError::LORA_ERROR_ACK_NOT_RECEIVED: {
66
- Serial. println ( " Message ack was not received, the message could not be delivered" );
66
+ Debug. print (DBG_ERROR, " Message ack was not received, the message could not be delivered" );
67
67
} break ;
68
68
case LoRaCommunicationError::LORA_ERROR_GENERIC: {
69
- Serial. println ( " LoRa generic error (LORA_ERROR)" );
69
+ Debug. print (DBG_ERROR, " LoRa generic error (LORA_ERROR)" );
70
70
} break ;
71
71
case LoRaCommunicationError::LORA_ERROR_WRONG_PARAM: {
72
- Serial. println ( " LoRa malformed param error (LORA_ERROR_PARAM" );
72
+ Debug. print (DBG_ERROR, " LoRa malformed param error (LORA_ERROR_PARAM" );
73
73
} break ;
74
74
case LoRaCommunicationError::LORA_ERROR_COMMUNICATION_BUSY: {
75
- Serial. println ( " LoRa chip is busy (LORA_ERROR_BUSY)" );
75
+ Debug. print (DBG_ERROR, " LoRa chip is busy (LORA_ERROR_BUSY)" );
76
76
} break ;
77
77
case LoRaCommunicationError::LORA_ERROR_MESSAGE_OVERFLOW: {
78
- Serial. println ( " LoRa chip overflow error (LORA_ERROR_OVERFLOW)" );
78
+ Debug. print (DBG_ERROR, " LoRa chip overflow error (LORA_ERROR_OVERFLOW)" );
79
79
} break ;
80
80
case LoRaCommunicationError::LORA_ERROR_NO_NETWORK_AVAILABLE: {
81
- Serial. println ( " LoRa no network error (LORA_ERROR_NO_NETWORK)" );
81
+ Debug. print (DBG_ERROR, " LoRa no network error (LORA_ERROR_NO_NETWORK)" );
82
82
} break ;
83
83
case LoRaCommunicationError::LORA_ERROR_RX_PACKET: {
84
- Serial. println ( " LoRa rx error (LORA_ERROR_RX)" );
84
+ Debug. print (DBG_ERROR, " LoRa rx error (LORA_ERROR_RX)" );
85
85
} break ;
86
86
case LoRaCommunicationError::LORA_ERROR_REASON_UNKNOWN: {
87
- Serial. println ( " LoRa unknown error (LORA_ERROR_UNKNOWN)" );
87
+ Debug. print (DBG_ERROR, " LoRa unknown error (LORA_ERROR_UNKNOWN)" );
88
88
} break ;
89
89
case LoRaCommunicationError::LORA_ERROR_MAX_PACKET_SIZE: {
90
- Serial. println ( " Message length is bigger than max LoRa packet!" );
90
+ Debug. print (DBG_ERROR, " Message length is bigger than max LoRa packet!" );
91
91
} break ;
92
92
}
93
93
} else {
94
- Serial. println ( " Message sent correctly!" );
94
+ Debug. print (DBG_INFO, " Message sent correctly!" );
95
95
}
96
96
return err;
97
97
}
0 commit comments