Commit Graph

101 Commits

Author SHA1 Message Date
Bill Sideris 5869af395e
Wifi fully seperate from web-workflow 2023-09-05 22:39:41 +03:00
Bill Sideris 9eaae37dfc
When no password is passed, connect to wifi but do not init web_workflow. 2023-09-05 19:31:18 +03:00
Ted Hess 9c45551880 Do not enable web_workflow background callbacks if wifi is not enabled/connected 2023-05-11 17:01:53 -04:00
Ted Hess ccbb6a58fb Fix web-editor debug on non-standard port using localhost (CORS) 2023-04-22 13:09:18 -04:00
Scott Shawcroft 09c2c5ef0e
Merge pull request #7876 from thess/CORS-update
Simplify CORS checks and don't restrict host names.
2023-04-19 11:07:34 -07:00
Ted Hess 8980ebfa16 Simplify CORS checks and don't restrict host names.
Minor socket cleanup.
2023-04-18 22:09:48 -04:00
Ted Hess 27a97dec16 Static web pages:
- Move loading .js scripts from <head> to <body> for faster rendering
   - Enable back-button support for file system/editor navigation
   - Close WebSocket when navigating away from /cp/serial
   - Use better looking Blinka icon.
2023-04-16 15:53:07 -04:00
Isaac Benitez 532283d1a5 Replace malloc() with static varible 2023-04-10 20:58:21 -07:00
Isaac Benitez e38b5491f4 Add device name env variable for web workflow 2023-04-07 11:45:13 -07:00
Ted Hess 9825b7fbb7 Web Workflow sockets and threads handling improvements.
Fixes polling thread looping forever hangs preventing new connections.
Don't lose listening sockets on mp resets and re-init.
Keep better separation of "system" and "user" sockets.
Track socket states to prevent re-use of sockets before closed.
Close REST socket when transaction completes. No post-init.
Remove unnecessary state flags.
2023-04-05 13:50:42 -04:00
Ted Hess 1a5afd485b Allow web_workflow to startup after deep sleep alarm wakeup 2023-03-29 15:47:17 -04:00
foamyguy 0773a2bd6d increment web_api_version 2023-03-20 17:32:00 -05:00
foamyguy a1506df805 implement real diskinfo functionality 2023-03-17 21:36:13 -05:00
foamyguy 408406c84f starting diskinfo api 2023-03-14 18:09:18 -05:00
Scott Shawcroft 5c517b7e5a
Handle MDNS deinited better. 2023-01-12 11:24:20 -08:00
Scott Shawcroft ca80f30348
Share the web workflow MDNS object with the user
Fixes #7369
2023-01-11 16:05:19 -08:00
Jeff Epler e817563ca0
Update cyw43-driver, fix no-password wifi
Now, open wifi works on Pico W, so this closes #7438.

For the web workflow it's now OK to either
 * specify an empty password string (as before)
 * not have the CIRCUITPY_WIFI_PASSWORD key at all (new functionality)
2023-01-10 15:07:17 -06:00
Scott Shawcroft f8ac1d9261
Rework the coproc API
It is now a generic `memorymap` API and an ESP specific `espulp` module.

Fixes #7218. Fixes #3234. Fixes #7300.
2022-12-19 14:08:38 -05:00
Jeff Epler 808161eaab
fix missing sentinel in call 2022-12-12 19:09:57 -06:00
Jeff Epler 3620d14542
Pass string length when enabling radio 2022-12-12 17:04:03 -06:00
Jeff Epler 1b15985783
Fix web workflow builds 2022-12-12 09:20:56 -06:00
Jeff Epler 44f15d563d
Rename "environ" errors to "getenv" errors 2022-12-09 14:14:53 -06:00
Jeff Epler 3a92c079fc
Finish renaming os_environ_get_key to os_getenv
.. for consistency.
2022-12-09 14:07:23 -06:00
Jeff Epler 3459fe322b
Withdraw the _environ module
This existed solely for testing, so expose it a different way during
the unix coverage build

Also turn off os.getenv support on samd21.
2022-12-08 15:33:10 -06:00
Jeff Epler ef2bfdb5db
dotenv becomes settings.toml 2022-12-08 12:44:20 -06:00
Scott Shawcroft 65e913ecd6
Fix writing files from web workflow
Pico W changes assumed that f_write could handle a NULL fourth
argument. It can't.
2022-11-30 14:22:46 -08:00
Scott Shawcroft c13ca95da1
Add MDNS support to Pico W
This adds both cpy-MAC.local and circuitpython.local support.

Fixes #7214
2022-11-28 16:15:28 -08:00
Scott Shawcroft c3a96a63c0
Enable* web workflow for Pico W
* Except for circuitpython.local which depends on MDNS and will be
done in a follow up PR.

Progress on #7214
2022-11-21 16:24:05 -08:00
Jonathan Myers db28605add Fix mask for minutes field when computing modified_ns 2022-10-02 18:29:07 -07:00
Dan Halbert 52080e24eb status bar control 2022-08-30 15:23:44 -04:00
Melissa LeBlanc-Williams 1ae4d881fd Allow Move/Rename to be called from localhost 2022-08-24 14:50:42 -07:00
Neradoc dfd6fa2114 add serial number to version.json, UID like in boot_out.txt 2022-08-21 04:09:44 +02:00
Scott Shawcroft 3aa5f60cb9
Merge remote-tracking branch 'adafruit/main' into upload_folder 2022-08-17 13:15:37 -07:00
Scott Shawcroft 9a5f00a093
Remove upload button and fix mkdir parents 2022-08-17 11:31:11 -07:00
Scott Shawcroft 1287d9c22d
Merge pull request #6769 from tannewt/ww_move
Add file and directory renaming
2022-08-16 22:11:59 -07:00
Scott Shawcroft 3493be7757
Fix recursive delete, add upload labels and progress 2022-08-16 17:03:09 -07:00
Scott Shawcroft 525eb711c1
Add /code/ for online editing 2022-08-16 15:44:58 -07:00
Scott Shawcroft 85b0be83bf
Add file and directory renaming
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
2022-08-16 13:51:40 -07:00
Scott Shawcroft f1053fb963
Introduce port_yield()
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.
2022-08-11 11:25:34 -07:00
Scott Shawcroft 0b098f5013
Retry send if only some bytes sent
Fixes #6654 and fixes #6689
2022-08-10 11:34:49 -07:00
Dan Halbert a1d48e9978
Merge pull request #6729 from tannewt/websocket_ctrl_c
Read websocket in background to look for ctrl-c
2022-08-10 13:16:09 -04:00
Scott Shawcroft e0fb308972
Decode percent encoded file paths and set charset
Also, fix multiple file uploads from directory browser.

Fixes #6646
2022-08-09 16:36:57 -07:00
Scott Shawcroft 51b65cbea5
Read websocket in background to look for ctrl-c
Otherwise busy Python code that isn't reading input characters
won't be interruptible.

Fixes #6707
2022-08-09 13:57:03 -07:00
Scott Shawcroft 207311b02a
Merge branch 'main' into title_execution_status 2022-08-05 13:42:58 -07:00
Dan Halbert 7ab8a66cda
Merge pull request #6695 from tannewt/always_circuitpy
Get CIRCUITPY FATFS directly.
2022-08-05 11:51:35 -04:00
Scott Shawcroft 577d53dda4
Add execution status into title bar 2022-08-04 16:33:09 -07:00
Scott Shawcroft 185d3e19ec
Switch to temporary redirect for cp.local
This prevents browsers from caching it. Thanks to MakerMelissa for
the suggestion.
2022-08-04 16:25:50 -07:00
Scott Shawcroft 125b276af0
Get CIRCUITPY FATFS directly.
Otherwise, you may actually get a non-root filesystem.

Fixes #6575
2022-08-04 16:06:27 -07:00
Dan Halbert 524cc5e274
Merge pull request #6685 from tannewt/esp32_ww
Enable Web Workflow on Feather ESP32 V2
2022-08-02 21:30:23 -04:00
Scott Shawcroft f8c183bf3a
Merge pull request #6683 from Neradoc/nera-web-workflow-2
Add Authorization to Allow-Headers in web workflow
2022-08-02 11:02:30 -07:00