Looks like the old pot values are set to the current pot values inside the UpdateLED function (oldk2 = k2;)
The old values should only update if the pot has moved past the hysteresis value. Since you use ConditionalParameter on multiple possible targets (probably should be abstracted out) you may want to just set a 'bPotMoved' flag and use that to determine if the old value should be updated
Probably best to move that inside the UpdateKnobs function as well for clarity
Looks like the old pot values are set to the current pot values inside the UpdateLED function (oldk2 = k2;)
The old values should only update if the pot has moved past the hysteresis value. Since you use ConditionalParameter on multiple possible targets (probably should be abstracted out) you may want to just set a 'bPotMoved' flag and use that to determine if the old value should be updated
Probably best to move that inside the UpdateKnobs function as well for clarity