mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 19:32:19 +01:00
SM2135 - Use standard channel ordering. (#6573)
This commit is contained in:
@@ -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_();
|
||||
|
Reference in New Issue
Block a user