![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
actuator/airsylinder.cpp
- Committer:
- yootee
- Date:
- 22 months ago
- Revision:
- 22:394337a4205a
- Parent:
- 2:e7b09385d197
File content as of revision 22:394337a4205a:
#include<aircylinder.hpp> aircylinder::aircylinder(Port port ,bool push_flag):port_(port),push_flag_(push_flag){ } void aircylinder::push(int cylinder_num){ if(cylinder_num != 0 || cylinder_num != 1){ cylinder_num = 0; } DigitalOut(port_.pin[cylinder_num], push_flag_); } void aircylinder::pull(int cylinder_num){ if(cylinder_num != 0 || cylinder_num != 1){ cylinder_num = 0; } DigitalOut(port_.pin[cylinder_num] ,!push_flag_); }