Merge pull request #1906 from adafruit/4.0.x
Merge in all bug fixes from 4.0.1 into master
This commit is contained in:
commit
63b253c33a
|
@ -21,7 +21,7 @@ git:
|
|||
# that SDK is shortest and add it there. In the case of major re-organizations,
|
||||
# just try to make the builds "about equal in run time"
|
||||
env:
|
||||
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr" TRAVIS_SDK=arm:nrf
|
||||
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr" TRAVIS_SDK=arm:nrf
|
||||
- TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0" TRAVIS_SDK=arm
|
||||
- TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech" TRAVIS_SDK=arm
|
||||
- TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1" TRAVIS_SDK=arm
|
||||
|
|
|
@ -115,8 +115,8 @@ Behavior
|
|||
output is written to ``boot_out.txt``.
|
||||
- ``code.py`` (or ``main.py``) is run after every reload until it
|
||||
finishes or is interrupted. After it is done running, the vm and
|
||||
hardware is reinitialized. **This means you cannot read state from
|
||||
``code.py`` in the REPL anymore.** CircuitPython's goal for this
|
||||
hardware is reinitialized. **This means you cannot read state from**
|
||||
``code.py`` **in the REPL anymore.** CircuitPython's goal for this
|
||||
change includes reduce confusion about pins and memory being used.
|
||||
- After ``code.py`` the REPL can be entered by pressing any key. It no
|
||||
longer shares state with ``code.py`` so it is a fresh vm.
|
||||
|
@ -131,9 +131,9 @@ Behavior
|
|||
``samd.disable_autoreload()``)
|
||||
- Entering the REPL after the main code is finished requires a key press which enters the REPL and
|
||||
disables autoreload.
|
||||
- Main is one of these: ``code.txt``, **``code.py``**, ``main.py``,
|
||||
- Main is one of these: ``code.txt``, ``code.py``, ``main.py``,
|
||||
``main.txt``
|
||||
- Boot is one of these: ``settings.txt``, ``settings.py``, **``boot.py``**,
|
||||
- Boot is one of these: ``settings.txt``, ``settings.py``, ``boot.py``,
|
||||
``boot.txt``
|
||||
|
||||
API
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 733cdf591639f9dbb5d9187a21411f759e1ba82f
|
||||
Subproject commit 397badae5863a1ce932213ef527e82314ac498a1
|
|
@ -1,6 +1,6 @@
|
|||
LD_FILE = boards/samd21x18-bootloader.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x8035
|
||||
USB_PID = 0x8050
|
||||
USB_PRODUCT = "Arduino MKRZero"
|
||||
USB_MANUFACTURER = "Arduino"
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor
|
|||
|
||||
# Tweak inlining depending on language.
|
||||
ifeq ($(TRANSLATION), zh_Latn_pinyin)
|
||||
CFLAGS_INLINE_LIMIT = 35
|
||||
CFLAGS_INLINE_LIMIT = 25
|
||||
else
|
||||
CFLAGS_INLINE_LIMIT = 55
|
||||
endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
LD_FILE = boards/samd51x19-bootloader-external-flash.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x802C
|
||||
USB_PID = 0x8034
|
||||
USB_PRODUCT = "PyBadge"
|
||||
USB_MANUFACTURER = "Adafruit Industries LLC"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
LD_FILE = boards/samd51x19-bootloader-external-flash.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x802E
|
||||
USB_PID = 0x803E
|
||||
USB_PRODUCT = "PyGamer"
|
||||
USB_MANUFACTURER = "Adafruit Industries LLC"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
LD_FILE = boards/samd51x20-bootloader-external-flash.ld
|
||||
USB_VID = 0x239A
|
||||
USB_PID = 0x8032
|
||||
USB_PID = 0x8036
|
||||
USB_PRODUCT = "PyPortal"
|
||||
USB_MANUFACTURER = "Adafruit Industries LLC"
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
#define MICROPY_PY_BUILTINS_MIN_MAX (1)
|
||||
#define MICROPY_PY_BUILTINS_PROPERTY (1)
|
||||
#define MICROPY_PY_BUILTINS_REVERSED (1)
|
||||
#define MICROPY_PY_BUILTINS_ROUND_INT (1)
|
||||
#define MICROPY_PY_BUILTINS_SET (1)
|
||||
#define MICROPY_PY_BUILTINS_SLICE (1)
|
||||
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (1)
|
||||
|
|
|
@ -455,13 +455,13 @@ STATIC mp_obj_t mp_builtin_round(size_t n_args, const mp_obj_t *args) {
|
|||
return o_in;
|
||||
}
|
||||
|
||||
#if !MICROPY_PY_BUILTINS_ROUND_INT
|
||||
mp_raise_NotImplementedError(NULL);
|
||||
#else
|
||||
mp_int_t num_dig = mp_obj_get_int(args[1]);
|
||||
if (num_dig >= 0) {
|
||||
return o_in;
|
||||
}
|
||||
#if !MICROPY_PY_BUILTINS_ROUND_INT
|
||||
mp_raise_NotImplementedError(NULL);
|
||||
#else
|
||||
|
||||
mp_obj_t mult = mp_binary_op(MP_BINARY_OP_POWER, MP_OBJ_NEW_SMALL_INT(10), MP_OBJ_NEW_SMALL_INT(-num_dig));
|
||||
mp_obj_t half_mult = mp_binary_op(MP_BINARY_OP_FLOOR_DIVIDE, mult, MP_OBJ_NEW_SMALL_INT(2));
|
||||
|
|
Loading…
Reference in New Issue