The old implementation does a lot of busy waiting, many times several milliseconds. Try to replace this behavior with the use of thread notifications. The adjustments of the digital potentiometer seem to be arbitrary. Figure out timings and delays for that component.
The old implementation does a lot of busy waiting, many times several milliseconds. Try to replace this behavior with the use of thread notifications. The adjustments of the digital potentiometer seem to be arbitrary. Figure out timings and delays for that component.