Add missing file and tidy up somewhat.
This commit is contained in:
27
hmc5883l.c
27
hmc5883l.c
@@ -85,16 +85,6 @@ bool hmc5883l_start_sample(void)
|
||||
|
||||
void hmc5883l_event_handler(void)
|
||||
{
|
||||
#if 0
|
||||
signed short int xi, yi, zi;
|
||||
signed short int tempi;
|
||||
signed short int rolli, pitchi, yawi;
|
||||
|
||||
float x, y, z;
|
||||
float temp;
|
||||
float roll, pitch, yaw;
|
||||
#endif
|
||||
|
||||
if (hmc5883l_result != I2C_SUCCESS)
|
||||
return;
|
||||
|
||||
@@ -106,23 +96,6 @@ void hmc5883l_event_handler(void)
|
||||
if (hmc5883l_state)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
xi = (hmc5883l_sample_data[0] << 8) + hmc5883l_sample_data[1];
|
||||
yi = (hmc5883l_sample_data[2] << 8) + hmc5883l_sample_data[3];
|
||||
zi = (hmc5883l_sample_data[4] << 8) + hmc5883l_sample_data[5];
|
||||
|
||||
tempi = (hmc5883l_sample_data[6] << 8) + hmc5883l_sample_data[7];
|
||||
|
||||
rolli = (hmc5883l_sample_data[ 8] << 8)+hmc5883l_sample_data[ 9];
|
||||
pitchi = (hmc5883l_sample_data[10] << 8)+hmc5883l_sample_data[11];
|
||||
yawi = (hmc5883l_sample_data[12] << 8)+hmc5883l_sample_data[13];
|
||||
|
||||
sensors_write_gyro_data(roll, pitch, yaw);
|
||||
sensors_write_accel_data(x, y, z);
|
||||
sensors_write_temp_data(temp);
|
||||
|
||||
#endif
|
||||
|
||||
log_put_uint(LOG_SIGNATURE_MAGNETOMETER);
|
||||
log_put_array((char *)hmc5883l_sample_data, 6);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user