Commit Graph

1742 Commits

Author SHA1 Message Date
Dan Halbert 7f39779f45
Merge pull request #4931 from jepler/struct-time-construct
Allow construction of struct_time from another struct_time
2021-06-30 22:59:46 -04:00
Scott Shawcroft 54cadb96ec
Merge pull request #4952 from jepler/colorconverter-bgr
ColorConverter: Add "BGR" color modes.
2021-06-30 10:19:25 -07:00
Jeff Epler d83a21b984 ColorConverter: Add "BGR" color modes.
The BGR565_SWAPPED mode is needed for OV2640 cameras.
2021-06-30 10:29:31 -05:00
dmcomm ae8ea915d7
Fix pulseio.PulseIn __len__() documentation 2021-06-29 13:38:12 +01:00
microDev fd681ca70a
minor fix for struct_time docs 2021-06-29 08:11:16 +05:30
Jeff Epler 3dcd603e39 time: Fix and better document time.struct_time constructor
INCOMPATIBLE CHANGE: struct_time(1,2,3,4,5,6,7,8,9) is now _rejected_
just as on standad Python.

This incorrect constructor was added by me in #2327; I assumed
without even checking that the `struct_time` constructor was also
compatible with the `namedtuple` constructor, but it is not and has
always been rejected by standard Python (checked 2.7 and 3.9)

This commit restores the specific error message that we used for this
purpose, which was removed in the previous commit either out of laziness
or out of trying to reduce unneeded error strings. In this case, the
alternate string is too misleading (it refers to arguments, not to
sequence elements) so let's put the better message back.
2021-06-28 19:28:00 -05:00
Scott Shawcroft 8a5a7457ab
Merge pull request #4928 from 2bndy5/fix-bus-device-docs
update busio & adafruit_bus_device docs
2021-06-28 15:38:24 -07:00
Dan Halbert ae5080955e
Merge pull request #4938 from dhalbert/displayio.Display-doc-fixes
Fix displayio.Display __init__() signature documentation
2021-06-28 10:35:17 -04:00
Dan Halbert 259d5b9e7d Fix displayio.Display __init__() signature documentation 2021-06-28 09:32:50 -04:00
Jeff Epler cac71a33fc time: Allow constructing a struct_time from another struct_time
Closes: #4917
2021-06-26 20:25:24 -05:00
Brendan 9ff9259d1c fix interlinking in busio docs 2021-06-26 01:50:28 -07:00
Brendan 02c70336ff
fix I2CDevice docs 2021-06-25 23:38:08 -07:00
Brendan dc02f97640
fix SPIDevice docs 2021-06-25 23:35:30 -07:00
Scott Shawcroft d67fb852a1
Merge pull request #3454 from cwalther/setnextcode
Add supervisor.set_next_code_file()
2021-06-25 11:00:53 -07:00
Scott Shawcroft dc76306cfa
Enable a BLE workflow
nRF CircuitPython boards will now provide the file transfer
service defined here: https://github.com/adafruit/Adafruit_CircuitPython_BLE_File_Transfer

USB capable boards will only advertise if previously bonded to a
device or if the reset button is pressed during the fast blue
flashes on start up. When pressed, the board will restart again but
the blue period will not flash.

Boards without USB will always advertise.

When previously bonded, the advertisement is private so that no
other peers can connect. If advertising publicly, the tx power is
lowered to reduce the likelihood of bonding from a distance.

This PR also fixes issues with loading identities of bonded peers
so that our address can now be resolved and we can resolve others'
addresses when scanning.
2021-06-24 12:59:14 -07:00
Dan Halbert 36472a0a8b
Correct doc in EventQueue.c
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2021-06-23 19:23:56 -04:00
Dan Halbert 2e67d6708d check_for_deinit() more places in scanners 2021-06-23 15:42:31 -04:00
Dan Halbert 4f538b6c09 remove pressed() and get_states_into() 2021-06-23 15:10:38 -04:00
Dan Halbert 7774b18895 Add reset() to scanners. Clear .overflow on EventQueue.clear(). 2021-06-23 15:04:09 -04:00
Dan Halbert acf90fbb43 many renamings; add overflowed flag to EventQuque 2021-06-23 09:57:15 -04:00
Dan Halbert f052dc4d8b ShiftRegisterKeys: allow specifying sense of latch 2021-06-21 19:50:05 -04:00
Dan Halbert 8c74b4a5f2 fix some typos 2021-06-21 17:47:12 -04:00
Dan Halbert 51c547a5b9 add generic arg validation routines; add interval args to keypad 2021-06-21 12:13:39 -04:00
Dan Halbert a718d33157 fix doc typos 2021-06-21 09:04:26 -04:00
Dan Halbert ed41acd879 merge from upstream to fix translations 2021-06-21 08:26:44 -04:00
Dan Halbert 154e91ab85 add EventQueue.store_next() to allow reusing event objects 2021-06-21 08:18:06 -04:00
Lucian Copeland cf9741bd3a Merge remote-tracking branch 'upstream/main' into setnextcode 2021-06-20 15:25:37 -04:00
Jeff Epler 198e3aded7 imagecapture: Fix doc markup, update docs for data_pins
Closes: #4896
2021-06-18 12:40:35 -05:00
Dan Halbert 8cd7e774e7 add KeyMatrix columns_to_anodes arg 2021-06-18 12:03:47 -04:00
Dan Halbert af66931f71 Added keypad.ShiftRegisterKeys 2021-06-17 20:51:45 -04:00
Dan Halbert a152bd3b72 add .num_keys and .store_states() to Keys and KeyMatrix 2021-06-17 12:02:54 -04:00
Dan Halbert cd31136c30 factor out keypad.EventQueue 2021-06-16 15:55:54 -04:00
Dan Halbert 1803a6a71d both Keys and KeyMatrix work 2021-06-15 11:15:09 -04:00
Dan Halbert 350652ee21 Keys works; more testing to do 2021-06-14 22:59:17 -04:00
Dan Halbert 32eec85230 compiles 2021-06-14 20:54:43 -04:00
Dan Halbert 627c426259 wip 2021-06-14 16:00:15 -04:00
Jeff Epler 268717e427 ParallelImageCapture: Switch to taking a list of pins
.. adopting validate_pins from RGBMatrix into shared-bindings

.. updating other platforms for API change
2021-06-10 11:15:18 -05:00
Dan Halbert c6e2237ac7 fix non-longint builds 2021-06-10 09:05:19 -04:00
Dan Halbert 01a8a95b2c fix signed/unsigned compilation problem 2021-06-10 01:14:16 -04:00
Dan Halbert d3d9e0a487 add debouncing 2021-06-10 00:07:23 -04:00
Dan Halbert 7d23206018 Inital keypad work: Keys working: one pin per key
keypad.Buttons and keypad.State

Buttons -> Keys; further work

wip

wip

wip: compiles

about to try

keypad.Keys working
2021-06-08 20:27:31 -04:00
EmergReanimator f2e3231c46 resolves #4153: Fixed build issue when CIRCUITPY_USB is off 2021-06-04 10:12:50 +02:00
Jeff Epler d888238dfe
Update __init__.c
some small typos
2021-06-01 19:15:51 -05:00
Scott Shawcroft a94b8cf972
Merge pull request #4823 from jepler/ondiskbitmap-palette
OnDiskBitmap: INCOMPATIBLE CHANGE: Allow them to use palettes
2021-06-01 13:18:51 -07:00
Jeff Epler 193f8b7264 Fixes needed after micropython merges
.. this branch was old and stale, it turns out
2021-05-28 11:13:55 -05:00
Jeff Epler 9df8f235b1 OnDiskBitmap: INCOMPATIBLE CHANGE: Allow them to use palettes
Before, when an OnDiskBitmap was a paletted bitmap type, the palette
was internal to the OnDiskBitmap, and it internally performed the palette
conversion itself.  When using with a tilegrid, a ColorConverter() object
always had to be passed.

Now, an OnDiskBitmap has a "pixel_shader" property.  If the bitmap is
a paletted bitmap type, it is a (modifiable) Palette object.  Otherwise,
it is a ColorConverter() object as before. This allows palette effects
to be applied to paletted OnDiskBitmaps.

Code that used to say:
```python
face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter())
```
must be updated to say:
```python
face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
```

Compatible code for 6.x and 7.x can say
```python
face = displayio.TileGrid(odb, pixel_shader=getattr(odb, 'pixel_shader', ColorConverter())
```
2021-05-28 10:53:21 -05:00
Dan Halbert e7f82f864a fix check of usb_hid.Device out_report_length 2021-05-27 21:29:38 -04:00
Jonny Bergdahl 38177aff33 Removed 'raw' from error message 'raw in' 2021-05-22 12:36:28 +02:00
Scott Shawcroft 20946d97a1
Merge pull request #4743 from tannewt/simplify_status_led
Simplify the status LED to save power
2021-05-21 10:55:11 -07:00
Scott Shawcroft 22e8b20907
Merge pull request #4792 from Neradoc/nera-fix-IPv4Address
Fix ipaddress.IPv4Address from returning invalid values
2021-05-21 10:47:41 -07:00