Commit 26804a2c authored by Sven Greiner's avatar Sven Greiner

Fix #4: Reverse levels if start high is enabled

parent db85fe4f
...@@ -180,7 +180,7 @@ void set_level(const uint8_t level) { ...@@ -180,7 +180,7 @@ void set_level(const uint8_t level) {
disable_output(); disable_output();
} else { } else {
if (options.fixed_mode) { if (options.fixed_mode) {
set_pwm(fixed_values[level - 1]); set_pwm(fixed_values[options.start_high ? FIXED_SIZE - level : level - 1]);
} else { } else {
set_pwm(ramp_values[level - 1]); set_pwm(ramp_values[level - 1]);
} }
...@@ -405,8 +405,8 @@ int main(void) { ...@@ -405,8 +405,8 @@ int main(void) {
if (options.mode_memory && output_eeprom) { if (options.mode_memory && output_eeprom) {
output = output_eeprom; output = output_eeprom;
} else { } else {
if (options.start_high) { if (!options.fixed_mode && options.start_high) {
output = options.fixed_mode ? FIXED_SIZE : RAMP_SIZE; output = RAMP_SIZE;
} else { } else {
output = 1; output = 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment