Update module_sensor.c

code about handling event