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.
Diff: PwmServo.cpp
- Revision:
- 5:8223f5a154e2
- Parent:
- 0:916047fa0d8b
- Child:
- 6:8364e8639b4e
--- a/PwmServo.cpp Tue Oct 14 16:15:11 2014 +0000 +++ b/PwmServo.cpp Wed Oct 15 10:21:51 2014 +0000 @@ -1,14 +1,15 @@ -/* - - Controller firmware for CaitSithDanger - - Kyoto-Densou-An 2014 - - Author : yishii -*/ #include <mbed.h> #include <PwmServo.h> +/** + * サーボ制御基底クラス + * Kyoto-Densou-An 2014 + * @author yishii + */ + +/** + * コンストラクタ + */ PwmServo::PwmServo(PinName pin) { pwm = new PwmOut(pin); @@ -16,11 +17,17 @@ pwm->write(0.20); } +/** + * デストラクタ + */ PwmServo::~PwmServo() { delete pwm; } +/** + * 角度設定 + */ void PwmServo::setAngle(float angle) { //pwm->pulsewidth(((angle/180) + 1) / 1000);