Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
actuator/airsylinder.cpp
- Committer:
- yootee
- Date:
- 2022-10-15
- 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_); }