Commit Graph

17569 Commits

Author SHA1 Message Date
Jeff Epler
85756fa0cd make translate 2020-09-21 16:45:51 -05:00
Jeff Epler
4869dbdc67 canio: rename from _canio
This reflects our belief that the API is stable enough to avoid incompatible changes during 6.x.
2020-09-21 16:44:26 -05:00
Jeff Epler
493679da3b CAN.listen: block until a message comes in or timeout is reached 2020-09-21 16:44:26 -05:00
Jeff Epler
9e8f1820c8 canio.CAN: switch rx/tx, make both mandatory, move declarations around 2020-09-21 16:44:26 -05:00
Jeff Epler
4e4853dcb2 common.template.ld: remove unneeded line 2020-09-21 16:44:26 -05:00
Jeff Epler
fd9df164c0 canio: Message: remove size property
This is just duplicating what len(message.data) gives you.
2020-09-21 16:44:26 -05:00
Jeff Epler
df379b84cb remove unneeded symbols 2020-09-21 16:44:26 -05:00
Jeff Epler
7fd6cab2ac canio: Make both tx and rx (but not both) optional
.. loopback and silent come from the (optional) constructor parameters
not guessing based on the pin specification

.. docstring & comment improvements
2020-09-21 16:44:26 -05:00
Jeff Epler
09f8a83a75 samd: template.ld: put canram in its own output section 2020-09-21 16:44:26 -05:00
Jeff Epler
c39ec1581e _canio: Message: setting data clears rtr, and vice versa 2020-09-21 16:44:26 -05:00
Jeff Epler
a76119afcb add _canio to Feather M4 CAN 2020-09-21 16:44:26 -05:00
Jeff Epler
67d8f108bb Add CAN to SAM E51 clock config 2020-09-21 16:44:26 -05:00
Jeff Epler
44c5b2bbb1 Respond to review comments
Thanks @tannewt!
2020-09-21 16:44:26 -05:00
Jeff Epler
a69b298aed Whitespace 2020-09-21 16:44:26 -05:00
Jeff Epler
58b920ed97 fix whitespace 2020-09-21 16:44:26 -05:00
Jeff Epler
27cbb690e5 _canio: Add listener matching
Lightly tested:
 * no matches (catch-all)
 * standard address single address matches (even and odd positions)
 * standard address mask matches
 * only tested that extended doesn't match non-extended
2020-09-21 16:44:26 -05:00
Jeff Epler
2cb4707f92 Message: add extended address flag 2020-09-21 16:44:26 -05:00
Jeff Epler
ca32a81bf1 main.c: Correct CANIO if-guard 2020-09-21 16:44:26 -05:00
Jeff Epler
40d4a69133 more doc improvements 2020-09-21 16:44:26 -05:00
Jeff Epler
1eb0587917 correct docstring 2020-09-21 16:44:26 -05:00
Jeff Epler
635fcadb59 _canio.CAN: add error handling & bus state 2020-09-21 16:44:26 -05:00
Jeff Epler
f8dcf2118e _canio: Add _canio.State enum-like class 2020-09-21 16:44:26 -05:00
Jeff Epler
37af9dde90 Listener: fix doc markup, include in globals of its module 2020-09-21 16:44:26 -05:00
Jeff Epler
65ca1c7bbc _canio: Message: Setting data should set the size to match 2020-09-21 16:44:26 -05:00
Jeff Epler
a2e1867f69 _canio: Minimal implementation for SAM E5x MCUs
Tested & working:

 * Send standard packets
 * Receive standard packets (1 FIFO, no filter)

Interoperation between SAM E54 Xplained running this tree and
MicroPython running on STM32F405 Feather with an external
transceiver was also tested.

Many other aspects of a full implementation are not yet present,
such as error detection and recovery.
2020-09-21 16:44:26 -05:00
Jeff Epler
e7a213a114 py: Add enum helper code
This makes it much easier to implement enums, and the printing code is
shared.  We might want to convert other enums to this in the future.
2020-09-21 16:44:26 -05:00
Jeff Epler
183649aad8 samd: move mcu_find_pin_function to header
.. it'll be used in can as well as sdio
2020-09-21 16:44:07 -05:00
Lucian Copeland
22d9a94f2b Use write_value, add missing pin exceptions 2020-09-21 13:47:14 -04:00
Scott Shawcroft
df067b498d
Merge pull request #3446 from jepler/python35-compression-fix
makeqstrdata: Work around python3.5/3.6 compatibility problem
2020-09-21 10:35:00 -07:00
Scott Shawcroft
c963771b4b
Merge pull request #3445 from microDev1/boardInfo
Update microS2 config files
2020-09-21 10:33:38 -07:00
Jeff Epler
0318eb359f makeqstrdata: Work around python3.6 compatibility problem
Discord user Folknology encountered a problem building with Python 3.6.9,
`TypeError: ord() expected a character, but string of length 0 found`.

I was able to reproduce the problem using Python3.5*, and discovered that
the meaning of the regular expression `"|."` had changed in 3.7.  Before,
```
>>> [m.group(0) for m in re.finditer("|.", "hello")]
['', '', '', '', '', '']
```
After:
```
>>> [m.group(0) for m in re.finditer("|.", "hello")]
['', 'h', '', 'e', '', 'l', '', 'l', '', 'o', '']
```
Check if `words` is empty and if so use `"."` as the regular expression
instead.  This gives the same result on both versions:
```
['h', 'e', 'l', 'l', 'o']
```
and fixes the generation of the huffman dictionary.

Folknology verified that this fix worked for them.

 * I could easily install 3.5 but not 3.6.  3.5 reproduced the same problem
2020-09-21 10:03:07 -05:00
microDev
40ec7a66e4
Update microS2 config files 2020-09-21 14:39:31 +05:30
Dan Halbert
8eda9174b2
Merge pull request #3443 from jepler/python-version-compat
makeqstrdata: Work with older Python
2020-09-20 10:18:21 -04:00
Jeff Epler
ce266425e1
Merge pull request #3441 from hierophect/stm32-rgbmatrix-crashfix
STM32: Add never_reset reservation to RGBMatrix init
2020-09-20 07:51:09 -05:00
Dan Halbert
9d9bc5adee
Merge pull request #3428 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-09-19 15:20:39 -04:00
Wellington Terumi Uemura
54001079f7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (800 of 800 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-09-19 19:41:29 +02:00
Hosted Weblate
ed9173498f Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-09-19 19:41:29 +02:00
Alvaro Figueroa
fb123cebf2 Translated using Weblate (Spanish)
Currently translated at 100.0% (799 of 799 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2020-09-19 19:41:29 +02:00
Wellington Terumi Uemura
dd0f5f1b21 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (799 of 799 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-09-19 19:41:29 +02:00
Maciej Stankiewicz
63ac3a5a43 Translated using Weblate (Polish)
Currently translated at 73.2% (585 of 799 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pl/
2020-09-19 19:41:29 +02:00
Hosted Weblate
22becafde9 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-09-19 19:41:29 +02:00
Wellington Terumi Uemura
07f944bf67 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (796 of 796 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-09-19 19:41:29 +02:00
Hosted Weblate
e1071bb14a Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-09-19 19:41:29 +02:00
Maciej Stankiewicz
aeec662fef Translated using Weblate (Polish)
Currently translated at 71.3% (567 of 795 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pl/
2020-09-19 19:41:29 +02:00
Hugo Dahl
852bdd2137 Translated using Weblate (French)
Currently translated at 94.7% (753 of 795 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2020-09-19 19:41:29 +02:00
Dan Halbert
9cc803eb95
Merge pull request #3432 from bd34n/rename-bdmicro-vina-m0-d21
Rename board bdmicro_vina_m0 to bdmicro_vina_d21 and update boardfiles.
2020-09-19 13:41:21 -04:00
Jeff Epler
bfbbbd6c5c makeqstrdata: Work with older Python
This construct (which I added without sufficient testing,
apparently) is only supported in Python 3.7 and newer.  Make it
optional so that this script works on other Python versions.  This
means that if you have a system with non-UTF-8 encoding you will
need to use Python 3.7.

In particular, this affects a problem building circuitpython in
github's ubuntu-18.04 virtual environment when Python 3.7 is not
explicitly installed.  cookie-cuttered libraries call for Python
3.6:
```
    - name: Set up Python 3.6
      uses: actions/setup-python@v1
      with:
        python-version: 3.6
```
Since CircuitPython's own build calls for 3.8, this problem was not
detected.

This problem was also encountered by discord user mdroberts1243.

The failure I encountered was here:
https://github.com/jepler/Jepler_CircuitPython_udecimal/runs/1138045020?check_suite_focus=true
.. while my step of "clone and build circuitpython unix port" is
unusual, I think the same problem would have affected "build assets"
if that step had been reached.
2020-09-19 10:16:13 -05:00
Dan Halbert
b28b31196d
Merge pull request #3438 from nitz/patch-1
[Makerdiary nRF52840 M.2 Devkit] Add SDA & SDL, RX & TX to pins.c
2020-09-18 21:51:22 -04:00
Dan Halbert
dfd09bba57
Merge pull request #3433 from astrobokonon/esp32s2-bssid
ESP32S2: Allow connecting to specific bssid
2020-09-18 21:31:15 -04:00
Dan Halbert
8cf0171c06
Merge pull request #3431 from hierophect/stm32-spi-writevalue
STM32: Change SPI Read to acknowledge write_value
2020-09-18 19:46:21 -04:00