SM2135 - Use standard channel ordering. (#6573)

This commit is contained in:
Cossid 2024-04-17 19:03:59 -05:00 committed by GitHub
parent abc09a15c3
commit 5a093acbf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 10 deletions

View File

@ -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_();