Commit Graph

18615 Commits

Author SHA1 Message Date
BennyE
17a8bafe05 Choose best AP in range if no channel/bssid given 2020-11-19 23:39:48 +01:00
Scott Shawcroft
2f14609044
Merge pull request #3716 from jepler/keep-event-loop
esp32s2: don't delete the event loop
2020-11-19 14:28:31 -08:00
Jeff Epler
982bce7259 py.mk: allow translation to be overriden in GNUmakefile
I like to use local makefile overrides, in the file GNUmakefile
(or, on case-sensitive systems, makefile) to set compilation choices.
However, writing
    TRANSLATION := de_DE
    include Makefile
did not work, because py.mk would override the TRANSLATION := specified
in an earlier part of the makefiles (but not from the commandline).

By using ?= instead of := the local makefile override works, but when
TRANSLATION is not specified it continues to work as before.
2020-11-19 16:23:35 -06:00
Jeff Epler
aaca3eccf1 samd: PDMIn: Reduce code unrolling on samd21 only
Instead of unrolling the code 16 times, unroll it 4 times and loop
over it 4 times.  This gives the same 16 iterations, but at an expense
of less flash space.
2020-11-19 16:19:37 -06:00
Jeff Epler
b2b8520880 Always use preprocessor for MICROPY_ERROR_REPORTING
This ensures that only the translate("") alternative that will be used
is seen after preprocessing.  Improves the quality of the Huffman encoding
and reduces binary size slightly.

Also makes one "enhanced" error message only occur when ERROR_REPORTING_DETAILED:
Instead of the word-for-word python3 error message
"Type object has no attribute '%q'", the message will be
"'type' object has no attribute '%q'".  Also reduces binary size.
(that's rolled into this commit as it was right next to a change to
use the preprocessor for MICROPY_ERROR_REPORTING)

Note that the odd semicolon after "value_error:" in parsenum.c is necessary
due to a detail of the C grammar, in which a declaration cannot follow
a label directly.
2020-11-19 16:18:52 -06:00
Jeff Epler
c06fc8e02d Introduce, use mp_raise_arg1
This raises an exception with a given object value.  Saves a bit of
code size.
2020-11-19 16:15:06 -06:00
Jeff Epler
d5f6748d1b Use mp_raise instead of nlr_raise(new_exception) where possible
This saves a bit of code space
2020-11-19 16:13:01 -06:00
Jeff Epler
0556f9f851 Revert "samd21: Enable terse error reporting on resource constrained chip family"
This reverts commit 9a642fc049.
2020-11-19 15:12:56 -06:00
Dan Halbert
cd436bad1a Merge remote-tracking branch 'adafruit/main' into sleep 2020-11-19 15:43:49 -05:00
Dan Halbert
649c930536 wip 2020-11-19 15:43:39 -05:00
microDev
a25b27520d
update nvm implementation 2020-11-20 00:22:00 +05:30
microDev
bc9036f353
use pointer to get nvs handle 2020-11-20 00:15:30 +05:30
Jeff Epler
331aa6e59f displayio: When the display is tall, move blinka above the text
This makes a more useful display on the portrait magtag, allowing 21
characters across instead of just 18.  There are 20 full rows of text,
instead of 21.  The total number of characters increases slightly from 378
to 420.

For comparison, the Commodore VIC 20 had 22 rows of 23 characters for a
total of 506 characters. :-P
2020-11-19 11:43:18 -06:00
Jeff Epler
dd108b755d esp32s2: initialize event loop ane netif only once
deinitting these seems to cause problems.
2020-11-19 11:36:02 -06:00
Jeff Epler
60c608b927
Merge pull request #3721 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-11-19 10:44:41 -06:00
Hosted Weblate
142f281153
Merge branch 'origin/main' into Weblate. 2020-11-19 17:43:59 +01:00
Jeff Epler
d53ecac888
Merge pull request #3722 from tannewt/remove_file_urls
Update build board info.
2020-11-19 10:43:53 -06:00
Hosted Weblate
838f66de89
Merge branch 'origin/main' into Weblate. 2020-11-19 17:41:40 +01:00
Jeff Epler
f1e2931752
Merge pull request #3725 from kamtom480/fixed_stack
Return fixed stack on Spresense
2020-11-19 10:41:33 -06:00
Hosted Weblate
062f4b9c18
Merge branch 'origin/main' into Weblate. 2020-11-19 17:40:07 +01:00
Jeff Epler
3e6661bc9d
Merge pull request #3719 from tannewt/fix_palette_grayscale
Fix Palette grayscale
2020-11-19 10:39:57 -06:00
Kamil Tomaszewski
76d4824728 spresense: Return fixed stack 2020-11-19 15:04:52 +01:00
microDev
040eaa0443
re-organize and clean-up 2020-11-19 15:30:15 +05:30
microDev
b56645808c
fix crash on user code exit 2020-11-19 11:44:22 +05:30
Dan Halbert
5bb3c321e9 merge from main 2020-11-19 00:29:14 -05:00
Dan Halbert
682054a216 WIP: redo API; not compiled yet 2020-11-19 00:23:27 -05:00
Jeff Epler
9a642fc049 samd21: Enable terse error reporting on resource constrained chip family
This reclaims over 1kB of flash space by simplifying certain exception
messages.  e.g., it will no longer display the requested/actual length
when a fixed list/tuple of N items is needed:

        if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
            mp_raise_ValueError(translate("tuple/list has wrong length"));
        } else {
            mp_raise_ValueError_varg(translate("requested length %d but object has length %d"),
                (int)len, (int)seq_len);

Other chip families including samd51 keep their current error reporting
capabilities.
2020-11-18 20:37:36 -06:00
Scott Shawcroft
b9bec87f29
Update build board info.
* Don't add full urls because they are too large.
* Remove the unstable version when it starts with the current
  version.
2020-11-18 17:38:06 -08:00
hexthat
b98835a1d7
Translated using Weblate (Chinese (Pinyin))
Currently translated at 100.0% (848 of 848 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2020-11-19 02:28:48 +01:00
Scott Shawcroft
081aec4429
Retry connection when getting NOT_AUTHED
I saw it once with a correct password. Retrying may still fail
but at least it'll try first.
2020-11-18 16:39:34 -08:00
Scott Shawcroft
2463a6d6ac
Fix Palette grayscale for EInk.
It needs to do the bitmasking that was only added to ColorConverter
in #3611
2020-11-18 16:32:07 -08:00
Jeff Epler
f61f8f999b EPaperDisplay: add rotation property
untested, because I don't want to mess my magtag demo up :) but it builds
2020-11-18 18:06:31 -06:00
Jeff Epler
83d790ad8f esp32s2: don't delete the event loop
.. it seems to make the esp-idf grumpy.
2020-11-18 17:45:42 -06:00
Scott Shawcroft
8ac9b176c9
Merge pull request #3711 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-11-18 11:01:53 -08:00
microDev
0d3e81f969
update interrupt handling 2020-11-18 22:22:42 +05:30
microDev
bab41afce7
ps2io implementation for esp32s2 2020-11-18 12:34:56 +05:30
microDev
c457d373e1
update init_timer & frequency calculation 2020-11-18 12:24:48 +05:30
microDev
ff987e7496
add timer peripheral 2020-11-18 12:16:14 +05:30
Hosted Weblate
d999a1d6a9
Merge branch 'origin/main' into Weblate. 2020-11-18 02:11:47 +01:00
Scott Shawcroft
18513dedd1
Merge pull request #3710 from jepler/esp32-i2c-crash
esp32: Two random changes that also fixed the I2C crash for me
2020-11-17 17:11:41 -08:00
Hosted Weblate
ec591e9d7d
Merge branch 'origin/main' into Weblate. 2020-11-18 02:07:07 +01:00
Jeff Epler
226715b147
Merge pull request #3705 from jepler/try-ubuntu-20.04
Switch our workflows to ubuntu 20.04
2020-11-17 19:07:01 -06:00
Wellington Terumi Uemura
8ae7b99627
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (848 of 848 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-11-18 01:28:48 +01:00
Jeff Epler
9206925bf8 esp32s2: port_get_raw_ticks: Use a more efficient, monotonic routine
While trying to debug #3572, I noticed that I would frequently break in
the midst of gettimeofday and that the routine get_adjusted_boot_time
had to take and release locks.  Furthermore, we don't want "adjusted"
boot time, which could go forwards or backwards depending on the
adjustment (such as setting the clock used by gettimeofday() to the network
time)
2020-11-17 17:45:41 -06:00
Jeff Epler
1bc770c3dc esp32s2: PulseIn: Fix supervisor tick enabling
Before, there were two problems:
 * Even if a pulsein was never constructed, supervisor_disable_tick
   would occur during restart.  This could cancel out a supervisor_enable_tick
   from someplace else, with unexpected results.
 * If two or more pulseins were constructed, each one would enable ticks,
   but only the last one deinited (or the reset routine) would disable,
   leaving ticks running indefinitely.

In my testing, it seemed that this led to the board sometimes stopping when
it should have auto-reloaded.
2020-11-17 17:45:41 -06:00
Scott Shawcroft
e2b5ae2d77
Merge pull request #3689 from jepler/issue-3688
esp32s2: wifi: fix several debug-build errors
2020-11-17 13:26:43 -08:00
Jeff Epler
a185549316
Merge pull request #3706 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-11-17 15:21:21 -06:00
Lucian Copeland
0bbdf05936 Implement recvfrom_into and sendto for UDP 2020-11-17 16:11:04 -05:00
Jeff Epler
a0d305042c fix ubuntu-latest stragglers 2020-11-17 09:02:30 -06:00
Jeff Epler
7750b4d671 actions: Disable pagination of 'aws' commands
An anticipatory workaround for
https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html#cliv2-migration-output-pager
2020-11-17 09:02:30 -06:00