change value of threshold in photogate class