Opta Controller: Get pwm functions used wrong index#11
Merged
maidnl merged 3 commits intoarduino-libraries:mainfrom Sep 11, 2024
Merged
Opta Controller: Get pwm functions used wrong index#11maidnl merged 3 commits intoarduino-libraries:mainfrom
maidnl merged 3 commits intoarduino-libraries:mainfrom
Conversation
…of value 0..3) however to keep compatibility also the value 0..3 are accepted but deprecated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR corrects the behavior of Get PWM functions:
Those functions accepted as
chparameter a number from 0 to 3. This was not aligned with thesetPwm()function that required itschparameter to be from OA_PWM_CH_0 to OA_PWM_CH_3.Now the "get" functions accept as channel OA_PWM_CH_0 ... OA_PWM_CH_3 as parameter.
It has been maintained the old behavior (in order to maintain compatibility) so a user can continue to use 0..3 as parameter however this practice is deprecated.