photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

Don't scream at me when PhotonLib and PhotonVision patch versions are not equal

Open MarkGhebrial opened this issue 3 years ago • 2 comments

PR #302 causes PhotonLib to throw errors when its version is out of sync with the PV version running on the coprocessor. However, it's safe to assume that no breaking change would occur between patch revision numbers.

For example, PhotonLib v2022.1.6 prints a huge stack trace every second or so when I'm using PhotonVision v2022.1.5, which is not only annoying, but causes my robot code to exceed the 20ms loop time.

I'd appreciate any of the following changes:

  1. Make PhotonLib ignore patch versions as long as the year and minor versions are OK
  2. Allow the user of PhotonLib to turn off version mismatch warnings
  3. Don't print the entire stack trace

MarkGhebrial avatar Mar 26 '22 04:03 MarkGhebrial

The version check can be disabled with PhotonCamera::SetVersionCheckEnabled.

auscompgeek avatar Mar 27 '22 11:03 auscompgeek

Another thing we can do is only print it once instead of every loop.

Bankst avatar Mar 27 '22 15:03 Bankst

Closing as we have a way right now to disable and limit the number of warnings.

mcm001 avatar Jan 01 '23 03:01 mcm001