gein_bitton_change
Fork of petbottle_Loading by
Diff: petbottleLoading.cpp
- Revision:
- 2:7fc5c9527580
- Parent:
- 1:6cdfc10c7b1d
--- a/petbottleLoading.cpp Thu Oct 11 09:45:30 2018 +0000 +++ b/petbottleLoading.cpp Sat Oct 13 06:33:32 2018 +0000 @@ -30,10 +30,18 @@ limitSwFlag2[0] = 0; sw5flag = 0; pt.start(); + limitSW1_.rise(callback(this,&petbottleLoading::limit_sw)); + limitSW2_.rise(callback(this,&petbottleLoading::limit_sw)); + limitSW3_.rise(callback(this,&petbottleLoading::limit_sw)); } - +void petbottleLoading::limit_sw() +{ + limitSW1 = limitSW1_.read(); + limitSW2 = limitSW2_.read(); + limitSW3 = limitSW3_.read(); +} void petbottleLoading::petbottlemode(int loadingmode) { nowPals = loadingencoder.getPulses();