2024-11-05 17:02:45 +01:00
|
|
|
#include "gyroL3gHelpers.h"
|
2023-02-26 14:54:35 +01:00
|
|
|
|
|
|
|
float l3gd20h::ctrlReg4ToSensitivity(uint8_t reg) {
|
|
|
|
bool fsH = reg & l3gd20h::SET_FS_1;
|
|
|
|
bool fsL = reg & l3gd20h::SET_FS_0;
|
|
|
|
|
|
|
|
if (not fsH and not fsL) {
|
|
|
|
return l3gd20h::SENSITIVITY_00;
|
|
|
|
} else if (not fsH and fsL) {
|
|
|
|
return l3gd20h::SENSITIVITY_01;
|
|
|
|
} else {
|
|
|
|
return l3gd20h::SENSITIVITY_11;
|
|
|
|
}
|
|
|
|
}
|