Skip to content

Commit

Permalink
fix: increase sub-msg hour bit length (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
prefixFelix authored May 9, 2024
1 parent fe698e3 commit b338dc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyais/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def get_sotdma_comm_state(radio: int) -> Dict[str, typing.Optional[int]]:
if slot_timeout == 0:
result['slot_offset'] = sub_msg
elif slot_timeout == 1:
result['utc_hour'] = (sub_msg >> 9) & 0xf
result['utc_hour'] = (sub_msg >> 9) & 0x1f
result['utc_minute'] = (sub_msg >> 2) & 0x3f
elif slot_timeout in (2, 4, 6):
result['slot_number'] = sub_msg
Expand Down

0 comments on commit b338dc3

Please sign in to comment.