光敏 増田 / HMC5883L

Files at this revision

API Documentation at this revision

Comitter:
c0112463
Date:
Mon May 23 00:17:06 2016 +0000
Parent:
0:f1b56c26e351
Commit message:
20160523

Changed in this revision

HMC5883L.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/HMC5883L.cpp	Fri May 20 06:43:25 2016 +0000
+++ b/HMC5883L.cpp	Mon May 23 00:17:06 2016 +0000
@@ -61,36 +61,12 @@
 //各軸の値を取得する
 float HMC5883L::getGeomagX(){
     return ((float)hmc5883l_data[0]*gain);
-    /*
-    char tx = HMC5883L_DATAXM_REG;
-    char rx[2];
-    i2c_.write(HMC5883L_I2C_ADDRESS,&tx,1);
-    i2c_.write(HMC5883L_I2C_ADDRESS|0x01,rx,2);
-    int16_t output = ((int) rx[0] << 8) | ((int) rx[1]);
-    return ((float)output*gain);
-    */
 }
 float HMC5883L::getGeomagY(){
     return ((float)hmc5883l_data[2]*gain);
-    /*
-    char tx = HMC5883L_DATAYM_REG;
-    char rx[2];
-    i2c_.write(HMC5883L_I2C_ADDRESS,&tx,1);
-    i2c_.write(HMC5883L_I2C_ADDRESS|0x01,rx,2);
-    int16_t output = ((int) rx[0] << 8) | ((int) rx[1]);
-    return ((float)output*gain);
-    */
 }
 float HMC5883L::getGeomagZ(){
     return ((float)hmc5883l_data[1]*gain);
-    /*    
-    char tx = HMC5883L_DATAZM_REG;
-    char rx[2];
-    i2c_.write(HMC5883L_I2C_ADDRESS,&tx,1);
-    i2c_.write(HMC5883L_I2C_ADDRESS|0x01,rx,2);
-    int16_t output = ((int) rx[0] << 8) | ((int) rx[1]);
-    return ((float)output*gain);
-    */
 }
 //オフセットの値を取得する
 float HMC5883L::getOffsetX(){