add compatibility for single and multiplex sensor
change pointer value access in sensor refresh function