Fix behaviour of PID filter in low-priority Controllers 3ac5c31
This commit fixes a bug that would happen when a Controller that is using a PID filter has lower priority than another Controller; e.g. FixActivePower-Controller with higher priority than PeakShaving-Controller.
1st: there was an issue that low+high limit would not be applied when they are equal - which happens e.g. after FixActivePower
2nd: target value is now reduced to low+high limits before calculation starts; this avoids an always increasing error in above constellation
3rd: when input already equals target; stop early as we are already there
also refactored "applyPidFilter" to use integers only; this is required for the "error = 0" clause to work properly