Commit 31dd3887 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes issue #77. Improves args and kwargs handling by _process_command....

Fixes issue #77. Improves args and kwargs handling by _process_command. Reorders method in alphabetical order to ease navigating the code
Showing with 576 additions and 555 deletions
+576 -555
...@@ -13,15 +13,16 @@ logging_suffix = '' ...@@ -13,15 +13,16 @@ logging_suffix = ''
OHMPI_CONFIG = { OHMPI_CONFIG = {
'id': ohmpi_id, # Unique identifier of the OhmPi board (string) 'id': ohmpi_id, # Unique identifier of the OhmPi board (string)
'R_shunt': 2, # Shunt resistance in Ohms 'R_shunt': 2, # Shunt resistance in Ohms
'Imax': 4800/50/2, # Maximum current 'Imax': 4800 / 50 / 2, # Maximum current
'coef_p2': 2.50, # slope for current conversion for ADS.P2, measurement in V/V 'coef_p2': 2.50, # slope for current conversion for ADS.P2, measurement in V/V
'coef_p3': 2.50, # slope for current conversion for ADS.P3, measurement in V/V # 'coef_p3': 2.50, # slope for current conversion for ADS.P3, measurement in V/V
'offset_p2': 0, # 'offset_p2': 0,
'offset_p3': 0, # 'offset_p3': 0,
'integer': 2, # Max value 10 # TODO: Explain what this is... 'nb_samples': 2, # Max value 10 # was named integer before...
'version': 2, 'version': 2, # Is this still needed?
'max_elec': 64, 'max_elec': 64,
'board_addresses': {'A': 0x73, 'B': 0x72, 'M': 0x71, 'N': 0x70}, # def. {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70} 'board_addresses': {'A': 0x73, 'B': 0x72, 'M': 0x71, 'N': 0x70},
# def. {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70}
'settings': 'ohmpi_settings.json', 'settings': 'ohmpi_settings.json',
'board_version': '22.10' 'board_version': '22.10'
} # TODO: add a dictionary with INA models and associated gain values } # TODO: add a dictionary with INA models and associated gain values
...@@ -29,7 +30,7 @@ OHMPI_CONFIG = { ...@@ -29,7 +30,7 @@ OHMPI_CONFIG = {
# Execution logging configuration # Execution logging configuration
EXEC_LOGGING_CONFIG = { EXEC_LOGGING_CONFIG = {
'logging_level': logging.INFO, 'logging_level': logging.INFO,
'log_file_logging_level' : logging.DEBUG, 'log_file_logging_level': logging.DEBUG,
'logging_to_console': True, 'logging_to_console': True,
'file_name': f'exec{logging_suffix}.log', 'file_name': f'exec{logging_suffix}.log',
'max_bytes': 262144, 'max_bytes': 262144,
...@@ -67,7 +68,7 @@ MQTT_LOGGING_CONFIG = { ...@@ -67,7 +68,7 @@ MQTT_LOGGING_CONFIG = {
'retain': False, 'retain': False,
'keepalive': 60, 'keepalive': 60,
'will': None, 'will': None,
'auth': { 'username': 'mqtt_user', 'password': 'mqtt_password' }, 'auth': {'username': 'mqtt_user', 'password': 'mqtt_password'},
'tls': None, 'tls': None,
'protocol': MQTTv31, 'protocol': MQTTv31,
'transport': 'tcp', 'transport': 'tcp',
...@@ -85,7 +86,7 @@ MQTT_CONTROL_CONFIG = { ...@@ -85,7 +86,7 @@ MQTT_CONTROL_CONFIG = {
'retain': False, 'retain': False,
'keepalive': 60, 'keepalive': 60,
'will': None, 'will': None,
'auth': { 'username': 'mqtt_user', 'password': 'mqtt_password' }, 'auth': {'username': 'mqtt_user', 'password': 'mqtt_password'},
'tls': None, 'tls': None,
'protocol': MQTTv31, 'protocol': MQTTv31,
'transport': 'tcp', 'transport': 'tcp',
......
This diff is collapsed.
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