Add missing file and tidy up somewhat.

This commit is contained in:
2014-11-23 20:20:48 +00:00
parent 8b3ff9feba
commit 4f171f3023
12 changed files with 136 additions and 186 deletions

View File

@@ -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);
}