modify code to support discontinue sensorIds and fix library linking error.