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

🐛[BUG(docs)] - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. #624

Open
Tropix126 opened this issue Jan 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Tropix126
Copy link

Tropix126 commented Jan 14, 2024

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

@Tropix126 Tropix126 added the bug Something isn't working label Jan 14, 2024
@Tropix126 Tropix126 changed the title [DOCS] - Docs incorrectly claim that certain optical sensor methods are uncallable with gesture detection enabled. 🐛[BUG(docs)] - Docs incorrectly claim that certain optical sensor methods are uncallable with gesture detection enabled. Jan 14, 2024
@Tropix126 Tropix126 changed the title 🐛[BUG(docs)] - Docs incorrectly claim that certain optical sensor methods are uncallable with gesture detection enabled. 🐛[BUG(docs)] - Docs incorrectly claim that certain optical sensor methods are not available with gesture detection enabled. Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant