mirror of
https://github.com/google/pebble.git
synced 2025-05-27 13:33:12 +00:00
spelling: definition
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
2d7ac814c6
commit
a0b9ef4851
6 changed files with 15 additions and 15 deletions
|
@ -28,7 +28,7 @@ class PebbleAppHeader(object):
|
|||
|
||||
# 116 bytes
|
||||
V1_STRUCT_VERSION = (0x08, 0x01)
|
||||
V1_STRUCT_DEFINTION = [
|
||||
V1_STRUCT_DEFINITION = [
|
||||
# format, name, deserialization transform, serialization transform
|
||||
('B', 'sdk_version_major', None, None),
|
||||
('B', 'sdk_version_minor', None, None),
|
||||
|
@ -49,9 +49,9 @@ class PebbleAppHeader(object):
|
|||
|
||||
# 120 bytes
|
||||
V2_STRUCT_VERSION = (0x10, 0x00)
|
||||
V2_STRUCT_DEFINTION = list(V1_STRUCT_DEFINTION)
|
||||
del V2_STRUCT_DEFINTION[12] # relocation list was dropped in v2.x
|
||||
V2_STRUCT_DEFINTION += [
|
||||
V2_STRUCT_DEFINITION = list(V1_STRUCT_DEFINITION)
|
||||
del V2_STRUCT_DEFINITION[12] # relocation list was dropped in v2.x
|
||||
V2_STRUCT_DEFINITION += [
|
||||
('I', 'resource_crc', None, None),
|
||||
('I', 'resource_timestamp', None, None),
|
||||
('H', 'virtual_size', None, None),
|
||||
|
@ -59,8 +59,8 @@ class PebbleAppHeader(object):
|
|||
V2_HEADER_LENGTH = 10 + 120
|
||||
|
||||
DEFINITION_MAP = {
|
||||
V1_STRUCT_VERSION: V1_STRUCT_DEFINTION,
|
||||
V2_STRUCT_VERSION: V2_STRUCT_DEFINTION,
|
||||
V1_STRUCT_VERSION: V1_STRUCT_DEFINITION,
|
||||
V2_STRUCT_VERSION: V2_STRUCT_DEFINITION,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -23,7 +23,7 @@ import stm32_crc
|
|||
|
||||
class PebbleFirmwareBinaryInfo(object):
|
||||
V1_STRUCT_VERSION = 1
|
||||
V1_STRUCT_DEFINTION = [
|
||||
V1_STRUCT_DEFINITION = [
|
||||
('20s', 'build_id'),
|
||||
('L', 'version_timestamp'),
|
||||
('32s', 'version_tag'),
|
||||
|
@ -67,7 +67,7 @@ class PebbleFirmwareBinaryInfo(object):
|
|||
|
||||
def _get_footer_struct(self):
|
||||
fmt = '<' + reduce(lambda s, t: s + t[0],
|
||||
PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION, '')
|
||||
PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION, '')
|
||||
return struct.Struct(fmt)
|
||||
|
||||
def _get_footer_data_from_elf(self, path):
|
||||
|
@ -85,7 +85,7 @@ class PebbleFirmwareBinaryInfo(object):
|
|||
return footer_data
|
||||
|
||||
def _parse_footer_data(self, footer_data):
|
||||
z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINTION,
|
||||
z = zip(PebbleFirmwareBinaryInfo.V1_STRUCT_DEFINITION,
|
||||
self.struct.unpack(footer_data))
|
||||
return {entry[1]: data for entry, data in z}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class ResourceGenerator(ResourceGeneratorBase):
|
|||
'filename': str(definition_dict['file'] if 'file' in definition_dict else None)}
|
||||
resources = [resource]
|
||||
|
||||
# Now generate ResourceDefintion objects for each resource
|
||||
# Now generate ResourceDefinition objects for each resource
|
||||
target_platforms = definition_dict.get('targetPlatforms', None)
|
||||
aliases = definition_dict.get('aliases', [])
|
||||
builtin = False if bld.variant == 'applib' else definition_dict.get('builtin', False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue