Merge pull request #106 from DavidLin1577/patch-1

Improve readability of codes in sensor_demo
This commit is contained in:
Arthur
2020-02-29 12:08:07 +08:00
committed by GitHub
2 changed files with 9 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
void e53_ia1_demo(void) void e53_ia1_demo(void)
{ {
Init_E53_IA1(); Init_E53_IA1();
while (1) while (1)
{ {
E53_IA1_Read_Data(); E53_IA1_Read_Data();
@@ -19,8 +19,8 @@ void e53_ia1_demo(void)
void e53_st1_demo(void) void e53_st1_demo(void)
{ {
Init_E53_ST1(); Init_E53_ST1();
while (1) while (1)
{ {
E53_ST1_Read_Data(); E53_ST1_Read_Data();
printf("\r\n******************************Longitude Value is %.6f\r\n", E53_ST1_Data.Longitude); printf("\r\n******************************Longitude Value is %.6f\r\n", E53_ST1_Data.Longitude);
printf("\r\n******************************Latitude is %.6f\r\n", E53_ST1_Data.Latitude); printf("\r\n******************************Latitude is %.6f\r\n", E53_ST1_Data.Latitude);
@@ -33,21 +33,21 @@ void e53_st1_demo(void)
E53_ST1_LED_StatusSet(ST1_OFF); E53_ST1_LED_StatusSet(ST1_OFF);
osDelay(2000); osDelay(2000);
} }
} }
void e53_sf1_demo(void) void e53_sf1_demo(void)
{ {
Init_E53_SF1(); Init_E53_SF1();
while (1) while (1)
{ {
E53_SF1_Read_Data(); E53_SF1_Read_Data();
printf("\r\n******************************Smoke Value is %d\r\n", E53_SF1_Data.Smoke_Value); printf("\r\n******************************Smoke Value is %d\r\n", E53_SF1_Data.Smoke_Value);
E53SF1_Beep(ON); E53SF1_Beep(ON);
osDelay(2000); osDelay(2000);
E53SF1_Beep(OFF); E53SF1_Beep(OFF);
osDelay(2000); osDelay(2000);
} }
} }
void application_entry(void *arg) void application_entry(void *arg)

View File

@@ -17,5 +17,5 @@ void application_entry(void *arg);
} }
#endif #endif
#endif /* __APP_DEMO_H__ */ #endif /* __SENSOR_DEMO_H__ */