Fixed lcd positions and thresholds
Fixed compiler warnings on threshold
Various fixes