Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to:
Problem
Some lucky people have such lovely bright and clear signal that they need to make the illumination LED as dim as possible.
The current
led0
configuration maps0..100
->0..255
, which naturally reduces the number of possible brightness states from 256 to 101, the relevant line in the software is here:Miniscope-DAQ-QT-Software/source/VideoSliderControl.qml
Line 73 in 0fecb97
So for the current settings:
displayValueScale
:-2.55
displayValueOffset
:-255
the value map created is:
Expand/collapse value map
Fix
That seems to only really be a problem on the low end, where someone could access 2/3 and 1/3 of the current minimum brightness.
The reason for wanting to constrain from 0..100 is to make proportions sensible - 100% brightness is more intuitive than the max being 255, but it seems like at the point that it's limiting functionality it might be worth expanding to the full range.
This PR is just one way of doing this without needing to recompile anything. It changes the range to 0..255, the scale to 1, and the offset to
255
for a map of(x*1)-255
Other options
examples
with aREADME.md
document in it, where we make this modified deviceConfig file an example with the full LED range and explain what it does in the README0.1
or something - this would keep the 0..100 range while allowing someone to access the full 0..255 output range, but imo it's somewhat undesirable because a lot of changes to float values would actually not change the output value at all, which would lead to bad intuition traps trying to micro-adjust values that aren't actually doing anything.v4_full_led0_range
- but that seems undesirable because we get into combinatorics of "for every variant we square the number of devices we have"Anyway what do ya think?