Internally this is done with a MOVE HTTP verb. It is modeled after
WebDAV MOVE but not exact to keep the Destination header shorter
and have more consistent response codes.
Fixes#6647
This allows the web workflow send code to yield briefly when
waiting for more room to send in a socket. Waiting for an "interrupt"
could wait forever because the select task only waits for read and
error. Adding wait on write is tricky because much of the time we
don't care if the sockets are ready to write. Using yield avoids
this trickiness.
We may have set retries to 0 to enforce a timeout but the connect
succeeded. When it succeeds, we want to allow retries later in
case we lose signal briefly. (The callback will do this too but
the connect function will override it after.)
Also, remove extra code from websocket that is leftover from
debugging.
* Tweak scroll area position so last line is complete and top is
under the title bar.
* Pick Blinka size based on the font to minimize unused space in
title bar. Related to #2791
* Update the title bar after terminal is started. Fixes#6078Fixes#6668
.. the primary user of which will be the camera, since the framebuffers
must be allocated via esp-idf allocation function and never from the
gc heap.
A board can have a default value, and the value can also be set in the
/.env file using the key CIRCUITPY_RESERVED_PSRAM with the value being
the reserved size in bytes.
Co-authored-by: Dan Halbert <halbert@adafruit.com>
added remote css URL to pull additional CSS from the circuitpython.org site (apologies for the black background - this is temporary, I'll send an update to the CP.org css *very* shortly that will undo this)
* Fixes#6221 - C3 hang on `import wifi`. Enabling the WiFi PHY was
disabling USB. Now boards that use it set CONFIG_ESP_PHY_ENABLE_USB
explicitly.
* Fixes#6655 - Allows pasting into the web serial page. Fixes reading
more than 0xf bytes at a time.
* Fixes#6653 - Fixes web socket encoding of payloads >125 bytes. Can
happen when printing a long string.
* Fixes C3 responsiveness when waiting for key to enter REPL. (It
now correctly stops sleeping.)
* Disables title bar updates when in raw REPL. Related to #6548.
* Adds version to title bar.
1. Run the socket select task at the same priority as CP. This is
needed because it queues up the background work. Without it, CP
needed to sleep to let the lower priority task go.
2. Close the active socket on disconnect. This prevents looping
over a disconnected but not closed socket.
Fixes#6610. Fixes#6613
This adds support for CIRCUITPY_WIFI_SSID and CIRCUITPY_WIFI_PASSWORD
in `/.env`. When both are defined, CircuitPython will attempt to
connect to the network even when user code isn't running. If the
user code attempts to a network with the same SSID, it will return
immediately. Connecting to another SSID will disconnect from the
auto-connected network. If the user code initiates the connection,
then it will be shutdown after user code exits. (Should match <8
behavior.)
This PR also reworks the default displayio terminal. It now supports
a title bar TileGrid in addition to the (newly renamed) scroll area.
The default title bar is the top row of the display and is positioned
to the right of the Blinka logo when it is enabled. The scroll area
is now below the Blinka logo.
The Wi-Fi auto-connect code now uses the title bar to show its
state including the IP address when connected. It does this through
the "standard" OSC control sequence `ESC ] 0 ; <s> ESC \` where <s>
is the title bar string. This is commonly supported by terminals
so it should work over USB and UART as well.
Related to #6174
This breaks the translation dependency to all of the other objects
and therefore speeds up subsequent builds. Now, even when the big
translate() function is inlined in the header, it only needs to be
optimized once.
This allows the compile stage to optimize most of the translate()
function away and saves a ton of space (~40k on ESP). *However*, it
requires us to wait for the qstr output before we compile the rest
of our .o files. (Only qstr.o used to wait.)
This isn't as good as the current setup with LTO though. Trinket M0
loses <1k with this setup.
So, we should probably conditionalize this along with LTO.
Everything should be using the keypad module instead.
Note: there are several boards that still had gamepadshift enabled. I
did not contact their authors to make sure they already switched to
keypad in their code and documentation. We should probably wait with
merging this for their go ahead.
The trigger was happening when reload was suspended and therefore
ignored. Now, manage reload in one place in the file. This may
trigger reloads on BLE command error but that should be rare.
Fixes#6258
Removes:
* AUTORESET_DELAY_MS which never did anything but was introduced
somehow.
* CIRCUITPY_BOOT_BUTTON in all but one ESP board because they all have
them. There is a default based on the strapping pins.
* BOARD_USER_SAFE_MODE_ACTION because it was all the same for boards
with boot buttons. Now the safe mode code manages the message.
This unifies the delay into the post-run delay that also waits
for user input and fake sleep. This ensures we always delay.
Previous code would only delay if the code.py was running when
autoreload was triggered. Now it will always delay.
We also now suspend autoreload when a USB write starts and then
resume on completion. This should prevent reloading in between
sectors of a single write.
- Add reset for autoreload. De-request ticks.
- Separate state a little more in autoreload.c
- Rename some routines.
- Remove redundant settings of CIRCUITPY_AUTORELOAD_DELAY_MS.
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)
Related to #5986
There may be several reasons why we might want to remove the logo form
the REPL: a fork of CircuitPython that doesn't have the right to use the
logo, an especially small display that needs all the room it has to be
useful, displays that are especially vulnerable to burn-in, maybe even
the smaller chips where we want to save as much flash memory as
possible.
This tweaks the RMT timing to better match the 1/3 and 2/3 of 800khz
guideline for timing. It also ensures a delay of 300 microseconds
with the line low before reset.
Pin reset is now changed to the IDF default which pulls the pin up
rather than CircuitPython's old behavior of floating the pin.
Fixes#5679
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.
There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
and unnecessary for the vast majority of builds.
Fixes#4314
New design:
* capture output to a vstr
* compare the complete vstr to boot_out.txt
* rewrite if not a complete match
This is resilient against future changes to the automatic
text written to boot_out.txt.
This also fixes rewriting boot_out.txt in the case where
boot.py prints something.
Perhaps it also saves a bit of code space. Some tricks:
* no need to close a file in read mode
* no need to switch on/off USB write access, going down to the
oofatfs layer doesn't check it anyway