For Hepta-Sat Lite
Diff: Hepta9axis.cpp
- Revision:
- 6:fdfca3ffecd5
- Parent:
- 5:098423fb0371
- Child:
- 7:3a5b7c76eb48
diff -r 098423fb0371 -r fdfca3ffecd5 Hepta9axis.cpp --- a/Hepta9axis.cpp Tue Sep 05 12:46:12 2017 +0000 +++ b/Hepta9axis.cpp Wed Aug 21 12:14:29 2019 +0000 @@ -28,7 +28,7 @@ void Hepta9axis::sen_acc(float *ax,float *ay,float *az) { -//x軸加速度 +//x-axis accel n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x3B); @@ -49,7 +49,7 @@ *ax = (acc_ax)*2/32764*9.81; -//Y軸加速度 +//y-axis n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x3D); @@ -70,7 +70,7 @@ *ay = (acc_ay)*2/32764*9.81; -//z軸加速度 +//z-axis n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x3F); @@ -94,7 +94,7 @@ void Hepta9axis::sen_gyro(float *gx,float *gy,float *gz) { -//x軸GYRO +//x-axis gyro n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x43); @@ -114,7 +114,7 @@ double gyro_ax = short((gxh<<8) | (gxl)); *gx = (gyro_ax)*0.00763; -//y軸GYRO +//y-axis gyro n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x45); @@ -134,7 +134,7 @@ double gyro_ay = short((gyh<<8) | (gyl)); *gy = (gyro_ay)*0.00763; -//z軸GYRO +//z-axis gyro n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x47); @@ -230,10 +230,10 @@ } -//////////////16進数表記///////////////////////////////////////// +//////////////For HEX///////////////////////////////////////// void Hepta9axis::sen_gyro_u16(char* gx_u16,char* gy_u16,char* gz_u16) { - //x軸GYRO + //x n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x43); @@ -257,7 +257,7 @@ gx_u16[2]=g2[0]; gx_u16[3]=g2[1]; -//y軸GYRO +//y n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x45); @@ -280,7 +280,7 @@ gy_u16[2]=g2[0]; gy_u16[3]=g2[1]; -//z軸GYRO +//z n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x47); @@ -308,7 +308,7 @@ void Hepta9axis::sen_acc_u16(char* ax_u16,char* ay_u16,char* az_u16) { - //x軸加速度 + //x n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x3B); @@ -332,7 +332,7 @@ ax_u16[2]=a2[0]; ax_u16[3]=a2[1]; -//Y軸加速度 +//y n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x3D); @@ -355,7 +355,7 @@ ay_u16[1]=a1[1]; ay_u16[2]=a2[0]; ay_u16[3]=a2[1]; -//z軸加速度 +//z n_axis.start(); n_axis.write(addr_accel_gyro); n_axis.write(0x3F);