We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The resolution value _writeResolution, set by analogWriteResolution(), is shared by the DAC and PWM. There is no reason why this needs to be so.
I recommend the following changes to fix this:
28c31,32 < static int _writeResolution = 8; --- > static int _writeResolution_DAC = 8; > static int _writeResolution_PWM = 8; 74c78,89 < _writeResolution = res; --- > _writeResolution_DAC = res; > _writeResolution_PWM = res; > } > > void analogWriteResolution_DAC(int res) > { > _writeResolution_DAC = res; > } > > void analogWriteResolution_PWM(int res) > { > _writeResolution_PWM = res; 207c240 < value = mapResolution(value, _writeResolution, 10); --- > value = mapResolution(value, _writeResolution_DAC, 10); 219c252 < value = mapResolution(value, _writeResolution, 16); --- > value = mapResolution(value, _writeResolution_PWM, 16);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The resolution value _writeResolution, set by analogWriteResolution(), is shared by the DAC and PWM. There is no reason why this needs to be so.
I recommend the following changes to fix this:
The text was updated successfully, but these errors were encountered: