code: def get_voltage(self, channel, unit='V'):
          '''Reading voltage
          '''
          adc_ch = self._ch_map[channel]['ADCV']['adc_ch']
          address = self._ch_map[channel]['ADCV']['address']
          raw = self._get_adc_value(address=address)[adc_ch]
  
          dac_offset = self._ch_cal[channel]['ADCV']['offset']
          dac_gain = self._ch_cal[channel]['ADCV']['gain']
  
          voltage = ((raw - dac_offset) / dac_gain)
  
          if unit == 'raw':
              return raw
          elif unit == 'V':
              return voltage / 1000
          elif unit == 'mV':
              return voltage
          else:
              raise TypeError("Invalid unit type."f get_voltage(self, channel, unit='V'):
          '''Reading voltage
          '''
          adc_ch = self._ch_map[channel]['ADCV']['adc_ch']
          address = self._ch_map[channel]['ADCV']['address']
          raw = self._get_adc_value(address=address)[adc_ch]
  
          dac_offset = self._ch_cal[channel]['ADCV']['offset']
          dac_gain = self._ch_cal[channel]['ADCV']['gain']
  
          voltage = ((raw - dac_offset) / dac_gain)
  
          if unit == 'raw':
              return raw
          elif unit == 'V':
              return voltage / 1000
          elif unit == 'mV':
              return voltage
          else:
              raise TypeError("Invalid unit type.")
docs: Reading voltage