Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion luxtronik/cfi/calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Calculations(DataVectorConfig):

def get_firmware_version(self):
"""Get the firmware version as string."""
return "".join([super(Calculations, self).get(i).value for i in range(81, 91)])
return "".join([str(super(Calculations, self).get(i).value) for i in range(81, 91)])

def _get_firmware_version(self):
"""Get the firmware version as string like in previous versions."""
Expand Down
3 changes: 3 additions & 0 deletions luxtronik/cfi/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def _write_and_read(self, parameters, data):
return self._read(data)

def _write(self, parameters):
if not isinstance(parameters, Parameters):
LOGGER.error("Only parameters are writable!")
return
for definition, field in parameters.items():
if field.write_pending:
field.write_pending = False
Expand Down
6 changes: 3 additions & 3 deletions luxtronik/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __repr__(self):
f"name: {self.name}, "
f"writeable: {self.writeable}, "
f"value: {self.value}, "
f"raw: {self._raw}, "
f"raw: {self.raw}, "
f"write_pending: {self.write_pending}, "
f"class: {self.datatype_class}, "
f"unit: {self.datatype_unit}"
Expand All @@ -115,7 +115,7 @@ def __eq__(self, other):
return False

return (
self.value == other.value
self._raw == other._raw
and self.datatype_class == other.datatype_class
and self.datatype_unit == other.datatype_unit
)
Expand All @@ -124,7 +124,7 @@ def __lt__(self, other):
"""Compares two datatype objects and returns which one contains the lower value"""

return (
self.value < other.value
self._raw < other._raw
and self.datatype_class == other.datatype_class
and self.datatype_unit == other.datatype_unit
)
Expand Down
2 changes: 1 addition & 1 deletion luxtronik/shi/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import logging

from luxtronik.collections import get_data_arr
from luxtronik.common import classproperty, version_in_range
from luxtronik.collections import get_data_arr
from luxtronik.datatypes import Base
from luxtronik.definitions import (
LuxtronikDefinition,
Expand Down