mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
SM2135 - Use standard channel ordering. (#6573)
This commit is contained in:
parent
abc09a15c3
commit
5a093acbf5
1 changed files with 10 additions and 10 deletions
|
@ -106,23 +106,23 @@ void SM2135::loop() {
|
|||
delay(1);
|
||||
this->sm2135_start_();
|
||||
this->write_byte_(SM2135_ADDR_C);
|
||||
this->write_byte_(this->pwm_amounts_[4]); // Warm
|
||||
this->write_byte_(this->pwm_amounts_[3]); // Cold
|
||||
this->write_byte_(this->pwm_amounts_[3]);
|
||||
this->write_byte_(this->pwm_amounts_[4]);
|
||||
} else {
|
||||
// Color
|
||||
|
||||
this->write_byte_(SM2135_RGB);
|
||||
this->write_byte_(this->pwm_amounts_[1]); // Green
|
||||
this->write_byte_(this->pwm_amounts_[0]); // Red
|
||||
this->write_byte_(this->pwm_amounts_[2]); // Blue
|
||||
this->write_byte_(this->pwm_amounts_[0]);
|
||||
this->write_byte_(this->pwm_amounts_[1]);
|
||||
this->write_byte_(this->pwm_amounts_[2]);
|
||||
}
|
||||
} else {
|
||||
this->write_byte_(SM2135_RGB);
|
||||
this->write_byte_(this->pwm_amounts_[1]); // Green
|
||||
this->write_byte_(this->pwm_amounts_[0]); // Red
|
||||
this->write_byte_(this->pwm_amounts_[2]); // Blue
|
||||
this->write_byte_(this->pwm_amounts_[4]); // Warm
|
||||
this->write_byte_(this->pwm_amounts_[3]); // Cold
|
||||
this->write_byte_(this->pwm_amounts_[0]);
|
||||
this->write_byte_(this->pwm_amounts_[1]);
|
||||
this->write_byte_(this->pwm_amounts_[2]);
|
||||
this->write_byte_(this->pwm_amounts_[3]);
|
||||
this->write_byte_(this->pwm_amounts_[4]);
|
||||
}
|
||||
|
||||
this->sm2135_stop_();
|
||||
|
|
Loading…
Reference in a new issue