diff --git a/inc/llcc68_definitions.hpp b/inc/llcc68_definitions.hpp index 98d94d2..12e4767 100644 --- a/inc/llcc68_definitions.hpp +++ b/inc/llcc68_definitions.hpp @@ -27,7 +27,7 @@ enum LoRaBandwidth : uint8_t { BW_500_0 = 0x06, }; -inline const char *bw_to_string(const LoRaBandwidth &bw) { +inline const char *to_str(LoRaBandwidth bw) { switch (bw) { case LoRaBandwidth::BW_7_8: return "7.8kHz"; @@ -61,7 +61,7 @@ enum LoRaCodingRate : uint8_t { CR_4_8 = 0x04, }; -inline const char *cr_to_string(const LoRaCodingRate &cr) { +inline const char *to_str(LoRaCodingRate cr) { switch (cr) { case LoRaCodingRate::CR_4_5: return "4/5"; @@ -114,9 +114,9 @@ struct modulation_params_t { [[nodiscard]] auto to_string() const -> std::string { return std::format("mod_params: bw={}, sf={}, cr={}, ldr_optimize={}", - bw_to_string(static_cast(bw)), + to_str(static_cast(bw)), sf, - cr_to_string(static_cast(cr)), + to_str(static_cast(cr)), ldr_optimize ? "ON" : "OFF"); } };