feat: update set_packet_type_lora function to remove parameter for LORA packet type configuration

This commit is contained in:
2025-08-25 18:07:41 +08:00
parent 3bcc5bf273
commit 536214241c

View File

@ -487,7 +487,7 @@ set_dio2_as_rf_switch(const bool en) {
* \sa SetPacketType * \sa SetPacketType
*/ */
inline Result<Unit, error_t> inline Result<Unit, error_t>
set_packet_type_lora(uint8_t sf) { set_packet_type_lora() {
Result<Unit, error_t> res; Result<Unit, error_t> res;
constexpr auto mod = RADIOLIB_SX126X_PACKET_TYPE_LORA; constexpr auto mod = RADIOLIB_SX126X_PACKET_TYPE_LORA;
uint8_t data[7]; uint8_t data[7];
@ -1348,7 +1348,7 @@ static constexpr auto begin = [](const lora_parameters_t &params) -> Result<Unit
const auto &mod_params = params.mod_params; const auto &mod_params = params.mod_params;
const auto &packet_params = params.packet_params; const auto &packet_params = params.packet_params;
res = set_packet_type_lora(mod_params.sf); res = set_packet_type_lora();
APP_RADIO_RETURN_ERR_CTX(res, "config packet type"); APP_RADIO_RETURN_ERR_CTX(res, "config packet type");
res = get_device_error_print_and_clear(TAG); res = get_device_error_print_and_clear(TAG);