remove vestigial magnetometer stuff which is giving warnings
This commit is contained in:
@ -84,7 +84,7 @@ extern uint32_t peripheral_gatt_write(uint32_t count);
|
||||
|
||||
int thread_sensors(void)
|
||||
{
|
||||
const struct device *display, *ina, *baro, *accel, *gyro, *mag, *lis, *hdc;
|
||||
const struct device *display, *ina, *baro, *accel, *gyro, *lis, *hdc;
|
||||
// int err;
|
||||
uint16_t x_res;
|
||||
uint16_t y_res;
|
||||
@ -92,7 +92,7 @@ int thread_sensors(void)
|
||||
uint8_t ppt;
|
||||
uint8_t font_width;
|
||||
uint8_t font_height;
|
||||
struct sensor_value voltage, current, pressure, temperature, accel_x, accel_y, accel_z, accel_z_ref, gyro_x, gyro_y, gyro_z, mag_x, mag_y, mag_z, humidity;
|
||||
struct sensor_value voltage, current, pressure, temperature, accel_x, accel_y, accel_z, accel_z_ref, gyro_x, gyro_y, gyro_z, humidity;
|
||||
|
||||
char str_v[15] = {0};
|
||||
char str_i[15] = {0};
|
||||
@ -105,9 +105,6 @@ int thread_sensors(void)
|
||||
char str_gx[16] = {0};
|
||||
char str_gy[16] = {0};
|
||||
char str_gz[16] = {0};
|
||||
char str_mx[16] = {0};
|
||||
char str_my[16] = {0};
|
||||
char str_mz[16] = {0};
|
||||
char str_h[16] = {0};
|
||||
|
||||
LOG_INF("Starting Mellifera version %s...", APP_VERSION_STRING);
|
||||
@ -213,14 +210,6 @@ int thread_sensors(void)
|
||||
}
|
||||
LOG_INF("Initialized %s", gyro->name);
|
||||
|
||||
// mag = DEVICE_DT_GET(DT_NODELABEL(bmx055_mag));
|
||||
// if (!device_is_ready(mag))
|
||||
// {
|
||||
// LOG_ERR("Device %s not ready", mag->name);
|
||||
// return 0;
|
||||
// }
|
||||
// LOG_INF("Initialized %s", mag->name);
|
||||
|
||||
lis = DEVICE_DT_GET(DT_NODELABEL(lis2dh));
|
||||
if (!device_is_ready(lis))
|
||||
{
|
||||
@ -301,23 +290,6 @@ int thread_sensors(void)
|
||||
LOG_ERR("Could not get gyro");
|
||||
}
|
||||
|
||||
// if (sensor_sample_fetch(mag) < 0)
|
||||
// {
|
||||
// LOG_ERR("Could not fetch sample from mag");
|
||||
// }
|
||||
// if (sensor_channel_get(mag, SENSOR_CHAN_MAGN_X, &mag_x) < 0)
|
||||
// {
|
||||
// LOG_ERR("Could not get mag");
|
||||
// }
|
||||
// if (sensor_channel_get(mag, SENSOR_CHAN_MAGN_Y, &mag_y) < 0)
|
||||
// {
|
||||
// LOG_ERR("Could not get mag");
|
||||
// }
|
||||
// if (sensor_channel_get(mag, SENSOR_CHAN_MAGN_Z, &mag_z) < 0)
|
||||
// {
|
||||
// LOG_ERR("Could not get mag");
|
||||
// }
|
||||
|
||||
if (sensor_sample_fetch(lis) < 0)
|
||||
{
|
||||
LOG_ERR("Could not fetch sample");
|
||||
@ -350,9 +322,6 @@ int thread_sensors(void)
|
||||
sprintf(str_gx, "GX:%+7.3f", gyro_x.val1 + gyro_x.val2 * 1e-6);
|
||||
sprintf(str_gy, "GY:%+7.3f", gyro_y.val1 + gyro_y.val2 * 1e-6);
|
||||
sprintf(str_gz, "GZ:%+7.3f", gyro_z.val1 + gyro_z.val2 * 1e-6);
|
||||
// sprintf(str_mx, "MX:%+7.3f", mag_x.val1 + mag_x.val2 * 1e-6);
|
||||
// sprintf(str_my, "MY:%+7.3f", mag_y.val1 + mag_y.val2 * 1e-6);
|
||||
// sprintf(str_mz, "MZ:%+7.3f", mag_z.val1 + mag_z.val2 * 1e-6);
|
||||
sprintf(str_az_ref, "Zr:%+7.3f", accel_z_ref.val1 + accel_z_ref.val2 * 1e-6);
|
||||
sprintf(str_h, "H :%7.3f", humidity.val1 + humidity.val2 * 1e-6);
|
||||
|
||||
|
Reference in New Issue
Block a user