示例#1
0
 def measure_impedance_non_blocking(self, sampling_time_ms, n_samples,
                                    delay_between_samples_ms, state):
     state_ = uint8_tVector()
     for i in range(0, len(state)):
         state_.append(int(state[i]))
     Base.measure_impedance_non_blocking(self, sampling_time_ms, n_samples,
                                         delay_between_samples_ms, state_)
示例#2
0
 def measure_impedance(self, sampling_time_ms, n_samples,
                       delay_between_samples_ms, state):
     state_ = uint8_tVector()
     for i in range(0, len(state)):
         state_.append(int(state[i]))
     impedance = np.array(Base.measure_impedance(self,
                          sampling_time_ms, n_samples,
                          delay_between_samples_ms, state_))
     V_hv = impedance[0::4]
     hv_resistor = impedance[1::4].astype(int)
     V_fb = impedance[2::4]
     fb_resistor = impedance[3::4].astype(int)
     return (V_hv, hv_resistor, V_fb, fb_resistor)
示例#3
0
 def i2c_send_command(self, address, cmd, data, delay_ms=100):
     data_ = uint8_tVector()
     for i in range(0, len(data)):
         data_.append(int(data[i]))
     return np.array(Base.i2c_send_command(self, address, cmd, data_,
                                           delay_ms))
示例#4
0
 def i2c_write(self, address, data):
     data_ = uint8_tVector()
     for i in range(0, len(data)):
         data_.append(int(data[i]))
     Base.i2c_write(self, address, data_)
示例#5
0
 def state_of_all_channels(self, state):
     state_ = uint8_tVector()
     for i in range(0, len(state)):
         state_.append(int(state[i]))
     Base.set_state_of_all_channels(self, state_)