Commit Graph

17328 Commits

Author SHA1 Message Date
Jeff Epler
d9e336d39f supervisor translate: explain the dictionary 2020-09-15 13:18:04 -05:00
Jeff Epler
9abfc51ced
Merge pull request #3 from ciscorn/dict-comp
Small improvements to the dictionary compression
2020-09-13 12:58:13 -05:00
Taku Fukada
d18d79ac47 Small improvements to the dictionary compression 2020-09-14 01:50:01 +09:00
Jeff Epler
15964a4750 makeqstrdata: Avoid encoding problems
Most users and the CI system are running in configurations where Python
configures stdout and stderr in UTF-8 mode.  However, Windows is different,
setting values like CP1252.  This led to a build failure on Windows, because
makeqstrdata printed Unicode strings to its stdout, expecting them to be
encoded as UTF-8.

This script is writing (stdout) to a compiler input file and potentially
printing messages (stderr) to a log or console.  Explicitly configure stdout to
use utf-8 to get consistent behavior on all platforms, and configure stderr so
that if any log/diagnostic messages are printed that cannot be displayed
correctly, they are still displayed instead of creating an error while trying
to print the diagnostic information.

I considered setting the encodings both to ascii, but this would just be
occasionally inconvenient to developers like me who want to show diagnostic
info on stderr and in comments while working with the compression code.

Closes: #3408
2020-09-12 19:43:08 -05:00
Jeff Epler
40ab5c6b21 compression: Implement ciscorn's dictionary approach
Massive savings.  Thanks so much @ciscorn for providing the initial
code for choosing the dictionary.

This adds a bit of time to the build, both to find the dictionary
but also because (for reasons I don't fully understand), the binary
search in the compress() function no longer worked and had to be
replaced with a linear search.

I think this is because the intended invariant is that for codebook
entries that encode to the same number of bits, the entries are ordered
in ascending value.  However, I mis-placed the transition from "words"
to "byte/char values" so the codebook entries for words are in word-order
rather than their code order.

Because this price is only paid at build time, I didn't care to determine
exactly where the correct fix was.

I also commented out a line to produce the "estimated total memory size"
-- at least on the unix build with TRANSLATION=ja, this led to a build
time KeyError trying to compute the codebook size for all the strings.
I think this occurs because some single unicode code point ('ァ') is
no longer present as itself in the compressed strings, due to always
being replaced by a word.

As promised, this seems to save hundreds of bytes in the German translation
on the trinket m0.

Testing performed:
 - built trinket_m0 in several languages
 - built and ran unix port in several languages (en, de_DE, ja) and ran
   simple error-producing codes like ./micropython -c '1/0'
2020-09-12 10:10:45 -05:00
Scott Shawcroft
7611e71a1b
Merge pull request #3374 from kmatch98/shape_update
Add dirty rectangle tracking to Shape display element
2020-09-11 12:47:54 -07:00
Scott Shawcroft
01daf5b8ce
Merge pull request #3378 from DavePutz/issue3266
Fix for #3266: ensure SPI lock is free after a soft reboot
2020-09-11 12:41:06 -07:00
root
870326b221 Moved SPI unlock code 2020-09-11 10:54:46 -05:00
Kevin Matocha
37e85aebd2 Fix off-by-one error, simplify the logic, add comments 2020-09-10 21:34:03 -05:00
Scott Shawcroft
9256e6b376
Merge pull request #3302 from xiongyihui/main
support to get HID OUT report
2020-09-10 17:35:04 -07:00
Scott Shawcroft
9e722c8c99
Merge pull request #3375 from DavePutz/issue3296
Correction for Issue #3296 - ble hanging on nrf52840
2020-09-10 12:36:17 -07:00
Scott Shawcroft
e5dd2a32f4
Merge pull request #3388 from jerryneedell/jerryn_rfm69
freeze rfm69 and bus_device libraries into feather_m0_rfm69
2020-09-10 11:49:37 -07:00
Scott Shawcroft
1ba28b3edc
Merge pull request #3370 from jepler/compression-bigrams
add bigram compression to makeqstrdata (save ~100 bytes on trinket m0 de_DE)
2020-09-10 11:44:56 -07:00
Dan Halbert
f0bb9635bf
MIssed one change for .last_received_report 2020-09-10 14:21:36 -04:00
Scott Shawcroft
683462c1b1
Merge pull request #3326 from tannewt/native_wifi
Add native wifi API with ESP32S2 support
2020-09-10 11:20:44 -07:00
Dan Halbert
40f3cd3615
Change .report to .last_received_report 2020-09-10 13:26:51 -04:00
Dan Halbert
af742b9ba7
Merge pull request #3386 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-09-10 09:34:05 -04:00
Scott Shawcroft
f3fc7c1c72
Add safe mode translation 2020-09-09 14:34:57 -07:00
Jerry Needell
2529ee2359 freeze rfm69 and bus_device libraries int feather_m0_rfm69 2020-09-09 14:54:20 -04:00
Jelle Jager
5322aa5fcd
Translated using Weblate (Dutch)
Currently translated at 99.2% (779 of 785 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/nl/
2020-09-09 18:05:17 +02:00
hierophect
66cf6c46c0
Merge pull request #3382 from microDev1/tempSense
Add esp32s2 internal temp sensor support
2020-09-09 12:05:10 -04:00
root
59165cabbe Removed unneeded pointer 2020-09-09 10:36:55 -05:00
root
61e1c906bf Merge branch 'issue3266' of https://github.com/DavePutz/circuitpython into issue3266 2020-09-09 09:34:55 -05:00
root
24a18c63f9 Moved SPI unlock to reset_board_busses() 2020-09-09 09:32:25 -05:00
Jeff Epler
0eee93729a Fix decompression of unicode values above 2047
Two problems: The lead byte for 3-byte sequences was wrong, and one
mid-byte was not even filled in due to a missing "++"!

Apparently this was broken ever since the first "Compress as unicode,
not bytes" commit, but I believed I'd "tested" it by running on the
Pinyin translation.

This rendered at least the Korean and Japanese translations completely
illegible, affecting 5.0 and all later releases.
2020-09-08 20:54:47 -05:00
Kevin Matocha
d600759bc8 Utilize MIN and MAX functions from py/misc.h 2020-09-08 20:02:34 -05:00
Jeff Epler
bdb07adfcc translations: Make decompression clearer
Now this gets filled in with values e.g., 128 (0x80) and 159 (0x9f).
2020-09-08 19:07:53 -05:00
Scott Shawcroft
99f5011d74
Fix heap without PSRAM. Never set heap_size. 2020-09-08 17:06:09 -07:00
Scott Shawcroft
bbd802940e
Merge pull request #3377 from jepler/support-udecimal
core: Enable some features neede for a port of python3's decimal module
2020-09-08 13:10:57 -07:00
microDev
14af8e4b42
Added temp_sensor_stop
Co-authored-by: hierophect <hierophect@gmail.com>
2020-09-08 21:07:00 +05:30
microDev
c68723db3c
Update Processor.c 2020-09-08 15:13:48 +05:30
Jeff Epler
540e6d4285
Merge pull request #3352 from jepler/fix-release-build
shared_bindings_matrix revert to using shared-bindings
2020-09-07 16:13:53 -05:00
Jeff Epler
d2d5fe938d
Merge pull request #3380 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-09-07 16:12:09 -05:00
Jonny Bergdahl
19594f4adf
Translated using Weblate (Swedish)
Currently translated at 100.0% (785 of 785 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2020-09-07 21:36:07 +02:00
DavePutz
918a4733b4
Merge pull request #25 from DavePutz/main
update from main
2020-09-07 10:14:36 -05:00
DavePutz
7c162cd1c6
Merge pull request #24 from adafruit/main
Update from adafruit/main
2020-09-07 10:12:13 -05:00
Jeff Epler
7d58cdb12c update expected result with new method 2020-09-07 07:11:23 -05:00
root
8d27533cd4 Make sure SPI lock is free initially 2020-09-06 18:03:25 -05:00
Jeff Epler
73858ea682 circuitpy_mpconfig: enable 3-arg pow() with CIRCUITPY_FULL_BUILD
This is needed for a port of python3's decimal.py module.
2020-09-06 10:07:57 -05:00
Jeff Epler
20c2dd0c08 core: add int.bit_length() when MICROPY_CYPTHON_COMPAT is enabled
This method of integer objects is needed for a port of python3's
decimal.py module.

MICROPY_CPYTHON_COMPAT is enabled by CIRCUITPY_FULL_BUILD.
2020-09-06 09:53:16 -05:00
Jeff Epler
a9779b99fa
Merge pull request #3371 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-09-05 18:59:09 -05:00
root
2690faec43 Moved checks for invalid pin to common-hal/microcontroller/Pin.c 2020-09-05 11:42:06 -05:00
Kevin Matocha
297b7195b0 Delete unnecessary comment 2020-09-04 22:03:57 -05:00
root
ed6cc64c49 Corrected issue with BLE not working on nrf52840 2020-09-04 16:59:41 -05:00
Kevin Matocha
95db456a7e Add final newline 2020-09-04 14:23:53 -05:00
Kevin Matocha
9edad9ea85 Delete trailing blank lines from Shape.c 2020-09-04 14:21:49 -05:00
Kevin Matocha
f7714649ee Add dirty rectangle tracking to Shape display element 2020-09-04 14:15:15 -05:00
Wellington Terumi Uemura
e13698f8f7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (785 of 785 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-09-04 17:15:26 +02:00
Dan Halbert
42df254683
Merge pull request #3373 from dhalbert/trellis-m4-board-i2c
fix pins for trellis_m4 board.I2C()
2020-09-04 11:15:18 -04:00
Scott Shawcroft
96cf60fbbd
Merge remote-tracking branch 'adafruit/main' into native_wifi 2020-09-03 16:34:56 -07:00