Sat, 25 Feb 2023 19:43:06 +0100
MicroPython
- fixed an issue in the board info script because some boards don't have the 'binascii' module
src/eric7/MicroPython/Devices/DeviceBase.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/MicroPython/Devices/DeviceBase.py Fri Feb 24 18:09:20 2023 +0100 +++ b/src/eric7/MicroPython/Devices/DeviceBase.py Sat Feb 25 19:43:06 2023 +0100 @@ -984,26 +984,26 @@ except AttributeError: res['flash_info_available'] = False -import binascii as __ba_ try: import machine as __mc_ if isinstance(__mc_.freq(), tuple): res['mc_frequency_mhz'] = __mc_.freq()[0] / 1000000.0 else: res['mc_frequency_mhz'] = __mc_.freq() / 1000000.0 - res['mc_id'] = __ba_.hexlify(__mc_.unique_id(), ':').decode().upper() + res['mc_id'] = __mc_.unique_id() del __mc_ except ImportError: try: import microcontroller as __mc_ res['mc_frequency_mhz'] = __mc_.cpu.frequency / 1000000.0 res['mc_temp_c'] = __mc_.cpu.temperature - res['mc_id'] = __ba_.hexlify(__mc_.cpu.uid, ':').decode().upper() + res['mc_id'] = __mc_.cpu.uid del __mc_ except ImportError: res['mc_frequency'] = None res['mc_temp'] = None -del __ba_ +if 'mc_id' in res: + res['mc_id'] = ':'.join('{0:02X}'.format(x) for x in res['mc_id']) try: import ulab as __ulab_