revert init_packet.py, change back tool for osx to script instead of binary

This commit is contained in:
hathach committed 2017-04-19 16:00:03 +07:00
1 parent c7185c7e41
commit 89a0956ab4
2 files changed
+10 -6

No files matched your search

+2 -2
View File
@@ -50,10 +50,10 @@ feather52.build.nrfutil=nrfutil
feather52.build.nrfutil.windows={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/win32/nrfutil.exe
# Legacy MacOS nrfutil location, this is for when people had it globally
# installed and is left just for reference:
#feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil
feather52.build.nrfutil.macosx=/usr/local/bin/nrfutil
# Frozen MacOS nrfutil location, this uses a frozen or pre-built standalone
# version of nrfutil included in the BSP (no manual install required):
feather52.build.nrfutil.macosx={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/macos/nrfutil
#feather52.build.nrfutil.macosx={runtime.platform.path}/tools/nrfutil-0.5.2/binaries/macos/nrfutil
feather52.menu.debug.l0=Level 0 (Release)
feather52.menu.debug.l0.build.debug_flags=-DCFG_DEBUG=0
@@ -79,8 +79,10 @@ class Packet(object):
format_string = self.__generate_struct_format_string()
args = []
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
# If you got error message AttributeError: 'int' object has no attribute 'value'.
# Uncomment line 84 and comment out line 85 and run 'python setup.py install'
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
# Add length to fields that required that
if key in [PacketField.REQUIRED_SOFTDEVICES_ARRAY,
PacketField.OPT_DATA]:
@@ -95,8 +97,10 @@ class Packet(object):
format_string = "<" # Use little endian format with standard sizes for python,
# see https://docs.python.org/2/library/struct.html
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
# If you got error message AttributeError: 'int' object has no attribute 'value'.
# Uncomment line 102 and comment out line 103 and run 'python setup.py install'
#for key in sorted(self.init_packet_fields.keys(), key=lambda x: x):
for key in sorted(self.init_packet_fields.keys(), key=lambda x: x.value):
if key in [PacketField.DEVICE_TYPE,
PacketField.DEVICE_REVISION,
]: