code: def _get_value(self, source, bitarray):
          ''' Get value, based on the data in XML '''
          raw_value = self._get_raw(source, bitarray)
  
          rng = source.find('range')
          rng_min = float(rng.find('min').text)
          rng_max = float(rng.find('max').text)
  
          scl = source.find('scale')
          scl_min = float(scl.find('min').text)
          scl_max = float(scl.find('max').text)
  
          return {
              source['shortcut']: {
                  'description': source.get('description'),
                  'unit': source['unit'],
                  'value': (scl_max - scl_min) / (rng_max - rng_min) * (raw_value - rng_min) + scl_min,
                  'raw_value': raw_value,
              }
          f _get_value(self, source, bitarray):
          ''' Get value, based on the data in XML '''
          raw_value = self._get_raw(source, bitarray)
  
          rng = source.find('range')
          rng_min = float(rng.find('min').text)
          rng_max = float(rng.find('max').text)
  
          scl = source.find('scale')
          scl_min = float(scl.find('min').text)
          scl_max = float(scl.find('max').text)
  
          return {
              source['shortcut']: {
                  'description': source.get('description'),
                  'unit': source['unit'],
                  'value': (scl_max - scl_min) / (rng_max - rng_min) * (raw_value - rng_min) + scl_min,
                  'raw_value': raw_value,
              }
          }
docs: Get value, based on the data in XML