Skip to content

Commit

Permalink
tidy some debug and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jblance committed Aug 3, 2021
1 parent 80bceea commit 3f4a94b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions mppsolar/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ def get_kwargs(kwargs, key, default=None):
def key_wanted(key, filter=None, excl_filter=None):
# remove any specifically excluded keys
if excl_filter is not None and excl_filter.search(key):
log.debug(f"key_wanted: key {key} matches excl_filter {excl_filter} so key excluded")
# log.debug(f"key_wanted: key {key} matches excl_filter {excl_filter} so key excluded")
return False
if filter is None:
log.debug(
f"key_wanted: No filter and key {key} not excluded by excl_filter {excl_filter} so key wanted"
)
# log.debug(
# f"key_wanted: No filter and key {key} not excluded by excl_filter {excl_filter} so key wanted"
# )
return True
elif filter.search(key):
log.debug(
f"key_wanted: key {key} matches filter {filter} and not excl_filter {excl_filter} so key wanted"
)
# log.debug(
# f"key_wanted: key {key} matches filter {filter} and not excl_filter {excl_filter} so key wanted"
# )
return True
else:
log.debug(f"key_wanted: key {key} does not match filter {filter} so key excluded")
# log.debug(f"key_wanted: key {key} does not match filter {filter} so key excluded")
return False


Expand Down
2 changes: 1 addition & 1 deletion mppsolar/protocols/jk04.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"description": "BLE Cell Data inquiry",
"help": " -- queries the ble device for the cell data",
"type": "QUERY",
"response_type": "POSITIONAL", # TODO move to POSITIONAL formating
"response_type": "POSITIONAL",
"response": [
["Hex2Str", 4, "Header", ""],
["Hex2Str", 1, "Record Type", ""],
Expand Down

0 comments on commit 3f4a94b

Please sign in to comment.