Fix calls to speaker_play_click
This commit is contained in:
@@ -45,7 +45,7 @@ api:
|
||||
then:
|
||||
- lambda: |-
|
||||
rtttl_speaker->stop();
|
||||
if (rtttl_speaker_gain->state > 0) {
|
||||
if (speaker_volume->state > 0) {
|
||||
ESP_LOGI("api", "Play tone: '%s'", tone.c_str());
|
||||
rtttl_speaker->play(tone.c_str());
|
||||
}
|
||||
@@ -56,7 +56,7 @@ esphome:
|
||||
- -D TX_ULTIMATE_EASY_ADDON_SPEAKER
|
||||
|
||||
number:
|
||||
- id: rtttl_speaker_gain
|
||||
- id: speaker_volume
|
||||
name: Sound - Volume
|
||||
platform: template
|
||||
max_value: 100
|
||||
@@ -72,13 +72,9 @@ number:
|
||||
optimistic: true
|
||||
set_action:
|
||||
then:
|
||||
- lambda: |-
|
||||
rtttl_speaker->set_gain((100-(x/10.0f))/100.0f);
|
||||
std::string tone_volume_change = "${tone_volume_change}";
|
||||
// Play sound if tone_volume_change is not "none"
|
||||
if (x > 0 and !tone_volume_change.empty() and tone_volume_change != "none")
|
||||
rtttl_speaker->play(tone_volume_change);
|
||||
rtttl_speaker->dump_config();
|
||||
- speaker.volume_set:
|
||||
id: speaker_embedded
|
||||
volume: !lambda return x/100.0f;
|
||||
|
||||
rtttl:
|
||||
- id: rtttl_speaker
|
||||
@@ -124,7 +120,7 @@ script:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (sl_touch_speaker_feedback->state != "Disabled")
|
||||
vibrate->execute();
|
||||
speaker_play_click->execute();
|
||||
|
||||
- id: !extend touch_on_press
|
||||
then:
|
||||
@@ -135,7 +131,7 @@ script:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (sl_touch_speaker_feedback->state == "On press" or sl_touch_speaker_feedback->state == "Always")
|
||||
vibrate->execute();
|
||||
speaker_play_click->execute();
|
||||
|
||||
- id: !extend touch_on_release
|
||||
then:
|
||||
@@ -146,7 +142,7 @@ script:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (sl_touch_speaker_feedback->state == "On release" or sl_touch_speaker_feedback->state == "Always")
|
||||
vibrate->execute();
|
||||
speaker_play_click->execute();
|
||||
|
||||
select:
|
||||
- id: sl_touch_speaker_feedback
|
||||
|
||||
@@ -74,18 +74,6 @@ esp32:
|
||||
flash_size: 8MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
#sdkconfig_options:
|
||||
#CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: "y"
|
||||
#CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: "y"
|
||||
#CONFIG_ESP32_REV_MIN_3: "y"
|
||||
#CONFIG_ESPTOOLPY_FLASHSIZE_8MB: "y"
|
||||
#CONFIG_MBEDTLS_DYNAMIC_BUFFER: "y"
|
||||
#CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT: "y"
|
||||
#CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA: "y"
|
||||
#CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC: "y"
|
||||
#CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY: "y"
|
||||
#CONFIG_SPIRAM_RODATA: "y"
|
||||
#CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: "y"
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
@@ -205,7 +193,7 @@ script:
|
||||
ESP_LOGCONFIG("core", "TX Ultimate firmware version: ${version}");
|
||||
|
||||
// Framework detection
|
||||
#ifdef ARDUINO
|
||||
#ifdef USE_ARDUINO
|
||||
ESP_LOGCONFIG("core", "Framework: Arduino");
|
||||
#elif defined(USE_ESP_IDF)
|
||||
ESP_LOGCONFIG("core", "Framework: ESP-IDF");
|
||||
|
||||
Reference in New Issue
Block a user