-
Notifications
You must be signed in to change notification settings - Fork 8
Fix proximity read frequency #22
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 proximity read frequency #22
Conversation
Previously, the module used an incorrect register to set the proximity modulator timing of the chip, rather than the number of proximity reads per second. This change updates the getter and setter for frequency to use the correct proximity rate register, and adds a modulation property to continue to provide access to that register (though it probably should be left at the default)
@ladyada as requested, here’s the PR for the proximity fix. I’ve left modulation in, even though it’s probably never going to be needed. |
oh oh, we see whats up. sorry for the mixup - can you keep the 'modulation' setting called 'frequency' but change whatcha have called 'frequency' into |
Restoring the original `frequency` property to refer to the proximity modulator timing (to keep from making a breaking change to the API) and renamed the new property to `samplerate`.
Got it. You don't want to redefine I've restored |
Black flagged some lines with extra spaces
Ok, I think this is all set, @ladyada, unless you've got more feedback. Tested on an RP2040 Trinkey and in Blinka on an RPi Zero W. |
welll... it didnt work at all before right? so is it really breaking an api if it was already broken :) |
thank u! @evaherrada this is a breaking change so plz bump major vers :) |
Updating https://github.com/adafruit/Adafruit_CircuitPython_AS7341 to 1.2.3 from 1.2.2: > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_AS7341#22 from Neradoc/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_VCNL4010 to 0.11.0 from 0.10.10: > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_VCNL4010#22 from stonehippo/proximity_frequency_read_fix Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet to 0.12.0 from 0.11.1: > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_BLE_BroadcastNet#27 from tekktrik/feature/use-ble-consts Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit to 1.4.0 from 1.3.3: > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Adafruit#19 from tekktrik/feature/use-ble-consts Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_LYWSD03MMC to 1.0.5 from 1.0.4: > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_BLE_LYWSD03MMC#4 from tekktrik/doc/add-typing Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 5.1.3 from 5.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#76 from tekktrik/doc/consolidate-readme > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#75 from tekktrik/doc/add-typing Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.22.0 from 2.21.4: > Post-patch cleanup > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#164 from FoamyGuy/scrolling_label Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 2.1.7 from 2.1.6: > Consolidate Documentation sections of README > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#78 from VPTechOps/VPTechOps
Previously, the module used an incorrect register to set the proximity
modulator timing of the chip, rather than the number of proximity
reads per second.
This change updates the getter and setter for frequency to use the
correct proximity rate register, and adds a modulation property to
continue to provide access to that register (though it probably should
be left at the default)
This should address #21