mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
sensors/l3gd20: fix compile break when disable schedule work
N/A Change-Id: Ic0f94060642e9c8741fe7ff4c43259096b4eb7e4 Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -372,7 +372,7 @@ int stm32_bringup(void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_L3GD20
|
||||
ret = board_l3gd20_initialize(CONFIG_SENSORS_L3GD20_DEVNO, 5);
|
||||
ret = board_l3gd20_initialize(0, 5);
|
||||
if (ret != OK)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize l3gd20 sensor:"
|
||||
|
||||
@@ -226,13 +226,6 @@ config SENSORS_L3GD20
|
||||
---help---
|
||||
Enable driver support for the STMicro L3GD20 gyroscope sensor.
|
||||
|
||||
config SENSORS_L3GD20_DEVNO
|
||||
int "The device number"
|
||||
default 0
|
||||
depends on SENSORS_L3GD20
|
||||
---help---
|
||||
The device number, used to build the device path as /dev/sensor/gyro_uncalN
|
||||
|
||||
config SENSORS_L3GD20_BUFFER_SIZE
|
||||
int "size of buffer"
|
||||
default 1
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_SCHED_HPWORK)
|
||||
#if CONFIG_SENSORS_L3GD20_BUFFER_SIZE > 0 && !defined(CONFIG_SCHED_HPWORK)
|
||||
# error Hi-priority work queue support is required (CONFIG_SCHED_HPWORK)
|
||||
#endif
|
||||
|
||||
@@ -235,9 +235,9 @@ static void l3gd20_read_measurement_data(FAR struct l3gd20_dev_s *dev,
|
||||
|
||||
l3gd20_read_temperature(dev, &temperature);
|
||||
|
||||
data->x = ((int16_t)x_gyr / 180.0f) * M_PI_F;
|
||||
data->y = ((int16_t)y_gyr / 180.0f) * M_PI_F;
|
||||
data->z = ((int16_t)z_gyr / 180.0f) * M_PI_F;
|
||||
data->x = ((int16_t)x_gyr / 180.0f) * (float)M_PI;
|
||||
data->y = ((int16_t)y_gyr / 180.0f) * (float)M_PI;
|
||||
data->z = ((int16_t)z_gyr / 180.0f) * (float)M_PI;
|
||||
data->temperature = temperature;
|
||||
data->timestamp = dev->timestamp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user