Commit 337d091d authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Merge branch 'Refactor_mb_2023' of gitlab-ssh.irstea.fr:reversaal/OhmPi into Refactor_mb_2023

Showing with 7 additions and 5 deletions
+7 -5
...@@ -22,13 +22,15 @@ HARDWARE_CONFIG = { ...@@ -22,13 +22,15 @@ HARDWARE_CONFIG = {
'pwr': {'model': 'pwr_batt', 'voltage': 12.}, 'pwr': {'model': 'pwr_batt', 'voltage': 12.},
'tx': {'model': 'mb_2024_rev_0_2', 'tx': {'model': 'mb_2024_rev_0_2',
'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'voltage_max': 50., # Maximum voltage supported by the TX board [V]
'current_max': 4800 / 50 / 2, # Maximum current supported by the TX board [mA] 'current_max': 4800, # Maximum voltage read by the current ADC on the TX board [mA]
'r_shunt': 2 # Shunt resistance in Ohms 'r_shunt': 2, # Shunt resistance in Ohms
'interface_name': 'i2c'
}, },
'rx': {'model': 'mb_2024_rev_0_2', 'rx': {'model': 'mb_2024_rev_0_2',
'coef_p2': 1.00, # slope for conversion for ADS, measurement in V/V 'coef_p2': 1.00, # slope for conversion for ADS, measurement in V/V
'latency': 0.010, # latency in seconds in continuous mode 'latency': 0.010, # latency in seconds in continuous mode
'sampling_rate': 50 # number of samples per second 'sampling_rate': 50, # number of samples per second
'interface_name': 'i2c'
} }
} }
......
...@@ -142,7 +142,7 @@ class Tx(TxAbstract): ...@@ -142,7 +142,7 @@ class Tx(TxAbstract):
assert self.adc_voltage_min / (50 * self.r_shunt) <= value <= self.adc_voltage_max / (50 * self.r_shunt) assert self.adc_voltage_min / (50 * self.r_shunt) <= value <= self.adc_voltage_max / (50 * self.r_shunt)
self.exec_logger.warning(f'Current pulse is not implemented for the {self.board_name} board') self.exec_logger.warning(f'Current pulse is not implemented for the {self.board_name} board')
def gain_auto_one_pulse(self): def gain_auto(self):
self._adc_gain_auto() self._adc_gain_auto()
def inject(self, polarity=1, injection_duration=None): def inject(self, polarity=1, injection_duration=None):
...@@ -251,7 +251,7 @@ class Rx(RxAbstract): ...@@ -251,7 +251,7 @@ class Rx(RxAbstract):
self.gain = gain self.gain = gain
self.exec_logger.event(f'{self.board_name}\trx_adc_auto_gain\tend\t{datetime.datetime.utcnow()}') self.exec_logger.event(f'{self.board_name}\trx_adc_auto_gain\tend\t{datetime.datetime.utcnow()}')
def gain_auto_one_pulse(self): def gain_auto(self):
self._adc_gain_auto() self._adc_gain_auto()
@property @property
def voltage(self): def voltage(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment