gein_bitton_change

Fork of petbottle_Loading by naoki tanabe

Files at this revision

API Documentation at this revision

Comitter:
skouki
Date:
Sat Oct 13 06:33:32 2018 +0000
Parent:
1:6cdfc10c7b1d
Commit message:
gein change

Changed in this revision

petbottleLoading.cpp Show annotated file Show diff for this revision Revisions of this file
petbottleLoading.h Show annotated file Show diff for this revision Revisions of this file
diff -r 6cdfc10c7b1d -r 7fc5c9527580 petbottleLoading.cpp
--- 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();
diff -r 6cdfc10c7b1d -r 7fc5c9527580 petbottleLoading.h
--- a/petbottleLoading.h	Thu Oct 11 09:45:30 2018 +0000
+++ b/petbottleLoading.h	Sat Oct 13 06:33:32 2018 +0000
@@ -40,6 +40,7 @@
     
     int LoadingEncoder();
 
+    void limit_sw();
 
 private:
     /*装填機構*/
@@ -66,7 +67,7 @@
 //    Serial debug;
     Timer pt;
     float pdt;
-
+    
 
 };