コード例 #1
0
ファイル: LPRY530AL.c プロジェクト: bechu/hexapod
// Read all the values and store into the device
static void read(SENSOR* sensor){
	LPRY530AL* device = (LPRY530AL*)sensor;
	device->gyro.x_axis_degrees_per_second = __read_channel(device->x_pin, device->slow, device->x_zero);
	device->gyro.y_axis_degrees_per_second = __read_channel(device->y_pin, device->slow, device->y_zero);
	device->gyro.z_axis_degrees_per_second = __read_channel(device->z_pin, device->slow, device->z_zero);
}
コード例 #2
0
ファイル: LY530ALH.c プロジェクト: byrnedawg/Polska
// Read all the values and store into the device
static void __ly530alh_read(SENSOR* sensor){
	LY530ALH* device = (LY530ALH*)sensor;
	device->gyro.z_axis_degrees_per_second = __read_channel(device->z_pin, device->slow, device->z_zero);
}
コード例 #3
0
ファイル: IDG300.c プロジェクト: bechu/hexapod
// Read all the values and store into the device
static void __idg300_read(SENSOR* sensor){
	IDG300* device = (IDG300*)sensor;
	device->gyro.x_axis_degrees_per_second = __read_channel(device->x_pin, device->x_zero);
	device->gyro.y_axis_degrees_per_second = __read_channel(device->y_pin, device->y_zero);
}