mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
jsn_sr04t component: RCWL-1655 code quality fix
Handle missing enumeration value by default case in switch statement though it is unreachable
This commit is contained in:
parent
584334fa15
commit
a0ab353c07
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ void Jsnsr04tComponent::check_buffer_() {
|
||||||
case AJ_SR04M:
|
case AJ_SR04M:
|
||||||
checksum = this->buffer_[1] + this->buffer_[2];
|
checksum = this->buffer_[1] + this->buffer_[2];
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->buffer_[3] == checksum) {
|
if (this->buffer_[3] == checksum) {
|
||||||
|
|
Loading…
Reference in a new issue