ndsmotion.h

interface code for the ds motion card, ds motion pak, MK6 [詳細]

ソースコードを見る。

構成

struct  MotionCalibration

型定義

typedef struct MotionCalibration MotionCalibration

関数

int motion_init (void)
 Initializes the DS Motion Sensor. Run this before using any of the DS Motion Sensor functions save the return value and pass it to the other motion_ functions.
void motion_deinit (void)
 Deinitializes the DS Motion Sensor.
signed int motion_read_x (void)
 read the X acceleration
signed int motion_read_y (void)
 read the Y acceleration
signed int motion_read_z (void)
 read the Z acceleration
signed int motion_read_gyro (void)
 read the Z rotational speed
int motion_acceleration_x (void)
 gets acceleration value to mili G (where g is 9.8 m/s*s)
int motion_acceleration_y (void)
 gets acceleration value to mili G (where g is 9.8 m/s*s)
int motion_acceleration_z (void)
 gets acceleration value to mili G (where g is 9.8 m/s*s)
void motion_set_sens_x (int sens)
 this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819
void motion_set_sens_y (int sens)
 this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819
void motion_set_sens_z (int sens)
 this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819
void motion_set_sens_gyro (int sens)
void motion_set_offs_x (void)
 this should be called when the axis is under no acceleration default is 2048
void motion_set_offs_y (void)
 this should be called when the axis is under no acceleration default is 2048
void motion_set_offs_z (void)
 this should be called when the axis is under no acceleration default is 2048
void motion_set_offs_gyro (void)
 this should be called when the axis is under no rotation default is 1680
int motion_rotation (void)
 converts raw rotation value to degrees per second
MotionCalibrationmotion_get_calibration (void)
 This returns the current calibration settings for saving.
void motion_set_calibration (MotionCalibration *cal)
 This sets the calibration settings. Intended to restore saved calibration settings.
void motion_enable_ain_1 (void)
 This enables the analog input number 1. Required before reading analog input number 1.
void motion_enable_ain_2 (void)
 This enables the analog input number 2. Required before reading analog input number 2.
int motion_read_ain_1 (void)
 This reads the analog input number 1. analog input number 1 needs to be enabled before reading.
int motion_read_ain_2 (void)
 This reads the analog input number 2. analog input number 2 needs to be enabled before reading.

説明

interface code for the ds motion card, ds motion pak, MK6


関数

void motion_set_calibration ( MotionCalibration cal  ) 

This sets the calibration settings. Intended to restore saved calibration settings.

引数:
cal the calibration settings
void motion_set_sens_x ( int  sens  ) 

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 825

引数:
sens the raw reading at 1g for accurate acceleration calculations
void motion_set_sens_y ( int  sens  ) 

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819

引数:
sens the raw reading at 1g for accurate acceleration calculations
void motion_set_sens_z ( int  sens  ) 

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819

引数:
sens the raw reading at 1g for accurate acceleration calculations
 全て クラス ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義
libndsに対してMon Apr 26 23:39:50 2010に生成されました。  doxygen 1.6.3