Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong setting of free_range after reset or restart (#8120) #8253

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

s-hadinger
Copy link
Collaborator

Description:

Internally, Cold/Warm white works in two modes.

In the standard mode, the total power for both white channels is limited to 100% to avoid overloading the power supply. Internally both channels are set so that their sum is 255, and the brightness is adjusted with Dimmer. Any CT command will force standard mode.

However there is a free_range mode where you can set both channel to arbitrary values and push both channels to 100% (for a total power of 200% - use at your own risk). The only way to do so is to use the Color xxyy value. free_range mode happens when the sum of both xx and yy exceed 255 (actually 259 to avoid rounding errors). As soos as you use the CT command, you go back to standard mode. Dimmer does not change standard/free_range mode.

The bug was that after Reset 5, after first flash or after Restart, the bulb was wrongly in free-range mode. This is now fixed.

After Reset 5 the default value is CW=10%, WW=0% (i.e. CT=153, Dimmer=10).

Related issue (if applicable): fixes #8120

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core Tasmota_core_stage
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

@arendst arendst merged commit 1aeff19 into arendst:development Apr 22, 2020
@s-hadinger s-hadinger deleted the pwm_2ch_8120 branch January 6, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MI Desk Lamp: Erratic led brightness
2 participants