modify the api in sensor framework

This commit is contained in:
Wang_Weigen
2021-09-14 16:49:54 +08:00
parent cd9a3ee143
commit d77c1828b2
8 changed files with 53 additions and 54 deletions

View File

@@ -29,7 +29,7 @@ void VoiceD124(void)
{
struct SensorQuantity *voice = SensorQuantityFind(SENSOR_QUANTITY_D124_VOICE, SENSOR_QUANTITY_VOICE);
SensorQuantityOpen(voice);
UserTaskDelay(2000);
PrivTaskDelay(2000);
uint16 result = SensorQuantityRead(voice);
printf("voice : %d.%d dB\n", result/(10*voice->value.decimal_places), result%(10*voice->value.decimal_places));
SensorQuantityClose(voice);