Corrected sensor calculation for uint16 and uint32