Fix sensor framework timer issue and update sensor sample (#917)
Fix the sensor framework timer issue reported by #884 when setting `ms_to_next_check`, and unify the type of time related args/vars to uint32 to avoid potential type conversion issues, and fix the compile warnings. And update the sensor sample by creating two sensors to confirm that the fix works correctly.
This commit is contained in:
@ -526,8 +526,10 @@ iwasm_main(int argc, char *argv[])
|
||||
|
||||
/* sensor framework */
|
||||
init_sensor_framework();
|
||||
// add the sys sensor objects
|
||||
add_sys_sensor("sensor_test", "This is a sensor for test", 0, 1000,
|
||||
/* add the sys sensor objects */
|
||||
add_sys_sensor("sensor_test1", "This is a sensor for test", 0, 1000,
|
||||
read_test_sensor, config_test_sensor);
|
||||
add_sys_sensor("sensor_test2", "This is a sensor for test", 0, 1000,
|
||||
read_test_sensor, config_test_sensor);
|
||||
start_sensor_framework();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user