diff --git a/libpebble2/communication/transports/websocket/protocol.py b/libpebble2/communication/transports/websocket/protocol.py index a28f57f..d40e2d9 100644 --- a/libpebble2/communication/transports/websocket/protocol.py +++ b/libpebble2/communication/transports/websocket/protocol.py @@ -125,6 +125,11 @@ class WebSocketTimelinePin(PebblePacket): }) +class WebSocketSpoofedLocation(PebblePacket): + latitude = Double() + longitude = Double() + + class WebSocketTimelineResponse(PebblePacket): class Status(IntEnum): Succeeded = 0x00 @@ -139,7 +144,8 @@ class Status(IntEnum): 0x09: WebSocketProxyAuthenticationRequest, 0x0a: WebSocketPhonesimAppConfig, 0x0b: WebSocketRelayQemu, - 0x0c: WebSocketTimelinePin + 0x0c: WebSocketTimelinePin, + 0x0d: WebSocketSpoofedLocation, } from_watch = { diff --git a/libpebble2/protocol/base/types.py b/libpebble2/protocol/base/types.py index 0d0f04a..43de6e4 100644 --- a/libpebble2/protocol/base/types.py +++ b/libpebble2/protocol/base/types.py @@ -9,7 +9,7 @@ from libpebble2.exceptions import PacketDecodeError, PacketEncodeError __all__ = ["DEFAULT_ENDIANNESS", "Field", "Int8", "Uint8", "Int16", "Uint16", "Int32", "Uint32", - "Int64", "Uint64", "Boolean", "UUID", "Union", "Embed", "Padding", "PascalString", "NullTerminatedString", + "Int64", "Uint64", "Double", "Boolean", "UUID", "Union", "Embed", "Padding", "PascalString", "NullTerminatedString", "FixedString", "PascalList", "FixedList", "BinaryArray", "Optional"] DEFAULT_ENDIANNESS = '!' @@ -151,6 +151,13 @@ class Uint64(Field): struct_format = 'Q' +class Double(Field): + """ + Represents a ``double_t``. + """ + struct_format = 'd' + + class Boolean(Field): """ Represents a ``bool``.