Skip to content

Commit

Permalink
Returning diag. frames and removing deprecated func. call (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4deszes authored Mar 12, 2023
1 parent 839eb96 commit f611870
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.19.0] - 2023-03-12

### Added

- ISO17987 version support
- Grammar support for the following ISO17987 fields:
- `LDF_file_revision`
- Endianness

### Changed

- `LDF::get_frame` can now return diagnostic frames

### Fixes

- `LinSlave` protocol version property is now the correct type
- `LinUnconditionalFrame::decode` no longer calls the deprecated `parse_raw` function

## [0.18.0] - 2022-12-13

Expand Down
2 changes: 1 addition & 1 deletion ldfparser/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def decode(self,
frame_layout = u6p2u8u1u1p6
"""
parsed = self.parse_raw(data)
parsed = self.decode_raw(data)
converted = {}
for (signal_name, value) in parsed.items():
signal = self._get_signal(signal_name)
Expand Down
6 changes: 5 additions & 1 deletion ldfparser/ldf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_slaves(self) -> List[LinSlave]:
"""
return self._slaves.values()

def get_frame(self, frame_id: Union[int, str]) -> Union[LinUnconditionalFrame, LinEventTriggeredFrame, LinSporadicFrame]:
def get_frame(self, frame_id: Union[int, str]) -> Union[LinUnconditionalFrame, LinEventTriggeredFrame, LinSporadicFrame, LinDiagnosticFrame]:
try:
return self.get_unconditional_frame(frame_id)
except LookupError:
Expand All @@ -98,6 +98,10 @@ def get_frame(self, frame_id: Union[int, str]) -> Union[LinUnconditionalFrame, L
pass
try:
return self.get_sporadic_frame(frame_id)
except LookupError:
pass
try:
return self.get_diagnostic_frame(frame_id)
except LookupError as exc:
raise exc

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[metadata]
version = 0.18.0
version = 0.19.0

0 comments on commit f611870

Please sign in to comment.