|
@@ -105,11 +105,11 @@ Hmc5883l::update(void)
|
105
|
105
|
mraa_i2c_read(m_i2c, m_rx_tx_buf, DATA_REG_SIZE);
|
106
|
106
|
|
107
|
107
|
// x
|
108
|
|
- m_coor[0] = (int16_t)((m_rx_tx_buf[HMC5883L_X_MSB_REG] << 8 ) | m_rx_tx_buf[HMC5883L_X_LSB_REG]);
|
|
108
|
+ m_coor[0] = (m_rx_tx_buf[HMC5883L_X_MSB_REG] << 8 ) | m_rx_tx_buf[HMC5883L_X_LSB_REG];
|
109
|
109
|
// z
|
110
|
|
- m_coor[2] = (int16_t)((m_rx_tx_buf[HMC5883L_Z_MSB_REG] << 8 ) | m_rx_tx_buf[HMC5883L_Z_LSB_REG]);
|
|
110
|
+ m_coor[2] = (m_rx_tx_buf[HMC5883L_Z_MSB_REG] << 8 ) | m_rx_tx_buf[HMC5883L_Z_LSB_REG];
|
111
|
111
|
// y
|
112
|
|
- m_coor[1] = (int16_t)((m_rx_tx_buf[HMC5883L_Y_MSB_REG] << 8 ) | m_rx_tx_buf[HMC5883L_Y_LSB_REG]);
|
|
112
|
+ m_coor[1] = (m_rx_tx_buf[HMC5883L_Y_MSB_REG] << 8 ) | m_rx_tx_buf[HMC5883L_Y_LSB_REG];
|
113
|
113
|
|
114
|
114
|
return MRAA_SUCCESS;
|
115
|
115
|
}
|
|
@@ -130,7 +130,7 @@ Hmc5883l::heading(void)
|
130
|
130
|
return dir;
|
131
|
131
|
}
|
132
|
132
|
|
133
|
|
-int*
|
|
133
|
+int16_t*
|
134
|
134
|
Hmc5883l::coordinates(void)
|
135
|
135
|
{
|
136
|
136
|
return &m_coor[0];
|