Commit Graph

1148 Commits

Author SHA1 Message Date
Neradoc 626296b613 implement root_group in framebufferio.FramebufferDisplay 2022-07-14 11:47:36 +02:00
Scott Shawcroft 6446010753
Wi-Fi autoconnect and title bar status
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
2022-06-09 14:55:54 -07:00
Scott Shawcroft b90563d504
Merge pull request #6442 from FoamyGuy/tilegrid_contains
tilegrid.contains() function
2022-06-06 11:02:43 -07:00
Dan Halbert 80ae14202a
Merge pull request #6416 from FoamyGuy/display_brightness_pwm
display brightness pwm 500hz frequency
2022-06-05 23:52:42 -04:00
foamyguy 260994d16e Merge branch 'main' into display_brightness_pwm 2022-06-04 11:32:15 -05:00
foamyguy c9c864a4f7 fix off by one right and bottom edges of tilegrid.contains() 2022-06-03 17:51:33 -05:00
foamyguy 6831dd8aaa return expression formatting 2022-06-03 17:04:53 -05:00
foamyguy 87f4cd6bca
return expression instead of if statement
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2022-06-03 16:21:50 -05:00
foamyguy ffc451b338 argument for backlight_pwm_frequency and use it in pyportal titano build 2022-05-28 12:01:05 -05:00
foamyguy db318726a2 tilegrid.contains() function 2022-05-27 18:05:44 -05:00
Scott Shawcroft 9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Dan Halbert d631ec38c6
Merge pull request #6407 from tannewt/dotenv
Add dotenv read support
2022-05-26 12:11:33 -04:00
Scott Shawcroft ef3c56816a
Fix two consecutive matches 2022-05-25 15:54:26 -07:00
Dan Halbert 1fb210bd40
Merge pull request #5491 from pypewpew/remove-gamepadshift
Remove gamepadshift module
2022-05-25 13:58:06 -04:00
Radomir Dopieralski c0152e7dab Remove gamepadshift module
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.
2022-05-25 00:48:55 +02:00
Scott Shawcroft 22cada10fa
Fix 64bit builds 2022-05-23 11:29:30 -07:00
Scott Shawcroft a6b60d2083
Merge remote-tracking branch 'adafruit/main' into dotenv 2022-05-23 11:23:20 -07:00
foamyguy 6b04b7efc8 display brightness pwm 500hz frequency 2022-05-21 12:09:23 -05:00
Dan Halbert 309dab4c75 merge 7.3.0-rc.1 changes to main 2022-05-20 15:37:56 -04:00
Dan Halbert f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Scott Shawcroft a30de85d57
Add dotenv read support
os.getenv() will use it (when available) to load variables from
/.env

This will also be useful when we need secrets or config for
CircuitPython outside of the VM (like WiFi credentials.)

Fixes #4212
2022-05-18 14:01:35 -07:00
Scott Shawcroft f975c97c63
Merge pull request #6363 from FoamyGuy/hidden_vectorio
Hidden vectorio
2022-05-18 09:00:13 -07:00
Dan Halbert 4487f61404 Restore automatic gc_collect() after an import 2022-05-18 11:37:13 -04:00
foamyguy 1c564764d6 use draw protocol impl in parent hidden too 2022-05-08 12:14:28 -05:00
foamyguy b6a5f421a9 use draw protocol impl 2022-05-08 12:02:59 -05:00
foamyguy 330e01d8e0 handle groups inside of groups with vectorio hidden 2022-05-07 12:27:36 -05:00
foamyguy c77dc3c828 code format 2022-05-07 11:59:26 -05:00
foamyguy d1aab89a59 remove prints and extra whitespace 2022-05-07 11:57:27 -05:00
foamyguy b03968aee5 hide vectorio objects if their containing group is hidden 2022-05-07 11:50:40 -05:00
foamyguy c8a98d1a18 Merge branch 'adafruit_main' into hidden_vectorio 2022-05-07 10:25:34 -05:00
Jeff Epler 030d5fefa0
Ignore SH1107 quirk if not 1bpp 2022-05-03 09:23:36 -05:00
Dan Halbert 3a8fb4e956
Merge pull request #5852 from jepler/floppy
Add floppyio
2022-04-26 11:40:19 -04:00
Dan Halbert 0642917cf7
Merge pull request #6270 from FoamyGuy/tilegrid_bitmap_property
adding bitmap property to TileGrid
2022-04-25 09:09:28 -04:00
Jeff Epler df5f7bc765
MP3Decoder: better handle indicating end of mp3 audio data to caller
The old formulation
 * wouldn't work if there were ID3 tags at the end
 * would choose whether to background-refill the inbuf
   based on a check before skipping to the next sync word, which
   could be incorrect.

I think it was aspect "B" that ended up triggering the erroneous EOF
problem fixed in the prior commit. This would depend on specific data
sizes and offsets occuring in the file such that a read would be
scheduled but then the buffer would be filled and left 100% full by
find_sync_word(). It's just lucky(?) that a particular person produced
such a file, and/or many files produced by Audacity have those
characteristics.
2022-04-22 14:11:02 -05:00
Jeff Epler 1841af90e2
Don't erroneously set EOF flag if there was room to read 0 bytes 2022-04-22 14:11:01 -05:00
foamyguy 16b81c855d adding bitmap property to TileGrid 2022-04-09 11:26:36 -05:00
foamyguy 666a5ff04c trying to make vectorio shape hidable 2022-04-09 10:09:46 -05:00
Jeff Epler f7be4345d9
Merge remote-tracking branch 'origin/main' into floppy 2022-04-07 08:37:46 -05:00
Dan Halbert 2693a4cfe1
Merge pull request #6069 from gamblor21/uzlib-module
zlib Module
2022-04-06 12:06:44 -04:00
Dan Halbert 83e1b5b058
Merge pull request #6248 from jepler/refactor-keypad
refactor keypad to share more code; fix initial keys pressed
2022-04-06 09:37:43 -04:00
Dan Halbert 359d8e5773
Merge pull request #6234 from jepler/merge-7.2.x
Merge 7.2.x
2022-04-05 16:53:22 -04:00
Jeff Epler d7c86c0e3e
refactor keypad to share more code
This saves 444 bytes on the pygamer build (both commits taken together)

testing performed:
 * pygamer (samd51) with ShiftRegisterKeys
 * macropad (rp2040) with Keys
 * UM feather s2 (esp32-s2) with KeyMatrix

Result:
 * all ports still worked nicely
 * keys held down at start always registered (>2 trials all boards, >100 trials esp32-s2)
 * keys held down are immediately registered after reset() (>100 trials esp32-s2)
 * double .reset() is OK, accessing .events throws (only tested esp32-s2)
2022-04-05 14:50:30 -05:00
Jeff Epler 203dad11bf
keypad: scan immediately on construct, .reset() 2022-04-05 14:50:30 -05:00
Jeff Epler fe98248a3d
Merge remote-tracking branch 'origin/7.2.x' into merge-7.2.x 2022-04-05 08:45:13 -05:00
Reece Robinson 4b0f80f081 Enable support for extended HID usage page and usage. Related to Support HID Usage Pages and Usages >255 #5529 2022-04-05 13:54:07 +12:00
Jeff Epler 683ece76db
MP3Decoder: Accurately inform when no more data
Some audio implementations, notably samd, really don't like it when
you return 0 samples of data. This was the case when reaching the
end of an MP3 file.

Now, we read forward in an MP3 file to the next sync word during
"get_buffer", so that we can accurately return GET_BUFFER_DONE when the
NEXT call WOULD HAVE resulted in 0 samples.

Tested with @gamblor21's "laugh.mp3" file on a Trellis M4 Express.
2022-04-04 09:16:27 -05:00
Mark 8ed7b114cd
Merge branch 'main' into uzlib-module 2022-04-03 11:48:37 -05:00
gamblor21 7d7e66f60f Fix no scaled framebuffer display 2022-03-23 17:37:56 -05:00
gamblor21 f9d7f46d67 Removing DecompIO 2022-03-23 17:02:58 -05:00