mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
fix leftover code,
This commit is contained in:
parent
3949889f60
commit
e518537625
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ void Rtttl::dump_config() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rtttl::play(std::string rtttl) {
|
void Rtttl::play(std::string rtttl) {
|
||||||
if (this->state_ != State::STATE_STOPPED && this->state_ != State::STATE_STOPPING) {
|
if (this->state_ != State::STATE_STOPPED) {
|
||||||
int pos = this->rtttl_.find(':');
|
int pos = this->rtttl_.find(':');
|
||||||
auto name = this->rtttl_.substr(0, pos);
|
auto name = this->rtttl_.substr(0, pos);
|
||||||
ESP_LOGW(TAG, "RTTTL Component is already playing: %s", name.c_str());
|
ESP_LOGW(TAG, "RTTTL Component is already playing: %s", name.c_str());
|
||||||
|
@ -141,7 +141,7 @@ void Rtttl::stop() {
|
||||||
if (this->speaker_->is_running()) {
|
if (this->speaker_->is_running()) {
|
||||||
this->speaker_->stop();
|
this->speaker_->stop();
|
||||||
}
|
}
|
||||||
this->set_state_(STATE_STOPPING);
|
this->set_state_(STATE_STOPPED);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
this->note_duration_ = 0;
|
this->note_duration_ = 0;
|
||||||
|
|
Loading…
Reference in a new issue