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

🐛 Docs incorrectly state optical sensor methods aren't available #6

Closed
NoahK216 opened this issue Feb 19, 2025 · 1 comment
Closed
Labels
easy first contribution recommended task for potential contributors wanting to dip their toes in ready this issue is ready to be worked on

Comments

@NoahK216
Copy link

Referring to purduesigbots/pros#624

Describe the bug
Certain methods on the optical sensor (such as optical_get_hue, optical_get_saturation, optical_get_brightness, optical_get_proximity) claim that the methods are "not available" while gesture detection mode is enabled (interestingly, they never describe what's returned by these functions if the methods are called in this state).

optical_get_saturation:

This is not available if gestures are being detected. Saturation has a range of 0 to 1.0

However, from testing on physical hardware, this claim seems to be incorrect. All RGBC-related functions work fine, even when gestures are being detected. My test procedure is outlined here.

To Reproduce

pros::Optical sensor(1);
sensor.enable_gesture(); // Gesture detection is now enabled.
printf("%lf\n", sensor.get_hue()); // Should work fine

Expected behavior
Docs should not claim that these methods are inaccessible, and elaborate further on gesture detection mode.

  • It's currently unclear to me why there's actually a toggle for gesture detection in the first place, actually. If everything works with it enabled, then what's the harm keeping it on always? Does having it enabled degrade the sensor's RGBC readings? Is it a measure to save on power consumption? There's no way to know, and I haven't been able to find a concrete answer regarding this anywhere.

Screenshots
Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 23H2 (26020.1000)

Additional context
None

@NoahK216 NoahK216 added the bug label Feb 19, 2025
@SizzinSeal SizzinSeal changed the title 🐛[BUG(docs)] - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. 🐛[BUG] - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. Feb 20, 2025
@SizzinSeal SizzinSeal changed the title 🐛[BUG] - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. 🐛 - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. Feb 20, 2025
@SizzinSeal SizzinSeal changed the title 🐛 - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. 🐛 Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. Feb 20, 2025
@SizzinSeal SizzinSeal added this to the No More Upstream Bugs milestone Feb 23, 2025
@SizzinSeal SizzinSeal added ready this issue is ready to be worked on and removed bug labels Feb 24, 2025
@SizzinSeal SizzinSeal removed this from the No More Upstream Bugs milestone Feb 24, 2025
@SizzinSeal SizzinSeal changed the title 🐛 Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. 🐛 Docs incorrectly state optical sensor methods aren't available Feb 24, 2025
@SizzinSeal SizzinSeal added the easy first contribution recommended task for potential contributors wanting to dip their toes in label Mar 2, 2025
@SizzinSeal
Copy link
Member

The API has been nuked so this is no longer an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy first contribution recommended task for potential contributors wanting to dip their toes in ready this issue is ready to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants