Revise errs and add while loop to lidar alarm task.