From c6f14c684ac2ebd65fedef6c0ac0a7ee46e0ad53 Mon Sep 17 00:00:00 2001 From: sh123 Date: Wed, 15 Mar 2023 19:08:51 +0200 Subject: [PATCH] Update libraries --- include/config.h | 2 +- include/version.h | 2 +- platformio.ini | 15 ++++++++++----- src/audio_task.cpp | 22 +++++++++++----------- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/include/config.h b/include/config.h index 32f30a8..c3f0a47 100644 --- a/include/config.h +++ b/include/config.h @@ -8,7 +8,7 @@ #define CFG_VERSION 2 // Comment out for SX127X module usage -#define USE_SX126X +//#define USE_SX126X // Check your module name at https://github.com/jgromes/RadioLib/wiki/Modules #ifdef USE_SX126X diff --git a/include/version.h b/include/version.h index ec47048..4390f10 100644 --- a/include/version.h +++ b/include/version.h @@ -1,6 +1,6 @@ #ifndef VERSION_H #define VERSION_H -#define LORADV_VERSION "1.0.4" +#define LORADV_VERSION "1.0.5" #endif // VERSION_H diff --git a/platformio.ini b/platformio.ini index b1f5227..c704b0f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,9 +1,9 @@ [platformio] description = ESP32 LoRA DV Codec2 handheld transceiver -default_envs = esp32dev +default_envs = esp32dev_sx126x [env] -platform = espressif32 @ 5.2.0 +platform = espressif32 @ 6.1.0 framework = arduino monitor_speed = 115200 board_build.partitions = min_spiffs.csv @@ -11,8 +11,8 @@ board_build.f_cpu = 240000000L upload_protocol = esptool lib_deps = hideakitai/DebugLog @ 0.6.6 - contrem/arduino-timer @ 2.3.1 - jgromes/RadioLib @ 5.5.0 + contrem/arduino-timer @ 3.0.0 + jgromes/RadioLib @ 5.7.0 rlogiacco/CircularBuffer @ 1.3.3 sh123/esp32_codec2 @ 1.0.3 adafruit/Adafruit SSD1306 @ 2.5.7 @@ -22,5 +22,10 @@ check_flags = cppcheck: --suppress=*:*.pio\* --inline-suppr -DCPPCHECK check_skip_packages = yes -[env:esp32dev] +[env:esp32dev_sx126x] +board = esp32dev +build_flags = + -D USE_SX126X + +[env:esp32dev_sx127x] board = esp32dev diff --git a/src/audio_task.cpp b/src/audio_task.cpp index 6b26f55..81ab79a 100644 --- a/src/audio_task.cpp +++ b/src/audio_task.cpp @@ -36,13 +36,13 @@ void AudioTask::installAudio(int bytesPerSample) const .sample_rate = CfgAudioSampleRate, .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT, .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT, - .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB), - .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1, + .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_STAND_I2S), + .intr_alloc_flags = 0, .dma_buf_count = 8, .dma_buf_len = bytesPerSample, - .use_apll=0, - .tx_desc_auto_clear= true, - .fixed_mclk=-1 + .use_apll = false, + .tx_desc_auto_clear = true, + .fixed_mclk = -1 }; i2s_pin_config_t i2sSpeakerPinConfig = { .bck_io_num = config_->AudioSpkPinBclk_, @@ -61,14 +61,14 @@ void AudioTask::installAudio(int bytesPerSample) const .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX), .sample_rate = CfgAudioSampleRate, .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT, - .channel_format = I2S_CHANNEL_FMT_ONLY_RIGHT, - .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB), - .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1, + .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT, + .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_STAND_I2S), + .intr_alloc_flags = 0, .dma_buf_count = 8, .dma_buf_len = bytesPerSample, - .use_apll=0, - .tx_desc_auto_clear= true, - .fixed_mclk=-1 + .use_apll = false, + .tx_desc_auto_clear = true, + .fixed_mclk = -1 }; i2s_pin_config_t i2sMicPinConfig = { .bck_io_num = config_->AudioMicPinSck_,