mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 10:12:52 +00:00
Prefix the new error value with the enum name
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user