diff --git a/src/llcc68.cpp b/src/llcc68.cpp index 52e36ee..927e583 100644 --- a/src/llcc68.cpp +++ b/src/llcc68.cpp @@ -879,7 +879,9 @@ LLCC68::set_packet_params(uint16_t preamble_length, uint8_t payload_length, crc_type, iq_type, }; - return write_stream(RADIOLIB_SX126X_CMD_SET_PACKET_PARAMS, data); + auto r = write_stream(RADIOLIB_SX126X_CMD_SET_PACKET_PARAMS, data); + APP_RADIO_RETURN_ERR(r); + return fix_inverted_iq(iq_type); } expected @@ -1307,6 +1309,10 @@ LLCC68::hal_async_flush(lora_parameters_t params) { params.packet_params.hdr_type, params.packet_params.iq_type), "tx::set_packet_params"); + auto chip_type_ = hal_get_chip_type(); + APP_RADIO_RETURN_ERR_CTX(chip_type_, "tx::get_chip_type"); + APP_RADIO_RETURN_ERR_CTX(hal_set_output_power(*chip_type_, params.tx_params), + "tx::hal_set_output_power"); APP_RADIO_RETURN_ERR_CTX(set_buffer_base_address(), "tx::set_buffer_base_address"); APP_RADIO_RETURN_ERR_CTX(flush_tx_buffer(), "tx::flush_tx_buffer"); @@ -1360,6 +1366,10 @@ LLCC68::hal_gfsk_async_flush(gfsk_parameters_t params) { packet_params.payload_length = static_cast(data().tx_xfer_size); APP_RADIO_RETURN_ERR_CTX(set_gfsk_packet_params(packet_params), "gfsk_tx::set_packet_params"); + auto chip_type_ = hal_get_chip_type(); + APP_RADIO_RETURN_ERR_CTX(chip_type_, "gfsk_tx::get_chip_type"); + APP_RADIO_RETURN_ERR_CTX(hal_set_output_power(*chip_type_, params.tx_params), + "gfsk_tx::hal_set_output_power"); APP_RADIO_RETURN_ERR_CTX(set_buffer_base_address(), "gfsk_tx::set_buffer_base_address"); APP_RADIO_RETURN_ERR_CTX(flush_tx_buffer(), "gfsk_tx::flush_tx_buffer");