Skip to content
Open
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
8 changes: 7 additions & 1 deletion libpebble2/communication/transports/websocket/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ class WebSocketTimelinePin(PebblePacket):
})


class WebSocketSpoofedLocation(PebblePacket):
latitude = Double()
longitude = Double()


class WebSocketTimelineResponse(PebblePacket):
class Status(IntEnum):
Succeeded = 0x00
Expand All @@ -139,7 +144,8 @@ class Status(IntEnum):
0x09: WebSocketProxyAuthenticationRequest,
0x0a: WebSocketPhonesimAppConfig,
0x0b: WebSocketRelayQemu,
0x0c: WebSocketTimelinePin
0x0c: WebSocketTimelinePin,
0x0d: WebSocketSpoofedLocation,
}

from_watch = {
Expand Down
9 changes: 8 additions & 1 deletion libpebble2/protocol/base/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '!'
Expand Down Expand Up @@ -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``.
Expand Down