Fix compilation

This commit is contained in:
Xavier Arteaga 2021-03-12 10:33:43 +01:00 committed by Xavier Arteaga
parent be8e8cbe3e
commit 1463b11bad
1 changed files with 7 additions and 4 deletions

View File

@ -416,10 +416,13 @@ bool radio::tx(rf_buffer_interface& buffer, const rf_timestamp_interface& tx_tim
if (ratio > 1 && nof_samples * ratio > tx_buffer[0].size()) {
// This is a corner case that could happen during sample rate change transitions, as it does not have a negative
// impact, log it as info.
logger.info(fmt::format("Tx number of samples ({}/{}) exceeds buffer size ({})\n",
buffer.get_nof_samples(),
buffer.get_nof_samples() * ratio,
tx_buffer[0].size()));
fmt::memory_buffer buff;
fmt::format_to(buff,
"Tx number of samples ({}/{}) exceeds buffer size ({})\n",
buffer.get_nof_samples(),
buffer.get_nof_samples() * ratio,
tx_buffer[0].size());
logger.info("%s", to_c_str(buff));
// Limit number of samples to transmit
nof_samples = tx_buffer[0].size() / ratio;