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.
Dependencies: FEP ikarashiMDC omni PID R1370
Fork of omni_sample by
Controller Class Reference
FEPを使ったコントローラのクラス More...
#include <controller.h>
Public Member Functions | |
| Controller () | |
| コンストラクタ | |
| Controller (PinName FEPtx, PinName FEPrx, int addr) | |
| コンストラクタ | |
| int | receiveState () |
| メンバ変数にボタンのステートを格納 | |
| bool | getButton1 (int number) |
| ボタン1の状態を取得 | |
| bool | getButton2 (int number) |
| ボタン2の状態を取得 | |
| double | getStick (int number) |
| スティックの値を取得 | |
| float | getRadian (int number) |
| スチィックの角度を取得 | |
| float | getNorm (int number) |
| スティックの距離を取得 | |
Detailed Description
FEPを使ったコントローラのクラス
Definition at line 25 of file controller.h.
Constructor & Destructor Documentation
| Controller | ( | ) |
コンストラクタ
| Controller | ( | PinName | FEPtx, |
| PinName | FEPrx, | ||
| int | addr | ||
| ) |
Member Function Documentation
| bool getButton1 | ( | int | number ) |
ボタン1の状態を取得
- Parameters:
-
number button number
- Returns:
- status
Definition at line 60 of file controller.cpp.
| bool getButton2 | ( | int | number ) |
ボタン2の状態を取得
- Parameters:
-
number button number
- Returns:
- status
Definition at line 65 of file controller.cpp.
| float getNorm | ( | int | number ) |
スティックの距離を取得
- Parameters:
-
number left..0 right..1
- Returns:
- norm
Definition at line 80 of file controller.cpp.
| float getRadian | ( | int | number ) |
スチィックの角度を取得
- Parameters:
-
number left...0 right...1
- Returns:
- radian
Definition at line 75 of file controller.cpp.
| double getStick | ( | int | number ) |
スティックの値を取得
- Parameters:
-
number sticknumber(x, y, x, y)
- Returns:
- stick value
Definition at line 70 of file controller.cpp.
| int receiveState | ( | ) |
メンバ変数にボタンのステートを格納
Definition at line 15 of file controller.cpp.
Generated on Sat Jul 16 2022 21:15:56 by
1.7.2
