Skip to content

Commit

Permalink
CG-526: add support for new config associated with LINKIT-SENSORS pac…
Browse files Browse the repository at this point in the history
…ket support
  • Loading branch information
Liam Wickins committed Nov 28, 2023
1 parent 130b6eb commit 1264298
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
14 changes: 14 additions & 0 deletions pylinkit/dte_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,23 @@ class DTEParamMap():
[ "PH_SENSOR_ENABLE", "PHP01", BOOLEAN ],
[ "PH_SENSOR_PERIODIC", "PHP02", UINT ],
[ "PH_SENSOR_VALUE", "PHP03", FLOAT ],
[ "PH_SENSOR_ENABLE_TX_MODE", "PHP04", SENSORTXENABLEMODE ],
[ "PH_SENSOR_ENABLE_TX_MAX_SAMPLES", "PHP05", UINT ],
[ "PH_SENSOR_ENABLE_TX_SAMPLE_PERIOD", "PHP06", UINT ],
[ "SEA_TEMP_SENSOR_ENABLE", "STP01", BOOLEAN ],
[ "SEA_TEMP_SENSOR_PERIODIC", "STP02", UINT ],
[ "SEA_TEMP_SENSOR_VALUE", "STP03", FLOAT ],
[ "SEA_TEMP_SENSOR_ENABLE_TX_MODE", "STOP04", SENSORTXENABLEMODE ],
[ "SEA_TEMP_SENSOR_ENABLE_TX_MAX_SAMPLES", "STP05", UINT ],
[ "SEA_TEMP_SENSOR_ENABLE_TX_SAMPLE_PERIOD", "STP06", UINT ],
[ "ALS_SENSOR_ENABLE", "LTP01", BOOLEAN ],
[ "ALS_SENSOR_PERIODIC", "LTP02", UINT ],
[ "ALS_SENSOR_VALUE", "LTP03", FLOAT ],
[ "ALS_SENSOR_ENABLE_TX_MODE", "LTP04", SENSORTXENABLEMODE ],
[ "ALS_SENSOR_ENABLE_TX_MAX_SAMPLES", "LTP05", UINT ],
[ "ALS_SENSOR_ENABLE_TX_SAMPLE_PERIOD", "LTP06", UINT ],
[ "ALS_SENSOR_VALUE", "LTP03", FLOAT ],
[ "ALS_SENSOR_VALUE", "LTP03", FLOAT ],
[ "CDT_SENSOR_ENABLE", "CDP01", BOOLEAN ],
[ "CDT_SENSOR_PERIODIC", "CDP02", UINT ],
[ "CDT_SENSOR_CONDUCTIVITY_VALUE", "CDP03", FLOAT ],
Expand All @@ -116,6 +127,9 @@ class DTEParamMap():
[ "PRESSURE_SENSOR_ENABLE", "PRP01", BOOLEAN ],
[ "PRESSURE_SENSOR_PERIODIC", "PRP02", UINT ],
[ "PRESSURE_SENSOR_LOGGING_MODE", "PRP03", PRESSURESENSORLOGGINGMODE ],
[ "PRESSURE_SENSOR_ENABLE_TX_MODE", "PRP04", SENSORTXENABLEMODE ],
[ "PRESSURE_SENSOR_ENABLE_TX_MAX_SAMPLES", "PRP05", UINT ],
[ "PRESSURE_SENSOR_ENABLE_TX_SAMPLE_PERIOD", "PRP06", UINT ],
[ "DEBUG_OUTPUT_MODE", "DBP01", DEBUGMODE ],
[ "GNSS_ASSISTNOW_OFFLINE_EN", "GNP27", BOOLEAN ],
[ "GNSS_TRIGGER_COLD_START_ON_SURFACED", "GNP28", BOOLEAN ],
Expand Down
12 changes: 12 additions & 0 deletions pylinkit/dte_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ def decode(value):
return UWDETECTSOURCE.allowed[int(value)]


class SENSORTXENABLEMODE():
allowed = ['OFF', 'ONESHOT', 'MEAN', 'MEDIAN']

@staticmethod
def encode(value):
return str(SENSORTXENABLEMODE.allowed.index(value))

@staticmethod
def decode(value):
return SENSORTXENABLEMODE.allowed[int(value)]


class ARGOSMODE():
allowed = ['OFF', 'PASS_PREDICTION', 'LEGACY', 'DUTY_CYCLE']

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='pylinkit',
version='3.3.9',
version='3.4.0',
description='Python LinkIt BLE configuration tool',
author='Liam Wickins',
author_email='[email protected]',
Expand Down

0 comments on commit 1264298

Please sign in to comment.