NagaokaRoboticsClub_mbedTeam / Mbed OS quadOmni_yanagi

Dependencies:   FEP ikarashiMDC omni PID R1370

Fork of omni_sample by NagaokaRoboticsClub_mbedTeam

Embed: (wiki syntax)

« Back to documentation index

Controller Class Reference

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 
)

コンストラクタ

Parameters:
FEPtxFEPtx
FEPrxFEPrx
addraddress

Definition at line 3 of file controller.cpp.


Member Function Documentation

bool getButton1 ( int  number )

ボタン1の状態を取得

Parameters:
numberbutton number
Returns:
status

Definition at line 60 of file controller.cpp.

bool getButton2 ( int  number )

ボタン2の状態を取得

Parameters:
numberbutton number
Returns:
status

Definition at line 65 of file controller.cpp.

float getNorm ( int  number )

スティックの距離を取得

Parameters:
numberleft..0 right..1
Returns:
norm

Definition at line 80 of file controller.cpp.

float getRadian ( int  number )

スチィックの角度を取得

Parameters:
numberleft...0 right...1
Returns:
radian

Definition at line 75 of file controller.cpp.

double getStick ( int  number )

スティックの値を取得

Parameters:
numbersticknumber(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.