diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py index 93acf8fc51fd9e215ec3b758b97114b651d7212e..641afe85b31d05eb4c55a6b4d379c1216fde0e1d 100644 --- a/ohmpi/hardware_components/raspberry_pi.py +++ b/ohmpi/hardware_components/raspberry_pi.py @@ -46,12 +46,14 @@ class Ctl(CtlAbstract): warnings.resetwarnings() # Extended I2C + warnings.filterwarnings("error") # to filter out adafruit warning about setting I2C frequency try: self.interfaces['i2c_ext'] = ExtendedI2C(4) # 4 is defined except RuntimeWarning: pass except Exception as e: self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}') + warnings.resetwarnings() # modbus try: diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index b23e3120c5f2abeb27f6b30ab7662c04b1358b5e..ba893a8aff0450b93610772d74218af915d822a5 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -435,7 +435,7 @@ class OhmPiHardware: current, voltage = 0., 0. diff_vab = np.inf if strategy == 'constant': - tx_volt = vab_max*.9 + vab_max = tx_volt * 1.001 strategy = 'vmax' if strategy == 'vmax': while (k < n_steps) and (diff_vab > diff_vab_lim) and (vab_list[k] < vab_max):