Prefix the new error value with the enum name

This commit is contained in:
J. Nick Koston
2026-10-13 21:51:17 -10:00
parent 163fe90c62
commit c5dcbd293a
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -317,7 +317,7 @@ SX126xError SX126x::transmit_packet(const uint8_t *data, size_t len) {
// Callers such as a template number's on_value can run before setup() or after a failed setup
if (!this->is_ready()) {
ESP_LOGW(TAG, "Radio not ready, packet dropped");
return SX126xError::NOT_READY;
return SX126xError::SX126X_ERROR_NOT_READY;
}
if (this->payload_length_ > 0 && this->payload_length_ != len) {
ESP_LOGE(TAG, "Packet size does not match config");
+1 -1
View File
@@ -48,7 +48,7 @@ enum SX126xBw : uint8_t {
SX126X_BW_500000,
};
enum class SX126xError { NONE = 0, TIMEOUT, INVALID_PARAMS, NOT_READY };
enum class SX126xError { NONE = 0, TIMEOUT, INVALID_PARAMS, SX126X_ERROR_NOT_READY };
class SX126xListener {
public:
+1 -1
View File
@@ -260,7 +260,7 @@ SX127xError SX127x::transmit_packet(const uint8_t *data, size_t len) {
// Callers such as a template number's on_value can run before setup() or after a failed setup
if (!this->is_ready()) {
ESP_LOGW(TAG, "Radio not ready, packet dropped");
return SX127xError::NOT_READY;
return SX127xError::SX127X_ERROR_NOT_READY;
}
if (this->payload_length_ > 0 && this->payload_length_ != len) {
ESP_LOGE(TAG, "Packet size does not match config");
+1 -1
View File
@@ -36,7 +36,7 @@ enum SX127xBw : uint8_t {
SX127X_BW_500_0,
};
enum class SX127xError { NONE = 0, TIMEOUT, INVALID_PARAMS, NOT_READY };
enum class SX127xError { NONE = 0, TIMEOUT, INVALID_PARAMS, SX127X_ERROR_NOT_READY };
class SX127xListener {
public: