Skip to content

Commit 0147697

Browse files
committed
Merge remote-tracking branch 'origin/master' into moat
2 parents 6d91982 + 68e3e07 commit 0147697

File tree

198 files changed

+4325
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+4325
-543
lines changed

.github/workflows/package_tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Package tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-python@v4
11+
- name: Setup environment
12+
run: source tools/ci.sh && ci_package_tests_setup_micropython
13+
- name: Setup libraries
14+
run: source tools/ci.sh && ci_package_tests_setup_lib
15+
- name: Run tests
16+
run: source tools/ci.sh && ci_package_tests_run

CONTRIBUTING.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,20 @@ Pages](https://docs.github.com/en/pages):
102102
"truthy" value).
103103
5. The settings for GitHub Actions and GitHub Pages features should not need to
104104
be changed from the repository defaults, unless you've explicitly disabled
105-
them.
105+
Actions or Pages in your fork.
106106

107107
The next time you push commits to a branch in your fork, GitHub Actions will run
108108
an additional step in the "Build All Packages" workflow named "Publish Packages
109-
for branch".
109+
for branch". This step runs in *your fork*, but if you open a pull request then
110+
this workflow is not shown in the Pull Request's "Checks". These run in the
111+
upstream repository. Navigate to your fork's Actions tab in order to see
112+
the additional "Publish Packages for branch" step.
110113

111114
Anyone can then install these packages as described under [Installing packages
112-
from forks](README.md#installing-packages-from-forks). The exact commands are also
113-
quoted in the GitHub Actions log for the "Publish Packages for branch" step.
115+
from forks](README.md#installing-packages-from-forks).
116+
117+
The exact command is also quoted in the GitHub Actions log in your fork's
118+
Actions for the "Publish Packages for branch" step of "Build All Packages".
114119

115120
#### Opting Back Out
116121

micropython/aioespnow/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A supplementary module which extends the micropython `espnow` module to provide
44
`asyncio` support.
55

66
- Asyncio support is available on all ESP32 targets as well as those ESP8266
7-
boards which include the `uasyncio` module (ie. ESP8266 devices with at least
7+
boards which include the `asyncio` module (ie. ESP8266 devices with at least
88
2MB flash storage).
99

1010
## API reference
@@ -52,7 +52,7 @@ A small async server example::
5252
```python
5353
import network
5454
import aioespnow
55-
import uasyncio as asyncio
55+
import asyncio
5656

5757
# A WLAN interface must be active to send()/recv()
5858
network.WLAN(network.STA_IF).active(True)

micropython/aioespnow/aioespnow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# aioespnow module for MicroPython on ESP32 and ESP8266
22
# MIT license; Copyright (c) 2022 Glenn Moloney @glenn20
33

4-
import uasyncio as asyncio
4+
import asyncio
55
import espnow
66

77

8-
# Modelled on the uasyncio.Stream class (extmod/stream/stream.py)
9-
# NOTE: Relies on internal implementation of uasyncio.core (_io_queue)
8+
# Modelled on the asyncio.Stream class (extmod/asyncio/stream.py)
9+
# NOTE: Relies on internal implementation of asyncio.core (_io_queue)
1010
class AIOESPNow(espnow.ESPNow):
1111
# Read one ESPNow message
1212
async def arecv(self):

micropython/aiorepl/aiorepl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async def execute(code, g, s):
4141
code = "return {}".format(code)
4242

4343
code = """
44-
import uasyncio as asyncio
44+
import asyncio
4545
async def __code():
4646
{}
4747

micropython/bluetooth/aioble-central/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metadata(version="0.2.1")
1+
metadata(version="0.3.0")
22

33
require("aioble-core")
44

micropython/bluetooth/aioble-core/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metadata(version="0.2.0")
1+
metadata(version="0.4.0")
22

33
package(
44
"aioble",

micropython/bluetooth/aioble-peripheral/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metadata(version="0.2.0")
1+
metadata(version="0.2.1")
22

33
require("aioble-core")
44

micropython/bluetooth/aioble/aioble/central.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import bluetooth
77
import struct
88

9-
import uasyncio as asyncio
9+
import asyncio
1010

1111
from .core import (
1212
ensure_active,
@@ -104,7 +104,9 @@ async def _cancel_pending():
104104

105105
# Start connecting to a peripheral.
106106
# Call device.connect() rather than using method directly.
107-
async def _connect(connection, timeout_ms):
107+
async def _connect(
108+
connection, timeout_ms, scan_duration_ms, min_conn_interval_us, max_conn_interval_us
109+
):
108110
device = connection.device
109111
if device in _connecting:
110112
return
@@ -122,7 +124,13 @@ async def _connect(connection, timeout_ms):
122124

123125
try:
124126
with DeviceTimeout(None, timeout_ms):
125-
ble.gap_connect(device.addr_type, device.addr)
127+
ble.gap_connect(
128+
device.addr_type,
129+
device.addr,
130+
scan_duration_ms,
131+
min_conn_interval_us,
132+
max_conn_interval_us,
133+
)
126134

127135
# Wait for the connected IRQ.
128136
await connection._event.wait()
@@ -195,12 +203,14 @@ def name(self):
195203

196204
# Generator that enumerates the service UUIDs that are advertised.
197205
def services(self):
198-
for u in self._decode_field(_ADV_TYPE_UUID16_INCOMPLETE, _ADV_TYPE_UUID16_COMPLETE):
199-
yield bluetooth.UUID(struct.unpack("<H", u)[0])
200-
for u in self._decode_field(_ADV_TYPE_UUID32_INCOMPLETE, _ADV_TYPE_UUID32_COMPLETE):
201-
yield bluetooth.UUID(struct.unpack("<I", u)[0])
202-
for u in self._decode_field(_ADV_TYPE_UUID128_INCOMPLETE, _ADV_TYPE_UUID128_COMPLETE):
203-
yield bluetooth.UUID(u)
206+
for uuid_len, codes in (
207+
(2, (_ADV_TYPE_UUID16_INCOMPLETE, _ADV_TYPE_UUID16_COMPLETE)),
208+
(4, (_ADV_TYPE_UUID32_INCOMPLETE, _ADV_TYPE_UUID32_COMPLETE)),
209+
(16, (_ADV_TYPE_UUID128_INCOMPLETE, _ADV_TYPE_UUID128_COMPLETE)),
210+
):
211+
for u in self._decode_field(*codes):
212+
for i in range(0, len(u), uuid_len):
213+
yield bluetooth.UUID(u[i : i + uuid_len])
204214

205215
# Generator that returns (manufacturer_id, data) tuples.
206216
def manufacturer(self, filter=None):

micropython/bluetooth/aioble/aioble/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from micropython import const
55
from collections import deque
6-
import uasyncio as asyncio
6+
import asyncio
77
import struct
88

99
import bluetooth

0 commit comments

Comments
 (0)