my new gear...

Dependencies:   mbed

Committer:
yootee
Date:
Sun Mar 27 04:39:16 2022 +0000
Revision:
2:e7b09385d197
arrc?

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yootee 2:e7b09385d197 1 #include<aircylinder.hpp>
yootee 2:e7b09385d197 2
yootee 2:e7b09385d197 3 aircylinder::aircylinder(Port port ,bool push_flag):port_(port),push_flag_(push_flag){
yootee 2:e7b09385d197 4 }
yootee 2:e7b09385d197 5
yootee 2:e7b09385d197 6 void aircylinder::push(int cylinder_num){
yootee 2:e7b09385d197 7 if(cylinder_num != 0 || cylinder_num != 1){
yootee 2:e7b09385d197 8 cylinder_num = 0;
yootee 2:e7b09385d197 9 }
yootee 2:e7b09385d197 10 DigitalOut(port_.pin[cylinder_num], push_flag_);
yootee 2:e7b09385d197 11 }
yootee 2:e7b09385d197 12
yootee 2:e7b09385d197 13 void aircylinder::pull(int cylinder_num){
yootee 2:e7b09385d197 14 if(cylinder_num != 0 || cylinder_num != 1){
yootee 2:e7b09385d197 15 cylinder_num = 0;
yootee 2:e7b09385d197 16 }
yootee 2:e7b09385d197 17 DigitalOut(port_.pin[cylinder_num] ,!push_flag_);
yootee 2:e7b09385d197 18 }