Remove gang_count_plural_suffix and set audio channel to mono
This commit is contained in:
@@ -29,7 +29,6 @@ substitutions:
|
|||||||
|
|
||||||
DUMP_CONFIG_CALLER_DELAY: 10s # Delay to dump config after requested
|
DUMP_CONFIG_CALLER_DELAY: 10s # Delay to dump config after requested
|
||||||
|
|
||||||
|
|
||||||
api:
|
api:
|
||||||
id: api_server
|
id: api_server
|
||||||
on_client_connected:
|
on_client_connected:
|
||||||
@@ -101,11 +100,6 @@ globals:
|
|||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
|
|
||||||
- id: gang_count_plural_suffix
|
|
||||||
type: std::string
|
|
||||||
restore_value: true
|
|
||||||
max_restore_data_length: 3
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: DEBUG
|
level: DEBUG
|
||||||
|
|
||||||
@@ -157,7 +151,6 @@ script:
|
|||||||
if (id(gang_count) < 1 || id(gang_count) > 4) {
|
if (id(gang_count) < 1 || id(gang_count) > 4) {
|
||||||
ESP_LOGE("core_hw_leds", "Invalid number of gangs: %" PRIu8, id(gang_count));
|
ESP_LOGE("core_hw_leds", "Invalid number of gangs: %" PRIu8, id(gang_count));
|
||||||
}
|
}
|
||||||
id(gang_count_plural_suffix) = id(gang_count) > 1 ? "s" : "";
|
|
||||||
|
|
||||||
- id: boot_sequence
|
- id: boot_sequence
|
||||||
mode: restart
|
mode: restart
|
||||||
@@ -193,7 +186,7 @@ script:
|
|||||||
ESP_LOGCONFIG("core", "Model format (selected): %s", sl_tx_model_format->state.c_str());
|
ESP_LOGCONFIG("core", "Model format (selected): %s", sl_tx_model_format->state.c_str());
|
||||||
ESP_LOGCONFIG("core", "Model format (detected): %s", id(is_us_model) ? "US" : "EU");
|
ESP_LOGCONFIG("core", "Model format (detected): %s", id(is_us_model) ? "US" : "EU");
|
||||||
ESP_LOGCONFIG("core", "Gangs (selected): %s", sl_tx_model_gang->state.c_str());
|
ESP_LOGCONFIG("core", "Gangs (selected): %s", sl_tx_model_gang->state.c_str());
|
||||||
ESP_LOGCONFIG("core", "Gangs (detected): %" PRIu8 "-Gang%s", id(gang_count), id(gang_count_plural_suffix).c_str());
|
ESP_LOGCONFIG("core", "Gangs (detected): %" PRIu8 "-Gang%s", id(gang_count), id(gang_count) > 1 ? "s" : "");
|
||||||
|
|
||||||
// System state
|
// System state
|
||||||
if (bs_pending_restart->state)
|
if (bs_pending_restart->state)
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
##### - For normal system use, modifications to this file are NOT required. #####
|
##### - For normal system use, modifications to this file are NOT required. #####
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
---
|
---
|
||||||
|
substitutions:
|
||||||
|
SWITCH_AUDIO_AMPLIFIER_RESTORE_MODE: RESTORE_DEFAULT_ON
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
platformio_options:
|
platformio_options:
|
||||||
build_flags:
|
build_flags:
|
||||||
@@ -35,13 +38,13 @@ script:
|
|||||||
ESP_LOGCONFIG(ESPHOME_PROJECT_NAME, " - Standard - Hardware - Audio");
|
ESP_LOGCONFIG(ESPHOME_PROJECT_NAME, " - Standard - Hardware - Audio");
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- id: sw_enable_audio
|
- id: sw_audio_amplifier
|
||||||
name: Enable Audio
|
name: Audio Amplifier
|
||||||
platform: gpio
|
platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO26
|
number: GPIO26
|
||||||
inverted: true
|
inverted: false
|
||||||
restore_mode: RESTORE_DEFAULT_ON
|
restore_mode: ${SWITCH_AUDIO_AMPLIFIER_RESTORE_MODE}
|
||||||
internal: true
|
internal: true
|
||||||
entity_category: config
|
entity_category: config
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ speaker:
|
|||||||
i2s_dout_pin: GPIO15
|
i2s_dout_pin: GPIO15
|
||||||
i2s_audio_id: if_i2s_audio
|
i2s_audio_id: if_i2s_audio
|
||||||
i2s_comm_fmt: stand_msb
|
i2s_comm_fmt: stand_msb
|
||||||
channel: stereo
|
channel: mono
|
||||||
timeout: never
|
timeout: never
|
||||||
bits_per_sample: 16bit
|
bits_per_sample: 16bit
|
||||||
sample_rate: 48000
|
sample_rate: 48000
|
||||||
|
|||||||
Reference in New Issue
Block a user