Fixed temp (the only problem I
This commit is contained in:
parent
0eedcd29a0
commit
b03cf17ef0
1 changed files with 2 additions and 2 deletions
|
|
@ -588,9 +588,9 @@ int dev_iio_read_imu(const dev_iio_t *const iio, imu_message_t *const out) {
|
|||
const int tmp_read = fread((void*)&tmp[0], 1, sizeof(tmp), iio->temp_fd);
|
||||
if (tmp_read >= 0) {
|
||||
out->temp_raw = strtol(&tmp[0], NULL, 10);
|
||||
out->temp_in_k = (double)out->temp_raw *iio->anglvel_scale_z;
|
||||
out->temp_in_k = (double)out->temp_raw *iio->temp_scale;
|
||||
} else {
|
||||
fprintf(stderr, "While reading anglvel(z): %d\n", tmp_read);
|
||||
fprintf(stderr, "While reading temp: %d\n", tmp_read);
|
||||
return tmp_read;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue