mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
Fix & binaries
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -499,16 +499,16 @@ void Input::analogPoll() {
|
|||||||
}}
|
}}
|
||||||
else
|
else
|
||||||
//if (abs(mappedInputVal - store->currentValue)>Noize || mappedInputVal == min || mappedInputVal ==max) // value changed >ANALOG_NOIZE
|
//if (abs(mappedInputVal - store->currentValue)>Noize || mappedInputVal == min || mappedInputVal ==max) // value changed >ANALOG_NOIZE
|
||||||
if (abs(inputVal - store->currentValue)>Noize || mappedInputVal == min || mappedInputVal ==max) // value changed >ANALOG_NOIZE
|
if (abs(inputVal - store->currentValue)>Noize ) // value changed >ANALOG_NOIZE
|
||||||
store->bounce = 0;
|
store->bounce = 0;
|
||||||
else // no change
|
else // no change
|
||||||
if (store->bounce<ANALOG_STATE_ATTEMPTS) store->bounce ++;
|
if (store->bounce<ANALOG_STATE_ATTEMPTS) store->bounce ++;
|
||||||
|
|
||||||
if (store->bounce<ANALOG_STATE_ATTEMPTS-1 && (mappedInputVal != store->currentValue)) //confirmed change
|
if ((store->bounce<ANALOG_STATE_ATTEMPTS-1 || mappedInputVal == min || mappedInputVal ==max )&& (inputVal != store->currentValue))//confirmed change
|
||||||
{
|
{
|
||||||
onAnalogChanged(mappedInputVal/100.);
|
onAnalogChanged(mappedInputVal/100.);
|
||||||
// store->currentValue = mappedInputVal;
|
// store->currentValue = mappedInputVal;
|
||||||
store->currentValue = mappedInputVal;
|
store->currentValue = inputVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user