1
0

lock.py 583 B

1234567891011121314151617181920212223242526
  1. from __future__ import annotations
  2. from enum import Enum
  3. class LockStatus(Enum):
  4. LOCKED = 0
  5. UNLOCKED = 1
  6. LOCKING = 2
  7. UNLOCKING = 3
  8. LOCKING_STOP = 4 # LOCKING_BLOCKED
  9. UNLOCKING_STOP = 5 # UNLOCKING_BLOCKED
  10. NOT_FULLY_LOCKED = 6 # LATCH_LOCKED - Only EU lock type
  11. HALF_LOCKED = 7 # Only Lock2 EU lock type
  12. class QuickKeyFunction(Enum):
  13. """
  14. Action of the Lock Ultra Quick Key.
  15. Value is the 2-bit function field of the Quick Key config byte. Lock Ultra.
  16. """
  17. LOCK_AND_UNLOCK = 0b10
  18. UNLOCK_ONLY = 0b01
  19. LOCK_ONLY = 0b00