#circuitpython-dev

1 messages ยท Page 52 of 1

atomic summit
#

Took a bit of hackery, but I can call it from the commandline now...

#
Resetting Serial Port...
Serial port reset
Attempting to get board attention
10 
>>> import os
>>> os.chdir('/')
>>> import supervisor
>>> supervisor.runtime.autoreload=False
>>> import writefile
>>> Copying tinyc6.py to tinyc6.py

Local Dir:  /Users/seon  Remote (micro) Dir:  /
Local file:  tinyc6.py  Remote (micro) file:  tinyc6.py
writefile.wf('tinyc6.py')
############################################################*
Transmission Errors:  0
seon@seon-m2-max-studio ~ % 

#

at least for a COPY ๐Ÿ™‚

#

once I get my testjig going with this and it works, I'll revisit refactoring all of it into a command line version rather than input based, then I'll pass it back to you ๐Ÿ™‚

wraith crow
#

Cool ๐Ÿ‘

atomic summit
#

Well, that's not working @wraith crow ๐Ÿ˜ฆ

#
>>> import os
>>> os.listdir()
['?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', 'boot_out.txt']
>>> ```
#

It's just one of those days ๐Ÿ™‚

wraith crow
#

Wow, looks like a directory corruption of some sort, not sure how that could be done from the python code. Did you try a binary copy?

atomic summit
#

no, just a normal and safe copy

wraith crow
#

give it an erase_filesystem and try the binary

atomic summit
#

I erase the entire flash on every test

#

this is what I see if I dont copy the files

#
>>> os.listdir()
['boot_out.txt']
>>> ```
#

This is happening on a rPI - didn't see this issues on my Mac.

#

I'll keep digging

wraith crow
#

Back when I wrote this, I was using Windows, I wonder if it has something to do with line termination or directory separator differences between Linux and PC/MAC

#

I'll pull out my TinyPico and give it a try on Ubuntu

atomic summit
#

ok, it only seems to happen if I issue 2 COPY or CCOPY commands in a row

#
# subprocess.call("python mubootstrap.py /home/pi/testjig/shipping_files/tinyc6/cpy_do_io.py code.py", shell=True)```
#

this works..

#

but if I uncomment the second line, it corrupts

#

both flush and clsoe ser when they are done.

#

I got it - needed a slight delay between the 2 CCOPY commands

wraith crow
#

Well that's good, I guess the copy should perform the delay after it's finshed.

#

I wonder if the wildcard copies would have the same problem

atomic summit
#

noen of this is teh fault of your code - it wasn't designed to be run liek I am running it.

#

๐Ÿ˜‰

wraith crow
#

The C6 is probably faster than anything I was using as well

atomic summit
#

And I'm totally abusing your code, hahahaha

wraith crow
#

LOL, well I did only use it with the wonky user interface which meant it was probably impossible to run two copy commands right after each other

manic glacierBOT
wraith crow
#

On the tinypico wildcard (*.py) copies didn't have a problem so I suspect the C6 is too fast for what writefile is trying to do. The wildcard function (multicpy) doesn't appear to have any delays and it does multiple copies one after another

atomic summit
#

I'm not wildcarding them as I have to rename then as they copy. So it will be due to the way I am butchering your code ;). It's all good - working great now - just implementing the RDEL function so I can remove writefile.py once testing is done

#

Your code was a total life saver for me... without it, I'd not be able to etst any of my new TinyC6 boards or ship them next week! Thanks heaps @wraith crow !!!! Please DM me your address details and I'l send you a bunch of my gear!

manic glacierBOT
#

I used 16384 as the maximum length of a waveform (which maybe should have been 16383 since the upper bound is inclusive); this should probably match, which means it would be good if there was a #define for it in shared-module/synthio/__init__.h.

I don't have any notes that show why I used 16384 instead of a higher value like 32767. I may have been concerned about overflow in arithmetic.

manic glacierBOT
#

Adafruit CircuitPython 9.0.0-alpha.5 on 2023-11-15; Adafruit QT Py ESP32-S3 no psram with ESP32S3

code.py output (the first few times) :
]0;๐Ÿ192.168.0.144 | code.py | 9.0.0-alpha.5\scanning
Traceback (most recent call last):
File "code.py", line 5, in
File "adafruit_ble/init.py", line 271, in start_scan
ValueError: Prefix buffer must be on the heap
]0;๐Ÿ192.168.0.144 | 271@adafruit_ble/init.py ValueError | 9.0.0-alpha.5
Code done running.

**After repeated run...

manic glacierBOT
#

The module is now included, and works as expected.
It's currently on the repo https://github.com/bill88t/CircuitPython_AXP313A

I will continue to maintain the module and ship incremental fixes and updates.
If Adafruit wants to own the repo, that is fine by me, and I will transfer it.

>>> import storage; storage.erase_filesystem()

[13:16:35.031] Disconnected
[13:16:36.032] Warning: Could not open tty device (No such file or directory)
[13:16:36.032] Waiting for tty device.....
manic glacierBOT
#

Hi @jepler! Thanks for chiming on this. I have no issue updating those docstrings (which were rushed initially) and creating that global #define, but after further thought, I want discuss some potential modifications first.

  • These properties may be simplified and more semantic if they were a single tuple called waveform_loop such as (start, end).
  • I do like needing to specify the index of the loop end, but it may be wiser to instead ask for the loop length. Currently, loop_end is ...
brazen hatch
#

I hav no idea what's wrong.

onyx hinge
#

@brazen hatch I will see if I can figure out that failure.

It is happening during ci_set_matrix, which is the script that decides what CI actually needs to be performed, such as which boards to build. It does this based on a list of files changed. One of the files changing matches "frozen", so it iterates over all boards and checks whether the board's FROZEN_MPY_DIRS match that frozen module (if so, that board needs to be built)

It appears to be unexpected that a board would not have a FROZEN_MPY_DIRS value; boards that don't freeze anything must be intended to have an empty value, not no value.

#
[snippage]
KeyError: 'FROZEN_MPY_DIRS'
```the problem is possible for me to reproduce locally on main branch, so it's not a problem that you caused.
brazen hatch
#

It happened as I added the new frozen module for the pmic

onyx hinge
#

right, which triggers the "a modified file matches 'frozen'" code, which maybe doesn't trigger very often.

brazen hatch
#

yea, it's visible

#

So prolly that bit isn't working very well.
I have no idea how this didn't pop up already.
Aren't the frozen modules updated?

onyx hinge
#

The problem appears to have been introduced sometime since 9.0.0-alpha.0 and maybe we haven't updated frozen modules since then.

manic glacierBOT
#

When a frozen module was added or updated, a build error would occur during CI: KeyError: 'FROZEN_MPY_DIRS'.

In e40abda1bc I decided that it should be an error if all the expected keys were not defined in the board settings dict. I made this change and all seemed to be well; however, my testing did not exercise the case that a frozen module was changed.

It turns out that FROZEN_MPY_DIRS was not being set in the board settings dict because the output of print-FROZEN_MPY_DIRS was "`...

brazen hatch
#

These new CP builds never fail to amaze.
-17kb ram used.
It's calculated with gc.mem_alloc() + gc.mem_free() at boot time.

#

I guess whatever idf uses ends up shrinking the other heap.

#

I guess I will have to probe it on-the-fly

wraith crow
#

It appears someone's discord bot when a bit click happy and clicked on every reaction emoji :/

manic glacierBOT
onyx hinge
wraith crow
#

I don't know if it needs attention, but if you check the reaction icons for the last day or two on this channel and I also peeked at the help-with-circuitpython channel FSXPilot18 added an additional click to each. Maybe they were just really happy to be part of the community but it did seem like a flag that a bot was in operation.

#

I have no idea if it represents any possible issue, but bots always make me nervous

onyx hinge
#

@wraith crow can you link to a specific post with the reaction emoji? I scrolled a bit but didn't immediately see one.

wraith crow
onyx hinge
#

oh so you're seeing that a single user is adding their identical reaction to each existing reaction.

wraith crow
#

Yes

#

Something a screen scraper might do?

onyx hinge
#

got it. I'll mention it to other mods and we will keep an eye out.

crimson ferry
#

a person by that handle was more active in discussions on this server a year or two ago (or so), but perhaps it's a newer account

wraith crow
#

I'm happy leaving it to the mods now, but I guess the account could have been pinged with a question asking about it I probably don't know what I don't know ๐Ÿ˜„

manic glacierBOT
brazen hatch
#

Are we going to transfer the pmic repo or is it fine as is?

manic glacierBOT
#

I'm also having issues with I2SOut causing my esp32-s3 to crash and enter safe mode. I can reproduce it with the code from the MAX98357 learn guide for the sine wave output. There error I get is that the watchdog timer expired.

# SPDX-FileCopyrightText: 2018 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import time
import array
import math
import audiocore
import board
import audiobusio

sample_rate = 8000
tone_volume = .1  # Increase or decreas...
#

I am not sure #8615 resolved the problem. A similar error occured in https://github.com/adafruit/circuitpython/actions/runs/6906615046/job/18792200464?pr=8628 which included the change from this PR:

devkit_xg24_brd2601b: Building languages: en_US, de_DE, en_GB, en_x_pirate, es, fil, fr, ID, it_IT, ja, nl, pl, pt_BR, ru, sv, tr, zh_Latn_pinyin
Error: Build devkit_xg24_brd2601b for en_US took 19.95s and failed
make: Entering directory '/home/runner/work/circuitpython/circuitpython/ports...
crimson ferry
#

has anyone seen NeoPixels freak out on ESP32-S3?```
Traceback (most recent call last):
File "code.py", line 1238, in <module>
File "neopixel.py", line 180, in _transmit
RuntimeError: Input/output error
Traceback (most recent call last):
File "code.py", line 1238, in <module>
File "neopixel.py", line 180, in _transmit
RuntimeError: All timers in use

brazen hatch
#

Uhh no? Does it work with neopixel_write?

crimson ferry
#

I don't know, this only happens occasionally, on certain boards (same code, but could be subtle differences in operation due to different run parameters). This used to happen on some ESP32-S2 boards, and I wrote a function to deinit and reinit the NeoPixel, and that let me limp along. But just curious if this gets seen in the wild by others.

brazen hatch
#

Nope. Never seen it. Even the cursed ESP32-Cx are fine with it.
And I have done days of uptime.

wraith crow
stuck elbow
#

you can have only so many things that use timers at once

crimson ferry
#

no pwm, or any other peripherals really, other than led and wifi. I think the timer exception arises only if I ignore the I/O exception a few times ...plus rtc and watchdog

#

but other boards running the same code don't get this exception.

stuck elbow
#

the io exception?

#

perhaps a timer is not released properly when an error happens

ornate breach
#

it seems like the S3 has a lot of timer issues

manic glacierBOT
#

The USB PID for arduino_nano_esp32s3 was 0x0070. This is the PID Arduino uses for DFU. This caused the serial port not to show up on Windows if the Arduino ESP32 BSP was installed into Arduino and the corresponding Windows drivers to be installed. They took precedence over treating this as a normal serial port.

MicroPython uses 0x056B. We have use that correct PID for arduino_nano_esp32s3_inverted_status_led. Workaround is to use that build for now. The original PR flipped back and for...

crimson ferry
manic glacierBOT
#

CircuitPython version

9.0.0.0-alpha5

Code/REPL

# SPDX-FileCopyrightText: 2021 Jose David M.
# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT

# NOTE: Make sure you've set up your settings.toml file before running this example
# https://learn.adafruit.com/getting-started-with-web-workflow-using-the-code-editor/
"""
This example shows a web address QR on the display
"""

import time
i...
manic glacierBOT
#

I don't have a strong feeling about a pair of properties vs a single property that is a tuple. Here are some things to consider:

  • with a tuple, you can guarantee the assignment is atomic (both start and end updated at the same time)
  • you can check that 0 <= start < end and reject some nonsense
  • (but you can't check end < len(waveform) since waveform can be updated dynamically with a waveform of a different length

Creating a fresh tuple requires allocations, but so do many thin...

manic glacierBOT
manic glacierBOT
#

I think that's normal.

=== # test 1
=== 
=== foo = "test1"
=== 
=== print("Checking TileGrid", foo
=== )  # close the parens on the next line is OK
=== print("some more stuff")
=== 
=== 
Checking TileGrid test1
some more stuff


=== # test 2
=== 
=== foo = "test1"
=== 
=== print("Checking TileGrid", foo
=== print("some more stuff")  # line 6
=== 
Traceback (most recent call last):
  File "<stdin>", line 6
SyntaxError: invalid syntax
brazen hatch
#

The new memory management is finally truly stable I think.

manic glacierBOT
#

I get ya, I suppose I've been spoilt by other languages that show the offending lines contents and first character/token that breaches syntax. I wonder if the exception shouldn't be the line that never finishes correctly, so on a multi-line if / print, the print is never complete so the start is the beginning of the error. Maybe a more informative syntax error could be given containing the offending statements with line numbers.

manic glacierBOT
#

The CPython parser is better about this:

print (3
if 0:
    pass

CPython:

  File "/home/halbert/foo.py", line 1
    print (3
          ^
SyntaxError: '(' was never closed

CircuitPython/MicroPython:

  File "/home/halbert/foo.py", line 2
SyntaxError: invalid syntax

But the MicroPython parser just works differently, so I wouldn't characterize this as "wrong".

Closing as inherent, but it's an interesting observation.

manic glacierBOT
#

oh, yeah, we should think about this.

We have previously allowed frozen modules that are in personal accounts and organization:

	url = https://github.com/pewpew-game/pew-pewpew-standalone-10.x.git
	url = https://github.com/python-ugame/circuitpython-stage.git
	url = https://github.com/pypewpew/pew-pewpew-lcd.git
	url = https://github.com/dahanzimin/circuitpython_lib.git
	url = https://github.com/elecfreaks/circuitpython_ef_music.git
	url = https://github.com/elecfreaks/circuitpy...
manic glacierBOT
manic glacierBOT
#

It's kinda my first time ever submitting a module at any capacity.
I up until this point, made modules for myself, and packaged them the ljinux way (CircuitMPY).

I honestly didn't even know cookiecutter exists up until now.
I've been kinda living under a rock when it comes to proper module distribution.

I will try to get to know the CP way, but currently I lack the experience of the dependencies.
I do not have any pylint or readthedocs experience I do not know how to set them up.

manic glacierBOT
manic glacierBOT
#

I see this issue has been closed.
I am testing an SSD1608 and see that the text_area.y is ignored. i.e. on first refresh the test is in the correct location. On the subsequent refresh the x position is correct the y position it at the top of the display.

The workaround is to use the same trick suggested by @anecdata ...

CODE:

displayio.release_displays()
spi = busio.SPI(SCK_PIN, MOSI_PIN)
display_bus = displayio.FourWire(spi, command=DC_PIN, chip_select=CS_PIN, reset=RESET_PI...
manic glacierBOT
#

CircuitPython version

CircuitPython 8.2.8 running on Solderparty RP2040 Stamp

Code/REPL

displayio.release_displays()
spi = busio.SPI(SCK_PIN, MOSI_PIN)
display_bus = displayio.FourWire(spi, command=DC_PIN, chip_select=CS_PIN, reset=RESET_PIN, baudrate=1000000)
time.sleep(1)
display = adafruit_ssd1608.SSD1608(display_bus, width=200, height=200, busy_pin=BUSY_PIN)

display_group = displayio.Group()
background_bitmap = displayio.Bitmap(INK_WIDTH, INK_HE...
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.8 on 2023-11-16; Bee-Data-Logger with ESP32S3
Board ID:smartbeedesigns_bee_data_logger

Code/REPL

import time, alarm, board, adafruit_ds3231

i2c = board.I2C()
rtc = adafruit_ds3231.DS3231(i2c)

if alarm.wake_alarm == None:
    rtc.datetime = time.struct_time((2024, 1 , 1, 12, 30, 0 ,0,-1,-1))
    alarm_epoch = time.mktime(time.struct_time((2024, 1 , 1, 12, 30, 5 , 0,-1,-1)))
    alarm.exit_and_deep_s...
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
onyx hinge
#

I am trying to figure out what's up with that

tulip sleet
#

I was just about to ask ๐Ÿ™‚

manic glacierBOT
#

In #8639 Dan noticed that weblate was still offering "%S" as a string to translate. I don't understand why this occurs, because the string is no longer in circuitpython.pot; so weblate should move it to the "fuzzy" section of the .po files when it synchronizes them.

I also noticed that the "%02X" string should never be localized and moved it to synthetic.pot.

After making that change, I ran "make translate" followed by "make msgmerge"; normally we rely on weblate running this step, but ...

#

Something unrelated is breaking some jobs in CI. I'll re-run these when it's done.

Run sudo apt-get update
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
Get:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [3531 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
[...]
Reading package lists...
E: Repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease' changed its 'Origin' value from 'microsoft-ubuntu-jammy-prod jammy' to...
onyx hinge
#

Repository metadata like that is supposed to stay consistent; erroring when it changes is apt's way of helping keep you from updating to something you didn't expect (like when the "stable" release of debian is updated, which is a time you need to take care updating your packages). I hope this is just a mistake they made in deploying some of their apt package servers that will be fixed. Otherwise, a LOT of workflows will be broken.

tulip sleet
onyx hinge
#

if so yay

tulip sleet
#

maybe human-caused and quickly fixed

onyx hinge
#

Pythonโ€™s PyPI replaces RPMs as the main packaging method, which allows for easy installation across Linux distributions.
What in the world.

onyx hinge
#

looks like they've fixed it but maybe it's slow in rolling out. On the re-run of those actions, there's at least one that got the "pulp 3" error.

manic glacierBOT
#
  • I've decided to keep the current implementation mostly because I'm not a big fan of the current method of handling note envelopes.
  • I was not aware of the use of memoryview in this way. I see that as a great option for basic waveshaping, but it does conflict with the needs of sampling.
  • I've added in the define as SYNTHIO_WAVEFORM_SIZE and also made the slight adjustment of requiring that the loop_end parameter be at least 1. This makes sense from a semantic point of view, but make se...
tulip sleet
#

@onyx hinge I merged the %S etc. fix so you can proceed with the weblate stuff

onyx hinge
#

thank you

#

weblate is now unlocked and open for translations. I hope this vanquishes the "%S" from the po files for good now.

tulip sleet
#

maybe need to undo the latest user changes

onyx hinge
#

I did that

tulip sleet
#

After I merged, it did a force push with the latest user changes, hmm

onyx hinge
#

because I used "reset all changes in the weblate repository"

tulip sleet
manic glacierBOT
brazen hatch
# manic glacier

@tulip sleet Would you please clarify what you want me to do? Add a note to readme & code comments?

tulip sleet
#

but doesn't have to be in the PR

onyx hinge
#

<@&356864093652516868> Happy thanksgiving week to y'all. We'll be holding our weekly meeting in about 1 hour from now. Please take the time to add any notes you have to the notes doc: https://docs.google.com/document/d/1wQlnIywB9v88w8W-PSWXyB9DKKyS06AnKd6TS4s87pk/edit?usp=sharing and if you would like the host (me) to read them out during the meeting just write a parenthetical note to that effect

onyx hinge
#

Since it's thanksgiving week, I'd like to invite folks who want to do either or both of the following:

  • in hug reports, tell us something you are grateful for
  • in status updates, tell us about a thanksgiving or other holiday tradition that is particularly meaningful to you

This doesn't have to be related to circuitpython in any way, except that it's something you'd like to share with your fellows in this community.

solar whale
#

Happy Thanksgiving all! ๐Ÿฆƒ

#

At least all in the US.

onyx hinge
#

For the "state of" section, I can grab the "blinka" section, as Melissa is out this week. @tulip sleet @lone axle are you able to do the core & libaries sections as you often do?

tulip sleet
#

sure

lone axle
#

Yep, I am good for the library section.

tulip sleet
#

@onyx hinge a little overdriving (scratchy-sounding) on your mic audio

#

tiny bit

#

that is better now

lone axle
crimson ferry
#

Erin's SMS guide, linked from newsletter, is 404

tulip sleet
#

@turbid radish ^^

manic glacierBOT
#

Great job on the documentation, @jepler! I didn't want to get my hands too dirty on that one, but I think you nailed it. I'll try to put together a standalone gist soon to better demonstrate the use of synthio for sampling. Plus, I think the recent addition of synthio.Synthesizer.note_info could help make this even better.

errant grail
#

Thank you. Have a wonderful Thanksgiving holiday!

lone axle
#

Thanks for hosting Jeff. Hope everyone has a Happy Thanksgiving and great week!

candid sun
#

thanks for hosting Jeff!

celest marsh
#

hello!
my $dayjob is security and operations at a CI/CD company, my passion is in release engineering, python and microcontrollers.
Is there anything that I can do in the circuitpython dev space that you all need that aligns with any of the above? I know that I will need to absorb the current culture, but I'm willing to do the legwork to get to be able to help. Is there a list of infra related bugs or glitches that people just don't have time for that I can chew on?

tulip sleet
# celest marsh hello! my $dayjob is security and operations at a CI/CD company, my passion is ...

Thanks for your offer. You can review the existing open issues. There is a tooling label, for example: https://github.com/adafruit/circuitpython/labels/tooling. There are also other repos that are used for CircuitPython: all the Adafruit_CircuitPython_* libraries, and various infrastruture repos: https://github.com/adafruit/circuitpython-org/issues, https://github.com/adafruit/adabot/issues (for instance https://github.com/adafruit/adabot/issues/263 is right now a problem

https://github.com/adafruit/circuitpython-build-tools/issues

celest marsh
#

oh nice! I shall go start reading them and seeing if I can get the build environment setup

tulip sleet
celest marsh
#

do you all need any resources that I may be able to wrangle for the community?

tulip sleet
#

do you mean CPU cycles? We are fine on that

#

we use GitHub Actions, and since we are open-source, we get free runs

celest marsh
#

yea, CPU is the easiest one for me to go get the sales folk to flip the "this project is free" bit

#

ahh

#

I work for CircleCI

#

first things first, let me get those links opened up and start reading

manic glacierBOT
manic glacierBOT
#

This is not fixed. I tested it at f3920c49dc7c717beb630ada61e61d75de2cf60d.

It looks like the native_group() call is being a passed a super object and mp_obj_cast_to_native_base() doesn't know how to convert that to the native base. I'm not sure if that's what it should do or if it shouldn't be passed the super object in the first place.

A non-displayio example would be really helpful because then we could add a test for it and debug via the unix port.

manic glacierBOT
#

I wrote a gist that shows what may be as many as 3 distinct problems with subclassing, properties, & super(). The test uses NativeBaseClass, a class that @tannewt recently added to the unix coverage build for exactly this sort of testing (thanks!). This test runs on only on the "unix coverage build", not on microcontrollers.

class N(NativeBaseClass):

    @property
    def subtest(self):
        return super().test

    @subtest.setter
    def subtest(self, value):
       ...
onyx hinge
#

Here is the notes document for next Mondayโ€™s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if youโ€™ll be attending the meeting - itโ€™s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and weโ€™ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1QDaoWlm2Ar_MKxavn5JsRf88OjvyVv1W40qtqwVWhQk/edit?usp=sharing

manic glacierBOT
manic glacierBOT
#

Ah, of course there will be a thread on that parameter to pull that will stretch into other areas of synthio -- I appreciate your reminder to look deeper. My limited knowledge of C++ might slow me down a bit, but I'll see what I can find. Hopefully it's just used as a multiplier to control gain.

Regarding negative amplitude values, allowing the amplitude to control a signal's phase is very "op-amp" like and would likely resolve the current CV issue without resorting to a new class.

desert yarrow
#

It seems like the USB Host support for the Raspberry Pi Pico W has now landed in CircuitPython. However, when I run the following:

import board
import usb_host

print("before...")
usb_host.Port(board.GP16, board.GP17)
print("after...")

I see this error message...

RuntimeError: All state machines in use

Is the USB Host support "not quite there yet" or should this be working?

spare jacinth
#

Not used it myself, but im pretty sure i've seen people running it (or at least getting further than that)

That error message looks PIO-related, which makes no sense to me if you dont have any other code ๐Ÿ™ƒ

#

Are you using some stable (8.x) build or an experimental one(9.x)?

desert yarrow
#

9.x

desert yarrow
#

That message only occurs 3 times in the code... one is spurious (framebuffer code), the other is when there really is no room for another state machine (possible), and the last one is from the usb_host code (which I am actually using here, so it's the most likely cause)

#

Maybe it's too much to drive the RPI Pico W with WiFi and USB Host (via PIO) at the same time?

manic glacierBOT
tulip sleet
# desert yarrow 9.x

Could you try a simple example in 9.0.0-alpha.2 vs 9.0.0-alpha.5? This might be a storage management issue. Thanks.

mortal kernel
tulip sleet
#

so maybe this is just not going to work

spare jacinth
#

Maybe they are tho

mortal kernel
#

I'll take a quick dive into the code and get back.

tulip sleet
#

I don't see any use of pio in common-hal/wifi; I'm confused

mortal kernel
#

It's in the SDK.

tulip sleet
#

oooh

mortal kernel
#

sdk/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.[c,pio]

onyx hinge
#

doh. we aren't running the "circuitpy" tests at CI time. ```diff
diff --git a/tests/run-tests.py b/tests/run-tests.py
index 4d738e8e37..927121fda0 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -977,6 +977,7 @@ the last matching regex is used:
if args.test_dirs is None:
test_dirs = (
"basics",

  •            "circuitpython", # CIRCUITPY-CHANGE
               "micropython",
               "misc",
               "extmod",
    
mortal kernel
#

The CYW43 PIO is claimed in cyw43_spi_init that gets invoked early out of port_init.

#

So, the claim is independent of whether or not wifi is inited.

#

I count on it being there for _bleio, too.

#

Bottom line is that on a Pico W usb_host will never work with wifi or _bleio. It would be some fairly invasive surgery to get usb_host to work without wifi or _bleio.

#

Flashing a Pico W with a Pico .uf2 would allow usb_host to function, but the functions re-routed through the CYW43's GPIO pins will not work. That's the LED and VSYS sensing.

#

The RT6154A PS control would be lost, too.

tulip sleet
#

I wonder why PIO is used for SPI instead of regular SPI. But maybe the right pins are not connected to the module and it is impossible.

mortal kernel
#

From my notes:| Wire | RP2040 | CYW43439 | RT6154A | Notes |
|-|--------|----------|-------|--|
| WL_GPIO0 | | GPIO0 | | replaces GPIO25<br>Green LED D2 |
| WL_GPIO1 | | GPIO1 | PS/SYNC | replaces GPIO23<br>100K pull low |
| WL_GPIO2 | | GPIO2 | | replaces GPIO24<br>VBUS / 2 |
| WL_ON | GPIO23 | WL_REG_ON<br> BT_REG_ON | | |
| WL_D | GPIO24 | SDIO_CMD<br>470R SDIO_DATA0<br>10K SDIO_DATA1<br>SDIO_DATA2 | | gSPI DI<br>gSPI DO<br>gSPI IRQ<br>gSPI NC|
| WL_CS | GPIO25 | SDIO_DATA3 | | gSPI CS|
| WL_CLK | GPIO29_ADC3 | SDIO_CLK | | gSPI SCLK<br>10K pull low |

spare jacinth
mortal kernel
#

(Sorry about the formatting, I guess discord doesn't do tables)

tulip sleet
#

I could hope it was a library compile-time option, but I haven't looked

spare jacinth
#

i would like to think they did not use "bad" pins on the design, forcing to use PIO ๐Ÿคฃ

tulip sleet
#

Maybe we should just turn off usb host on the Pico W build

mortal kernel
#

The Pico W designers stole GPIO23, 24, 25, and 29 for the CYW43 SPI interface.

mortal kernel
tulip sleet
#

so your chart above: looks like the pins are OK?

mortal kernel
tulip sleet
#

that the PIO SPI pins used for CYW43 are assignable to the same functions on a hw SPI peripheral? I am not sure about some of the abbreviations

mortal kernel
#

OK, I see where you're going. The CYW43 uses a SPI variant they call gSPI, so my best guess is that a stock SPI port won't work with the CYW43, thus the gSPI emulation via PIO.

tulip sleet
mortal kernel
manic glacierBOT
#

This closes #8564 (ping @cedargrovestudios)

While working on this issue, I noticed that the "circuitpython" tests were not being run by "make test" and therefore not during CI. (this probably happened during one of the recent micropython merges; I marked the changes as CIRCUITPY-CHANGE) There were several problems with the tests themselves. I fixed them, updated some expected outputs, and restored running the tests when expected.

The final unrelated change to tools/git-checkout-latest-t...

tulip sleet
#

there are two cpoies of the cyw43 driver; we have one in ports/raspberrypi/lib and there is one in the sdk

mortal kernel
#

It does let us choose a version independent of the SDK.

onyx hinge
#

at one point we had to carry changes vs what was in the sdk. and fwiw micropython carries a copy of cyw43 driver in (top level) lib/ but maybe for other reasons.

If we're using the sdk one then we should remove the other one.

mortal kernel
#

I prefer to leave it as it is, i.e., we choose the version not the SDK.

onyx hinge
#

oh I mis-read what you said.

tulip sleet
#

as long as they are not linked in API requirements. I think originally the driver may not have been in the SDK. There was a long delay while the vendor fixed some firmware things.

#

If the george-robotics version is no longer being used by MicroPython, I think maybe we should switch to the SDk version.

#

because it will be up to date wrt bug fixes, etc.

#

the george-robotics one was something that MPy used in advance

onyx hinge
#

micropython still has a copy in their top-level lib/

#

for whatever that's worth

mortal kernel
tulip sleet
#

hah, ok!

mortal kernel
#

I'm picking up useful bug fixes not in the version imported by the SDK.

tulip sleet
#

that clinches it

mortal kernel
#

Re: george-robotics, I've got a couple of minor issues queued up on the driver. Is there someone there I should mark them with to get their attention?

tulip sleet
#

george is Damien George of MPy, so he will get all the GitHub notifications anywy

mortal kernel
orchid basinBOT
manic glacierBOT
#

CircuitPython version

8.2.7

Code/REPL

RCVRID = 0x001 #CHANGE THIS LINE
# RP2040 CAN Bus Feather

from time import sleep
import time
import board
import neopixel
from rainbowio import colorwheel
from digitalio import DigitalInOut, Pull
from adafruit_mcp2515.canio import Message, RemoteTransmissionRequest
from adafruit_mcp2515 import MCP2515 as CAN
import adafruit_mcp2515.canio as canio

COLORS = {
    0x0: (0,0,0,0),
    0x1: (255,0,0,0),
	0x...
slender iron
#

@tulip sleet want me to review 8642 (jeff's synthio + test PR)?

tulip sleet
slender iron
#

kk, I'm not stuck into anything

manic glacierBOT
orchid basinBOT
manic glacierBOT
#

Fixes #8631.

Seems to fix ESP32-S3 BLE acting as a simple central. See https://forums.adafruit.com/viewtopic.php?t=206024 for user problems. I will point the users in that thread to the artifacts once this has built.

Tested on a BerryMed Pulse Oximeter with the library's simpletest.

Notes:

  • #8631 fix fixes a problem exposed by the new split heap use.
  • BLE_ERR_SUCCESS is 0, but was being used in places where the return values are actually BLE_HS_*. Nimble has multiple sets of ...
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This updates the way that Task is handled in the C module for asyncio which implements tasks & task queues. The goal is to bring asyncio in CircuitPython slightly closer to CPython.

This adds the following methods to Task:

  • get_coro() - how CPython exposes the coroutine backing the task (CPython Docs)
  • result() - a helper method from CPython for returning the successful response ([CPython Docs](http...
#

This is a follow up from https://github.com/adafruit/circuitpython/pull/8576 & is the same code as in https://github.com/micropython/micropython/pull/13000

This is different from #8576 in that it doesn't define the exceptions as part of the C code and instead pulls them in from the asyncio context that's passed to the Task. While I personally think that approach is an anti-pattern (I think most of that could be avoided by defining the exceptions in C & fixing how the loop is defined) it...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.0.0-alpha.2-13-gdc5845fa41 on 2023-11-04; Adafruit Camera with ESP32S3

Code/REPL

# I do not have a minimized standalone program that reproduces the problem

Behavior

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Hard fault: memory access or instruction error.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to exit s...
onyx hinge
#

I deserve to be whacked on the nose with a rolled up newspaper for how low-effort that bug report was. ๐Ÿ˜… but my mandate was to not "just ignore it" if I saw crashes while working on this rather complex project so there you go.

manic glacierBOT
main furnace
#
import time
import board
import displayio
import fourwire
import adafruit_ssd1680

I'm trying to run the Pi Pico with U2IF but I can't find the 'fourwire' module. Is it supported?

manic glacierBOT
main furnace
#

I guess fourwire is a 9ism. I'm going to use 8.2.8 for now.

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.8 on 2023-11-16; Bee-Data-Logger with ESP32S3
AND
Adafruit CircuitPython 8.2.0-rc.0 on 2023-06-23; Bee-Data-Logger with ESP32S3

Board ID:smartbeedesigns_bee_data_logger

Code/REPL

import frequencyio, board, time

frequency = frequencyio.FrequencyIn(board.D41)

while True:
    print(frequency.value)
    frequency.clear()
    time.sleep(1)

Behavior

Signal is generated with an external sign...

manic glacierBOT
#

@dhalbert

The Windows version is 10 22H2, I'm using Visual Studio Code with joedevivo's CircuitPython extension

The data coming in is coming in every second, and is something like this:
byte buf[] = {0, 0, 0x0A};

I think the problem is related to the data = uart.readline() line. When I run the code on a MatrixPortal M4 without a UART source attached, eventually the code will crash on that line (but not hard fault).

So ma...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I have seem multiple reports of hard-fault with httpserver, although none with clear indication of what might be causing them.

If I may suggest one thing, please try setting the poll_interval on serve_forever() or add time.sleep() between calling .poll().
https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/blob/1c5c41a2c4cf76bf1305b5b77cf3911b8dd977ad/adafruit_httpserver/server.py#L175

Even better would be making it a async function with asyncio.sleep() and running ...

manic glacierBOT
manic glacierBOT
mortal kernel
#

The nRF implementation of BLE will clear bonding information stored in flash whenever bleio_reset() is invoked. Since it is invoked during CP restart, bonding information will not persist across a CP restart. I'm wondering if this is the desired behavior?

tulip sleet
mortal kernel
tulip sleet
#

That is i: Adapter.erase_bonding(). Already exists. I will look at the history to see what changed.

#

On my phone right now ๐Ÿ˜€

mortal kernel
#

Take your time. I'm heading out for a walk.

manic glacierBOT
#

The following git command will show the current branch name (or show "HEAD" if you currently have a 'detatched head'): git rev-parse --abbrev-ref HEAD

I was doing something similar, but GITHUB_BASE_REF was the same thing. I expected that value to be available on the merge build, but apparently not. In addition, the PULL value appears to not be present, and I thought it was the same build step. I'll need to re-check those.

tulip sleet
mortal kernel
tulip sleet
main furnace
#

Trying to convince ChatGPT to run the unix build of CircuitPython.

It appears that running the micropython executable is not successful due to a mismatch in the GLIBC version. The current environment does not have the required GLIBC versions (2.33 and 2.34) that micropython depends on.

main furnace
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.0.0-alpha.5 on 2023-11-15; Raspberry Pi Pico W with rp2040
8.2.8; Raspberry Pi Pico W
8.2.2; Raspberry Pi Pico W
8.2.2; Arduino Nano RP2040 Connect

Code/REPL

None

Behavior

Hi, 3 people in my group are unable to copy files to the root of CIRCUITPY on MacOS Sonoma. Sorry for the second-hand report - if I start things off here, hopefully others can comment if needed.

On first sight, everyone think...

manic glacierBOT
manic glacierBOT
#

Also I'm not quite clear in the other issue about 8MB vs 16MB. The Nano Connect's CIRCUITPY is a little under 16, does that count as "small" or not?

The mounted filesystem size affects whether or not Sonoma delays writes to the USB MSC. We've found that filesystems in excess of 8M do not exhibit delayed writes. A board with a 16MB flash will not experience delayed writes. But, because its resulting filesystem will be smaller than 8MB, one with an 8MB flash will.

#

Below is a writeup I did onrequest to send to someone external, on November 13. It describes both problems.

When attempting to characterize the problem, I instrumented the writes that were being requested via USB. I could not actually find a clear pattern of delayed writes on <8MB vs no delayed writes on larger filesystems. I saw delayed writes on both, but it was not clear how the writes were being delayed in metadata vs data, and when what should have been an atomic transaction was compl...

#

Below is a writeup I did on request to send to someone external, on November 13. It describes both problems.

When attempting to characterize the problem, I instrumented the writes that were being requested via USB. I could not actually find a clear pattern of delayed writes on <8MB vs no delayed writes on larger filesystems. I saw delayed writes on both, but it was not clear how the writes were being delayed in metadata vs data, and when what should have been an atomic transaction was comp...

#

The Arduino Nano RP2040 Connect has a filesystem bigger than 8MB, so that means it experiences this issue but not what's described in 8449.

That's not good news. If you don't mind, please note this in #8449 so that we can track it all in one place. In the end, #8449 comes down to unpredictable delays between writes regardless of the symptoms described in the various entries.

manic glacierBOT
manic glacierBOT
#

Senders may typically have a delay between messages, but if the device is primarily listening for messages, there should be no delay and you want to minimize the other processing in the main loop. There's not much buffering in the CAN hardware (2 receive buffers and 3 send buffers), so loops need to complete in a timely manner relative to the frequency of incoming messages.

manic glacierBOT
#

CircuitPython version

8.2.8, 9.0.0a5 and 8.1.0

Code/REPL

> mpremote cp data.json :

Behavior

Similar issue was discussed in the context of Thonny (#7158), but the problem is reproducable also with mpremote.

Tried CP 8.2.8 and 9.0.0a5 on macOS Sonoma, Windows 11 and Ubuntu 23.10, also tried CP 8.1.0 on Ubuntu. All these tests failed in similar way -- mpremote would start writing the file but after a while wouldn't get Raw paste confirmation from...

manic glacierBOT
#

The same device (SeeedStudio XIAO-ESP32C3) is having problems also when trying to write files via the plain raw-REPL mode or via plain paste mode. In paste mode the echo starts going off after a while, in raw mode the OK confirmation does not appear.

Nevertheless, I don't think the problem is specific to writing files. I changed the file writing procedure to a no-op, but made sure that the amount of serial communication stayed the same. The problem still persisted.

manic glacierBOT
#

@dhalbert thank you for this great effort. I modified the workaround code a bit to work on my system (allowing for renamed drives to work as well)

#!/bin/zsh
#
# This works around bug where, by default, macOS 14.x writes part of a file
# immediately, and then doesn't update the directory for 20-60 seconds, causing
# the file system to be corrupted.
#
  
disky=`df | grep $1 | cut -d" " -f1`
sudo umount $1          
sudo mkdir $1          
sleep 2
sudo mount -v -o noasync -t ...
cobalt grail
manic glacierBOT
#

Reading this thread before, I'd got the impression it was an issue mainly affecting auto-reload. But turns out it's a much more serious issue that can cause write errors and file corruption, particularly when trying to write files at the root of the drive.

eightycc wrote,

Because of the way that FAT12 is structured on the device, it's more likely that the problem will manifest as missing files/corrupted or zero-length files when the affected files are at the root of the filesystem.

...

manic glacierBOT
#

Any chance of getting credit for the script?ย ย Itโ€™s not a masterpiece but it did take a couple of hours to get right.

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”
Michael Czeiszperger
Greensboro, NC
@.***
On Nov 24, 2023 at 10:03โ€ฏPM -0500, Dan Halbert @.***>, wrote:

Earlier today I wrote up what appears to be the best workaround right now:
https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#macos-sonoma-14-dot-x-disk-errors-writing-to-circuitpy-3160304
I'll refine this when I hav...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Any chance of getting credit for the script?ย ย Itโ€™s not a masterpiece but it did take a couple of hours to get right.

@czei Happy to give you credit. I wrote this up in a hurry while away from home. I have credited you in the Learn Guide page: https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#macos-sonoma-14-dot-x-disk-errors-writing-to-circuitpy-3160304

orchid basinBOT
manic glacierBOT
#

Another member reported that Arduino Nano RP2040 Connect is affected, which it shouldn't be based on previous results here, because it has a filesystem >8MB. I'm trying to follow up with him about that.

It was giving exactly the same symptoms, but flash nuke and fresh CircuitPython fixed the problem. Also tried another flash nuke and downgrading to 7.0.0 in case it was an issue left over from an older filesystem, but still fine. Must have been random filesystem corruption or something. S...

manic glacierBOT
#

OK, I'm going to close this in favor of #8449, based on @dmcomm's comment here: https://github.com/adafruit/circuitpython/issues/8449#issuecomment-1826863626

Another member reported that Arduino Nano RP2040 Connect is affected, which it shouldn't be based on previous results here, because it has a filesystem >8MB. I'm trying to follow up with him about that.

It was giving exactly the same symptoms, but flash nuke and fresh CircuitPython fixed the problem. Also tried another flas...

orchid basinBOT
manic glacierBOT
#

I took a look at this issue to see what may be missing. The issue is the current IDF does not support getting the status of the request to the target device. The IDF intends you to fill the "write" buffer if you have something to write and read the "read" buffer if you need to read. As requests come in the hardware either reads/writes from those buffers.

CircuitPython's API is designed to provide an I2CTargetRequest object if a request has come in, but with the IDF we do not know when a re...

onyx hinge
#

hopefully something interesting shows up in the overnight logs soon. My money is on something being wrong with the "delay when rate limited" code but I don't know what that thing is. Or else we're looking in the wrong place. It's too bad the cancellation doesn't start by sending ctrl-c / KeyboardInterrupt so we can get a traceback for where the script is stuck, that'd be super helpful.

tulip sleet
#

catch SIGTERM

onyx hinge
#

I don't know what it does; it might just shut down the whole VM for all I know.

#

we could also try running it under timeout (from package coreutils, probably installed by default): timeout -s INT 18000 [commandline to run adabot normally]. That should terminate it with SIGINT (KeyboardInterrupt) after 5 hours, getting us a traceback.

#

timeout may not work right with threads or subprocesses but I don't think adabot is doing that

#

i added more notes to that issue

empty salmon
#

I am developing a new board. I have the build working. Now I am focusing on the integrated elements - neopixels, speaker, and an eInk display. (the prototype hardware has eInk using an SSD1608 but the final hardware may have a different driver chip depending on supplies).
For eInk, I see some boards use โ€œfrozenโ€ python code while others have C code.
Which is preferred or when should one method be used vs another?

stuck elbow
#

I think the only board that uses frozen code is the maker badge, and I suspect that it's because they didn't figure out how to do the display initialization in board.c

#

or maybe because different hardware revision require different code

#

oh, I see, different revisions actually use different displays

empty salmon
#

Thanks. I will start to dig for the startup, shutdown, and refresh code.

manic glacierBOT
manic glacierBOT
#

The rotaryio lib is quite good as it is but I have a suggestion for an addition to it: The ability to have a reset pin that sets the counter to 0. When using the rotaryio library to track relitive positions it can be usefull to be able to reset the counter when another pin is triggered.

In my case I have a large geared circle (the rotating dome of a full size R2D2) connected to a rotary encoder that tracks the relitive position of the head, to "home" it I use a hall effect sensor that can ...

manic glacierBOT
manic glacierBOT
#

This is also called the "index" signal by folks coming from a CNC background. (which is my background)

This should be feasible to add to the "softencoder" implementations, which are based on a microcontroller-level pin change interrupt followed by software decoding of the quadrature data into position based on a state table look-up. The "softencoder" is used by all our ports that implement IncrementalEncoder except espressif.

The limitation of the "softencoder" approach is twofold:
...

mortal kernel
#

Attempting a fresh clone and checkout of 8.2.x, I've been seeing this error when I try to build mpy-cross:

#
(.venv) rabeles@ub2004:~/Development/circuitpython-sonoma$ make -C mpy-cross
make: Entering directory '/home/rabeles/Development/circuitpython-sonoma/mpy-cross'
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
mkdir -p build/genhdr
GEN build/genhdr/moduledefs.h
QSTR updated
Traceback (most recent call last):
  File "/home/rabeles/Development/circuitpython-sonoma/mpy-cross/../py/maketranslationdata.py", line 30, in <module>
    import huffman
ModuleNotFoundError: No module named 'huffman'
make: *** [../py/py.mk:274: build/genhdr/compression.generated.h] Error 1
make: Leaving directory '/home/rabeles/Development/circuitpython-sonoma/mpy-cross'
#

Manually doing pip install huffman resolves the problem. I don't see any recent changes to requirements-dev.txt that could account for this.

brazen hatch
#

Uhh is s3 (not the cpu, the aws thing) alright? I'm getting an empty page. Nvm, it was university wifi being sus.

tulip sleet
mortal kernel
mortal kernel
tulip sleet
mortal kernel
#

With the fork nuke, re-fork, and re-clone I can see that significant work has been done to speed up fetch-port-submodules. Very nice and my thanks to all who worked on it!

crimson ferry
#

curious... espressif watchdog seems to work correctly... the CircuitPython API is in seconds and the Espressif API is in milliseconds, but I don't see any *1000 in here https://github.com/adafruit/circuitpython/blame/3aac226d53386f5e8234400b9e3f84e973e9e7ee/ports/espressif/common-hal/watchdog/WatchDogTimer.c#L87 or here https://github.com/adafruit/circuitpython/blob/3aac226d53386f5e8234400b9e3f84e973e9e7ee/shared-bindings/watchdog/WatchDogTimer.c#L95

watchdog.timeout = 2147483.* works ((2**31-1)/1000), watchdog.timeout = 2147484 trips immediately. Significantly larger values cause a reset.

onyx hinge
#

That issue in adabot was originally about speed, but I think the problem turned out to be the incorrect rate limiting code. I had considered whether something could be parallelized (async or threads) but since the github API rate limit of 5000/hour is still coming into play, I don't think that'd end up reducing the total duration by much. it'd just maybe spend more time waiting for rate limit reset.

lone axle
#

If there are any Mac & Circup users willing to test out the version of Circup from this PR: https://github.com/adafruit/circup/pull/163 it'd be greatly appreciated. While working on this I had managed to break it for Windows, but it's back to working now. I'd hate to find out I also broke it somehow on Mac. That's the last of the main 3 OS's that hasn't been tried yet.

tulip sleet
thorny jay
# tulip sleet <@&356864093652516868> Reminder that our regular Monday discord audio meeting is...

Aaargh, no notes for me again... I am since a few weeks in Home Assistant, ESPHome, and smart doorbell.
Sure there will be some future integration with Circuit Python, either with mqtt or as currently plan with a Feather Prop Maker RP2040 that play a Xmas music on a speaker when the doorbell relay is activating a GPIO.
I really like the ESPHome YAML to firmware solution that feel like the CI/CD of IoT device (especially with OTA update). Since it is an ESP32 running in my smart-doorbell, I feel like it could run CircuitPython too, and the YAML file already indicate what GPIO (Arduino numbering) is used for what (here a relay and a button input).
At least one thing is obvious... I am addicted to the fast iteration from CircuitPython, and the wait to compile and flash the ESP32 is really a pain (even with everything automated). You just keep waiting before you can test your code. ๐Ÿ™‚

tulip sleet
thorny jay
manic glacierBOT
onyx hinge
#

we've got a good crowd ๐Ÿ™‚

lone axle
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Limor Friedย is the founder ofย Adafruit, a leading electronics manufacturer for makers. The open-source microcontroller driver libraries she writes to interface with devices such as sensors and dispโ€ฆ

turbid radish
#

Please subscribe and tell your friends, students, colleagues

onyx hinge
#

create an e-mail address for your pets and subscribe them too

turbid radish
#

๐Ÿ˜Š

onyx hinge
#

๐Ÿ˜Š

midnight ember
#

Also tried the new qualia library. Got an arc demo working easily. Thank you Melissa.

turbid radish
#

Hi @idle owl !!

onyx hinge
#

is "stuffing and dressing are similar but yet different in a specific way" a camp you're considering?

idle owl
#

That is a valid camp.

onyx hinge
#

@gilded cradle Erin and I solved the immediate problem but I think you may want to take another look at it in more detail. It was a good foundation, there's just some bug the cause of which was not immediately obvious to me so I papered over it instead.

idle owl
#

The recipe started out with a terse explanation of multiple camps, followed by a statement about how, now that it has been addressed, the author better not hear about it in the comments. Apparently this is a contentious issue.

onyx hinge
#

you know how comment sections on the internet are

idle owl
#

Indeed.

midnight ember
#

BLE to pulse oximeter sounds neat.

onyx hinge
#

temp ban = temporary ban?

gilded cradle
#

or temperature bandage? lol

midnight ember
#

yes

#

openweathermap bans for 24 hours if you exceeed their limit, there is no throttling.

onyx hinge
#

๐Ÿงต ๐Ÿ˜ก

main furnace
midnight ember
#

๐ŸŽ ๐Ÿ‘พ

onyx hinge
#

you are inspiring me right now kattni ๐Ÿคฒ

midnight ember
#

๐Ÿ˜ข Sorry to hear that Scott. Wish you and your family prayers.

idle owl
#

Thanks everyone!

onyx hinge
#

thank you dan

slender iron
#

Thanks for hosting Dan!

idle owl
#

Thanks Dan!

candid sun
#

thanks for hosting @tulip sleet !

gilded cradle
#

Thanks

tulip sleet
#

you're welcome, all!

lone axle
#

Thanks for hosting Dan. Have a great week everyone!

midnight ember
#

Nice to hear from you again Kattni <3. Hope everyone has a great week. Thank you for hosting Dan.

lone axle
#

I've never heard of Framework laptops before. Their "expansion cards" that allow you to add whichever ports you value most look like a great idea to me.

stuck elbow
#

you can also make your own custom ports, and of course people have

#

also, the main board is a good starting point for cyberdecks

lone axle
#

Nice, I'm not quite ready for a new laptop yet, but these will be on my short list to check out further when I am.

slender iron
tulip sleet
lone axle
slender iron
empty salmon
#

Iโ€™m confused about USB VID:PID for my board
I see unique USB vendor/product IDs on most boards.
When I read the Adafruit instructions there are links to the vendors of the MCUs. Iโ€™m using an RP2040. When I go the Raspberry Pi link, it implies I should not use unique IDs (except in specials cases).
Should my new RP2040 board have its own VID:PID for CircuitPython?

onyx hinge
#

@spare jacinth can circuitpython_toml be used to read & re-write settings.toml? Say I'm trying to programmatically update WIFI_SSID environment variable or whatever.. (& that I've solved the writable-CIRCUITPY problem)

slender iron
empty salmon
#

@slender iron - this is my first CircuitPython based board.
Is the right step to request VID:PID from Raspberry Pi?

manic glacierBOT
spare jacinth
spare jacinth
#

code could definitely use quite some upgrades, but it does more than what i needed and havent played with it in a while

#

added a counter = 0, restarted board without showing CIRCUITPY, restarted again and it was a 1 @onyx hinge ๐Ÿ˜‰ ```py
import toml

FILE = "settings.toml"

data = toml.load(FILE)

data["counter"] += 1
toml.dump(data, FILE)

#

i can see how changing the file at runtime may need a reboot for some pieces of code which read on startup and work with that same value all along the code's lifecycle, tho (only C code, probably?)

onyx hinge
#

@spare jacinth would you like me to file an issue? I hit an exception that I think should not occur. ```>>> toml.dumps({'y': {}})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jepler/src/community-bundle/libraries/helpers/toml/toml/_toml.py", line 392, in dumps
del table, _order
UnboundLocalError: local variable 'table' referenced before assignment

spare jacinth
#

oops, sure

#

im completely fine removing on del's to be honest ๐Ÿคฃ
but i thought they may be a good idea to clear RAM without waiting for GC

onyx hinge
#

that would be the fastest solution, wouldn't it

#

I think calling del on a local just before returning from a function won't make much difference.

onyx hinge
#

@spare jacinth thanks for toml & for taking a look at my issue. The specific issue didn't actually affect what I was trying to do, I ran into it while kicking the tires.

spare jacinth
#

welp, gonna remove 'em all and throw a new release, thx for the testing

onyx hinge
#

you're welcome!

empty salmon
#

trying to Integrate board DISPLAY
I will confess to not knowing what I am doing. That said, I've been trying to add an ePaperDisplay to a board.
CircuitPython compiles and the UF2 will load.

Here is the REPL output ...

>>> import board
>>> dir(board)
['__class__', '__name__', 'A0', 'A1', 'A2', 'A3', 'DISPLAY', 'GP0', 'GP1', 'GP10', 'GP11', 'GP12', 'GP13', 'GP14', 'GP15', 'GP16', 'GP17', 'GP18', 'GP19', 'GP2', 'GP20', 'GP21', 'GP22', 'GP23', 'GP24', 'GP25', 'GP26', 'GP26_A0', 'GP27', 'GP27_A1', 'GP28', 'GP28_A2', 'GP29', 'GP29_A3', 'GP3', 'GP4', 'GP5', 'GP6', 'GP7', 'GP8', 'GP9', 'I2C', 'I2S_BIT_CLOCK', 'I2S_DATA', 'I2S_WORD_SELECT', 'LED', 'MISO', 'MOSI', 'NEOPIXEL', 'RX', 'SCK', 'SCL', 'SDA', 'SPEAKER', 'SPI', 'STEMMA_I2C', 'TX', 'UART', 'board_id']
>>> dir(board.DISPLAY)
['__class__']
>>> print(type(board.DISPLAY))
<class 'NoneType'>

DISPLAY appears on the board but it is NoneType rather than ePaperDisplay.

Here is the board code: https://github.com/bradanlane/circuitpython/tree/dck01_board/ports/raspberrypi/boards/dck01

GitHub

CircuitPython - a Python implementation for teaching coding with microcontrollers - bradanlane/circuitpython

limber moat
#

hey i'm having issues with my Adafruit Metro m7, it wont recognize the SD card.

`
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 25, in <module>
OSError: [Errno 19] No such device

Code done running.
`

#

REPL output

#

code:
`# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries

SPDX-License-Identifier: MIT

import os
import busio
import digitalio
import board
import storage
import adafruit_sdcard

The SD_CS pin is the chip select line.

The Adalogger Featherwing with ESP8266 Feather, the SD CS pin is on board.D15

The Adalogger Featherwing with Atmel M0 Feather, it's on board.D10

The Adafruit Feather M0 Adalogger use board.SD_CS

For the breakout boards use any pin that is not taken by SPI

SD_CS = board.SD_CS # setup for M0 Adalogger; change as needed

Connect to the card and mount the filesystem.

spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(SD_CS)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")

Use the filesystem as normal! Our files are under /sd

This helper function will print the contents of the SD

def print_directory(path, tabs=0):
for file in os.listdir(path):
stats = os.stat(path + "/" + file)
filesize = stats[6]
isdir = stats[0] & 0x4000

    if filesize < 1000:
        sizestr = str(filesize) + " bytes"
    elif filesize < 1000000:
        sizestr = "%0.1f KB" % (filesize / 1000)
    else:
        sizestr = "%0.1f MB" % (filesize / 1000000)

    prettyprintname = ""
    for _ in range(tabs):
        prettyprintname += "   "
    prettyprintname += file
    if isdir:
        prettyprintname += "/"
    print("{0:<40} Size: {1:>10}".format(prettyprintname, sizestr))

    # recursively print directory contents
    if isdir:
        print_directory(path + "/" + file, tabs + 1)

print("Files on filesystem:")
print("====================")
print_directory("/sd")`

#

its calling the error at the line: storage.mount(vfs, "/sd")

orchid basinBOT
lone axle
# empty salmon **trying to Integrate board DISPLAY** I will confess to not knowing what I am do...

Did the branch for your device start from main anytime recently? or is it a bit out of date? I noticed here https://github.com/bradanlane/circuitpython/blob/dck01_board/ports/raspberrypi/boards/dck01/board.c#L143 you have displayio_fourwire_obj_t but in main recently this was changed to be fourwire_fourwire_obj_t like this one: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/boards/pimoroni_inky_frame_5_7/board.c#L65

I'm not sure if that is related to your problems or perhaps just because your branch is behind a little compared to main. Might be worth trying to update and / or copy what you can from board.c in the pimoroni inky frame 5.7" file it's also an rp2040 based device with built-in epaper display.

One other difference I noticed is that you have a board_deinit function whereas that pimoroni device doesn't. Did you add that for a specific reason? or was it copied from somewhere else or something? You showed this effect happening in REPL which ordinarily would be accessed via Ctrl-C. That might be calling deinit which is then making your display None by the time you try to access it from REPL code.

empty salmon
#

@lone axle - I started with 8.2.x because that is stable.
Most of my copy/paste camp from the pimoroni badger board.
I used REPL just to be succinct. I get the same issue when running code.py and using board.DISPLAY

#

I also got the same errors before I added the pimoroni code to deinit

blissful pollen
lone axle
empty salmon
#

Yes. The pins are correct. The display works if I do all the coding from within CircuitPython and use the adafruit mpy module for the display

#

I do not have any CircuitPython board with an integrated ePaper display.

#

I will compare my code with the โ€œinky frameโ€.
I feel the issue is that the display[0] object is not being constructed but I have no way to debug that code.

blissful pollen
empty salmon
#

@blissful pollen - thanks. I am going to step away from it for tonight and start fresh tomorrow. I will share the non-integrated code and output in the morning.

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.8 on 2023-11-16; Raspberry Pi Pico with rp2040

Code/REPL

boot.py:

import board
import digitalio
import storage

# For my Pi Picoโ€ฆ

switch = digitalio.DigitalInOut(board.GP22)
switch.direction = digitalio.Direction.INPUT
switch.pull = digitalio.Pull.UP

print("Remounting storage: " + ("read/write" if switch.value else "read-only"))
storage.remount("/", switch.value)


code.py:

import time
...
manic glacierBOT
spare jacinth
#

Out of curiosity, can i see how many times my lib gets downloaded thru circup? ๐Ÿคฃ

tulip sleet
#

@onyx hinge now that the adabot timezone thing is fixed, i can't remember, did you push forward the submodule commit in circuitpython-org again?

onyx hinge
#

@tulip sleet I did not.

tulip sleet
#

ok, I will make a PR

tulip sleet
#

there are some interesting approved but not merged PR's in adabot too

manic glacierBOT
midnight ember
#

Need next weeks note doc changed so I can start adding in my hug reports for next week.

tulip sleet
#

Here is the notes document for next Mondayโ€™s CircuitPython Weekly Meeting. It is at the normal time of 11am Pacific / 2pm US Eastern here on Discord. Add your hug reports and status updates in th edocument before the meeting. If you are unable to attend but would still like to contribute, feel free to add your notes and weโ€™ll read them off during the meeting. Hope to see you there! <@&356864093652516868>
https://docs.google.com/document/d/1S1W7c3Rq2PIV4TVrRahtz3Em5cfJpEEPi6sSyW_mk5U/edit?usp=sharing

manic glacierBOT
#

Currently, the write function of the I2CTarget implementation of the RP2040 is limited to a message length of 16 bytes. If the I2C host requests more than 16 bytes, only 0-bytes are transmitted even if the buffer defined by the user is longer.
Apparently, this is due to a 16-byte buffer length limit in the implementation

int common_hal_i2ctarget_i2c_target_write_byte(i2ctarget_i2c_target_obj_t *self, uint8_t data) {
    if (self->peripheral->hw->raw_intr_stat & I2C_IC_INTR_STAT_R_...
empty salmon
#

@blissful pollen @lone axle - progress: I have board.DISPLAY appearing now. The ePaperDisplay doesnโ€™t display anything (which I assume comes down to the start/stop/refresh sequences).
Two issues were at play: (1) โ€œsome error(s)โ€ in the code, and (2) you canโ€™t use displayio.release_displays() because it will get rid of the board.DISPLAY ๐Ÿคฆ๐Ÿฝ

manic glacierBOT
plush citrus
spare jacinth
#

Probably just a matter of waiting until someone has time to look at it

No idea bout the actual code there, but i would take the chance to change for readability ```diff

  • if not x in y
  • if x not in y
plush citrus
#

I don't normally use the former - will take a look

#

might have been a typo ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

spare jacinth
#

Nah, you just followed the existing pattern, looking at the diff

plush citrus
#

yep, I see now

spare jacinth
#

And changed existing lines to f-string

tulip sleet
#

In the long run, I think we might create a new library with an incompatible API that is simpler. There is already an inconsistency about the library is named.

#

or make an incompatible change, and rename the library, in a version update.

manic glacierBOT
slender iron
manic glacierBOT
tulip sleet
manic glacierBOT
manic glacierBOT
#
  • Disable Nagle at the end of error messages so they are sent before the socket is closed.
  • Correctly discard file contents when the PUT file is too large.
  • Correctly reset file size after failure to setting it too large.
  • Change diskinfo.json to be list of disks in preparation of supporting multiple disks.
  • Bump version to 3 for the above change.
  • Document diskinfo.json.

Fixes #8109

onyx hinge
# slender iron do we need to pin <python 3.12 for this error? <https://github.com/adafruit/Adaf...

@slender iron there's some kind of problem with pylint 2.17.x and python 3.12. It is not pre-commit's fault, but the author is abrasive enough that it's hard to figure that out.
i.e., this will fail in the same way:

$ docker run -it python:3.12 /bin/bash
# pip install git+https://github.com/pycqa/pylint@v2.17.4
Collecting git+https://github.com/pycqa/pylint@v2.17.4
...
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

What's odd is installing the same pylint from pypi is just fine. The same problem affects 2.17.7, the last of the 2.x series. So I think the short term thing to do is pin python to 3.11 and the long term thing to do is go to pylint 3.x and python 3.x. (cc @gilded cradle)

Another possibility: because it DOES install via pip, the hook can be changed to a "local" hook with an additional pip dependency: ```yaml

SPDX-FileCopyrightText: 2020 Diego Elio Pettenรฒ

SPDX-License-Identifier: Unlicense

repos:

  • repo: local
    hooks:
    • id: pylint
      name: pylint (library code)
      types: [python]
      entry: pylint
      language: python
      additional_dependencies: ["pylint==2.17.4"]
tulip sleet
timid bolt
#

Earlier this year I made some abortive attempts to expand asyncio support in CircuitPython. Since then I've put all my ideas into a fork of MicroPython that's based on FreeRTOS to give support for asyncio, threads, and more. If you're inclined to check it out, I'm desperate for feedback. Thanks!
https://github.com/gneverov/micropythonrt

GitHub

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems - GitHub - gneverov/micropythonrt: MicroPython - a lean and efficient Python implementation for...

manic glacierBOT
gilded cradle
manic glacierBOT
atomic summit
#

Hey @tulip sleet - I know it was just released, but have you had a chance to check the latest macOS beta that dropped last night? I doubt they've fixed anything, but I can always hope!

keen eagle
#

MacOS Sonoma 14.2 beta4 is out today and sadly shows no improvement with small filesystems. But it did break Discord for me so if youโ€™ve been testing macOS betas you might want to sit this one out.

crimson ferry
#

for devices that reset themselves, the workaround has to be applied after every reset (or basically before each time you want to touch the filesystem from the Mac)?

keen eagle
#

I take it back about Discord, it suddenly unbroke itself.

keen eagle
crimson ferry
#

ugh, I'm not updating my Macs so far, but may have to bite the bullet at some point... my editor (BBEdit) realizes when a device goes away and comes back and I can then save changes ...presumably it would also be OK with reset+workaround

manic glacierBOT
keen eagle
# manic glacier

I'm a compulsive updater but Apple's working hard on breaking me of the habit ๐Ÿ˜‰ At this point I'm updating this one machine ASAP just in blind hope that they'll have fixed the bug.

My gut feeling is that the problem is deep in a library they're using but don't maintain and that it won't actually get fixed until macOS 15 bundles in an updated version of the library that happens to fix it, unless there's some tsunami of attention drawn to it.

crimson ferry
#

is there a way to non-destructively test whether the device is mounted properly in Sonoma?

keen eagle
#

I don't know of a way to inspect the device to see whether it will actually work or not ๐Ÿ˜ฆ It'd be great if we could. I haven't observed filesystem corruption from attempting to write a small file to the device and having it fail, but I wouldn't want to count on that being okay.

crimson ferry
#

(I'll need a script to find and workaround all of the mounted devices, none named CIRCUITPY ...maybe a single-button macropad to kick it off ๐Ÿ˜‰ )

mortal kernel
#

I'll admit it, I've lost the recipe for ice. How do re-build the translation .pot?

#

NM. make translate, just needed to drop the extraneous s.

atomic summit
#

@keen eagle Thanks for the confirmation it's still broken - boo hoo ๐Ÿ˜ฆ

manic glacierBOT
tulip sleet
#

or maybe I am misinterpreting the q. Thought it was whether the remount script had been run yet or not

keen eagle
# tulip sleet or maybe I am misinterpreting the q. Thought it was whether the remount script ...

that's my interpretation.

The workaround I've been using doesn't even need the noasync option, I just:

/dev/disk6s1 on /Volumes/CIRCUITPY (msdos, local, nodev, nosuid, noowners, noatime)
root@Johns-Mac-Studio ~ # umount /dev/disk6s1
root@Johns-Mac-Studio ~ # mkdir /Volumes/CIRCUITPY
root@Johns-Mac-Studio ~ # mount -t msdos /dev/disk6s1 /Volumes/CIRCUITPY

Just realized this doesn't set exactly the same options, but when I run

mount -t msdos -o nodev,nosuid,noatime /dev/disk6s1 /Volumes/CIRCUITPY

to get the same mount options it still works (I mean, one of those options doesn't magically help or hurt)

But that's a good point, if you use noasync it'll be easy to spot

keen eagle
manic glacierBOT
#

Hallowing M0 Express was supposed to have adafruit_bus_device turned on, but it was not because the line was:

CIRCUITPY_BUSDEVICE = 1 # lis3dh needs it

The value must be exactly 1 when it's checked in the other makefiles, and the comment adds noise (trailing space, I think; the comment may still be removed).

Fixed a few other files that potentially had the same problem.

Also adds support for the mistaken Hallowing M0 2MB flash chip (should be 8MB). Only a few of these we...

crimson ferry
mortal kernel
orchid basinBOT
manic glacierBOT
short tendon
#

So, I spent some time troubleshooting an out of sockets error that another user was having yesterday.

They were using both requests and mqtt. In the end the issue was that requests kept getting re-initialized and thus couldn't clean up the sockets.

In an environment with such limited resources, it would seem handy to have a socket handler that could track and close out sockets (similar to request.Session) when you are using multiple methods.

Is this something people would get behind? Is there a better place to bring this up? I'm happy to do the work and draft up a few options.

In all reality, I may do this for myself regardless, but would much rather build something that can integrate with what already exists and for everyone to use.

manic glacierBOT
orchid basinBOT
lone sandalBOT
manic glacierBOT
orchid basinBOT
lone axle
# short tendon So, I spent some time troubleshooting an `out of sockets` error that another use...

That sounds like a nice piece of functionality to me. This is a good place to discuss it. If you happen to be around on a Monday during the weekly meeting you could raise the topic for more discussion there as well if you'd like. If you do end up getting into it perhaps make an issue on requests or whatever repo is most relavent so that discussion can move to a more direct location related to the changes.

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.7 and 9.0.0-alpha4; ItsyBitsy NRF52840 Express

Code/REPL

#https://learn.adafruit.com/ble-hid-keyboard-buttons-with-circuitpython/ble-keyboard-buttons-libraries-and-code

import time
import board
from digitalio import DigitalInOut, Direction, Pull
import adafruit_ble
from adafruit_ble.advertising import Advertisement
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafru...
short tendon
lone axle
manic glacierBOT
idle owl
#

@tulip sleet Greetings! I am in a position to need to update some code on a project. I am aware of the remount script, and will check the Learn guide you linked to in the Sonoma issue. I wanted to ask first, am I going to corrupt it by simply plugging it in? Or is it opening and editing a file that does that failmagic? Also, does the Sonoma issue affect updating CircuitPython firmware?

tulip sleet
idle owl
#

Oh interesting. I thought it was guaranteed.

#

Which is to say, I thought CP would autoreload before the write completed.

#

Consistently.

#

I have the code copied locally, so if I bork it, I'm ok other than getting libs and settings.toml back on there.

#

All of this to increase brightness of some LEDs. ๐Ÿ˜„

tulip sleet
#

copying UF2's is OK on _some_baords BOOT py drive pretends to be big enough (>8MB). However, it's smaller than that on SAMD boards.

tulip sleet
idle owl
#

I don't remember which, have to check in a minute here.

#

2

tulip sleet
#

it appears as a 32ishMB drive

idle owl
#

Oh nice ok.

tulip sleet
#

RP2040 is also OK, as is nRF. SAMD are too small

#

(3.5MB or something)

idle owl
#

This is code using AIO for time to control some DotStars. Am I good to try 9x?

#

I know I need to update libs.

tulip sleet
#

eh, probably, but you don't need to

idle owl
#

I'll wait then ๐Ÿ™‚

tulip sleet
#

I think there may be filesystem wroite issues about writing many files on 9.0.0 on some Espressif.

idle owl
#

It won't give you any useful info, I'm not actively developing it.

#

Hmm ok

#

Thank you for the info!

manic glacierBOT
idle owl
#

@tulip sleet It did exactly what you said it would, and worked fine when I let it finish the write and reload on its own. Thanks again! My little plants thank you as well. They have been without good lighting for a couple of months at this point. They're not dead, but they're definitely not thriving like before. Hopefully this helps. ๐Ÿ™‚

empty salmon
#

Yet another โ€œmajor thank youโ€ to the Adafruit team. A little comment in their SSD1681 code was the last piece of the puzzle for my CircuitPython build with an integrated ePaper display ๐Ÿคฉ
(the height of 200px is 2 bytes and so their code uses 200+0x60 as the ram height value)

manic glacierBOT
mortal kernel
#

In all of the cases I've looked at, data gets written immediately, it's the metadata that gets delayed.

#

I'm running some tracing now on iOS. So far, it looks good, i.e., no delays. On the bad side, iOS writes to the device every few seconds, so autoreload will go crazy.

#

Testing with latest released iOS, 17.1.1

onyx hinge
#

@gilded cradle there's a property overscan_left that can be put in tft_timings. The unpublished page titled "Qualia S3 RGB-666 with HD458001C40 4.58" 320x960 Bar Display" is an example of using overscan_left. In theory there could also be overscan on the top/right/bottom but this is not implemented.

Internally, circuitypython creates a (width + overscan_left)-pixel wide framebuffer, but makes logical "column 0" be the 60th pixel, in this case.

gilded cradle
tulip sleet
#

@mortal kernel thanks for the testing

mortal kernel
#

NP, the iOS results are a bit of a relief. I've made the tracing code more informative, it now IDs the area of the filesystem that is being written to.

tulip sleet
# mortal kernel NP, the iOS results are a bit of a relief. I've made the tracing code more infor...

what I saw with something very similar to your original tracing code was that even on Ventura, I was seeing "delayed writes". However, it was not at all clear to me whether they were part of a transaction that was not related to the original file write (e.g. clearing the dirty bit, or setting access time, or something or other that happened later). I would have wanted a parsed view of what was being written to the FAT and to the directory entries. I did not attempt that at the time, and am not asking you to do it.

#

basically, more semantic logging in oofats

mortal kernel
#

Already done. I've ingested the filesystem's VBR, analyzed it, and determined the block # ranges for the various areas.

tulip sleet
#

well, nice! are you dumping the directory entries, or anything like that

mortal kernel
#

I've learned to avoid making mods to oofatfs.

tulip sleet
#

jsut to see, aha, that is writing the file you requested, as opposed to one macOS's innumerable helper files

mortal kernel
#

I see. At this point I'm just IDing the area (MBR, VBR, FAT, root dir, or data), but I could go a bit deeper.

tulip sleet
#

maybe wireshark parsers could already do this

#

i have a meeting in five minutes, but are your changes in a branch somewhere?

mortal kernel
#

Just local right now. The tracing is all in supervisor/shared/flash.c.

tulip sleet
#

my thoughts were mostly to give a better Apple Feedback; maybe this can wait until we see whether they are doing anything (though it's opaque)

mortal kernel
#

OK, more later. But I am going to trace a >8M filesystem next.

manic glacierBOT
short tendon
ember iris
#

As a general rule, is it better to create an issue for each pull request, or can you make a pull request for a circuit python library without opening an issue?

slender iron
#

Pull is fine without an issue

#

Issues are better for work that hasnโ€™t been done yet

#

So we donโ€™t lose track

ember iris
#

Ok cool, I still need to verify with myself that what I think is true is actually true, but it's an optimization for a library so there isn't an "issue" with the library and I wasn't sure about the proper order of things. Thank you!

manic glacierBOT
manic glacierBOT
onyx hinge
manic glacierBOT
#
efc

CircuitPython version

Adafruit CircuitPython 8.2.8 on 2023-11-16; Adafruit QT Py ESP32S2 with ESP32S2

Code/REPL

# SPDX-FileCopyrightText: 2022 Dan Halbert for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

import board
import neopixel
import mdns
import socketpool
import wifi

from adafruit_httpserver import Server, Route, as_route, Request, Response, GET, POST

mdns_server = mdns.Server(wifi.radio)
mdns_server.hostname = "efcx"
m...
#
efc

Good question, Dan. Since this crash took overnight to manifest, it will take a while to test this out.

I plan to try running this code as-is, but attaching the board to a power supply instead of a computer to see if that resolves the problem. If it does not, then I will try removing the mDNS element from the code. That is a "would-be-nice" but not essential element of the project I envision, so I can live without it.

mortal kernel
#

I am attempting to send a logging message to just the UART by calling console_uart_printf. Oddly, for a '\n' I get just a newline rather than the expected return (i.e., the terminal advances to the next line with the line position stuck at the end of the previous line).

#

I've tried '\r\n' but behavior remains the same.

#

The reason I'm trying to do this is that when I send large amounts of trace over the normal USB endpoint it induces unpredictable I/O errors on USB MSC in use concurrently.

manic glacierBOT
slender iron
mortal kernel
slender iron
#

ah, it does go through mp_vprintf

#

I don't see any stripping there

#

and it spits it back to the uart

mortal kernel
#

I don't either. What's doubly strange is that if use the usual mp_printf, it works as expected.

slender iron
#

mp_printf adds it right?

mortal kernel
#

Not sure what you mean?

slender iron
#

I think there is code that expands \n to \r\n

mortal kernel
#

Interesting. Any thoughts on how I can get console_uart_printf to behave?

slender iron
#

I'm not sure where it is dropping the \r. I'd expect giving both to work

mortal kernel
#

Let me set up GDB and I'll try tracing it. It's just...weird.

slender iron
#

๐Ÿ‘

#

minimp3 looks promising

manic glacierBOT
slender iron
#

@tulip sleet and @onyx hinge, have time to chat about busio.SPI changes to help them live outside the vm?

onyx hinge
mortal kernel
slender iron
manic glacierBOT
manic glacierBOT
#

The MAX3421 adds USB host support via an external chip attached over SPI.

We should add support for it in a 9.x release. It will require the use of a SPI bus from the board module initially because those are statically allocated and live after Python VM.

After #8675 (likely CP 10) is done to always allocate SPI objects outside the VM heap, then we can support any SPI object.

slender iron
#

@tulip sleet @onyx hinge I think I covered what we talked about in the above issues. Please chime in if I missed anything

#

probably time for us to do a 9.0 issue pass to punt features and bugs

tulip sleet
#

could do it tomw sometime before your streaming, or early next week

slender iron
tulip sleet
#

though that is 5-7 my time, might be possible

slender iron
#

before is fine with me too

manic glacierBOT
#

May I instead suggest an fstab of sorts?

settings.toml:

*insert root table items here*

[FILESYSTEMS] # Boards that can afford to spend time to search, have flash space for parsing tables. This can be made into a #ifdef
SPI = "/lib" # This would try to autodetect if an sdcard can be found on board.SPI and try to mount it to "/lib"
whateverSPI = "/mnt/test" # This would try to autodetect if an sdcard can be found on board.whateverSPI and try to mount it to "/mnt/test", if "/mnt" d...
manic glacierBOT
#

Sure, that could be the default behavior, but if an fstab-like thing was made, it could pretty much mean nobody would need to manually mount stuff.

It wouldn't even be that much code to add on top of the rest.
It could just be a determine_mountpoint function that calls an upgraded getenv that has a minimal table support.
If the key is found & can be used, it would mount it there, in any other case, /automount.

#

Currently reloads may take a bit of time as wifi reconnects, workflows are reset and stuff is reinitialized.

It may be just a few seconds just a few seconds right now, but it still feels like a hang.
As more stuff is added however and retries, errors or external delays occur, this time will increase.

It may be worth considering some form of logging for this process.
It could be some text set to the title (that would look great on display boards), or just have some prints.

devout jolt
#

I'm trying to diagnose a panic and/or safe mode in RP2040 CircuitPython when it's plugged into a RP2040 USB Host Feather that's a usb_host. I've got a build that enables the device's serial REPL with CIRCUITPY_CONSOLE_UART_TX and ..._RX and can see that it's panicking or safe mode-ing.
Are there any other debug flags I can enable to get more print-based insight or do I have to hook up a debugger?

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 8.2.8 on 2023-11-16; Seeeduino XIAO RP2040 with rp2040

Code/REPL

import audiobusio
import board

DATA = board.A1
LRCLK = board.A2
BCLK = board.A3
audio = audiobusio.I2SOut(BCLK, LRCLK, DATA)

Behavior

Traceback (most recent call last):
  File "main.py", line 25, in 
ValueError: Bit clock and word select must be sequential pins

Description

The code is taken from https://le...

manic glacierBOT
#

The pins must be consecutive because I2S is implemented using PIO, which requires sequential pins. There isn't a provision for having them in reverse order, though that might be theoretically possible by supplying a different PIO program.

So I'm guessing this XIAO has a different pin breakout. But which way are you orienting the audio BFF? It mounts back-to-back against the QT Py. See the photo here: https://learn.adafruit.com/adafruit-audio-bff/overview

orchid basinBOT
#

Hi!, I'm representative from Cytron Technologies and I wanted to inform you that we have decided to scrap the Cytron Maker Zero SAMD21 project, and we won't be launching the product. In light of this decision, I kindly request your assistance in removing all related files from the repository and website.

Let me know if there's anything I can assist you with in this process.

Thank you

manic glacierBOT
#

CircuitPython version

Hello,

I'm attempting to play a .wav file on the audio jack using the Raspberry Pi Pico W. My code snippet for configuring the audio channels is as follows:

Code/REPL

dac = audiopwmio.PWMAudioOut(left_channel=board.GP20, right_channel=board.GP21)

Behavior

ValueError: Stereo left must be on PWM channel A

Description

However, due to a hardware constraint, the default mapping of the audio channels is reversed on my boa...

manic glacierBOT
#

As requested, here is a report of a memory error with CP 9.0 the works under 8

The code runs OK with CP 8.2.8 but gives the following error with 9.0 Alpha.5

Adafruit CircuitPython 9.0.0-alpha.5 on 2023-11-15; Adafruit QT Py ESP32S2 with ESP32S2
>>> 
>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
ip 10.0.0.53
Traceback (most recent call last):
  File "adafruit_requests.py", line 515, in _get_socket
espi...
orchid basinBOT
manic glacierBOT
mortal kernel
manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
#

how to make the keyboard work in REPL

Good question! Unfortunately, there isn't a way to use the T-Keyboard to input characters the REPL on the T-Deck.

It might be feasible to add support for that. CircuitPython recently added a repl.py file that, if present, will run before the REPL is loaded. A driver could probably be created to accept input from the T-Keyboard, but more research is required. I haven't tried it.

#

As a general rule you're better off opening a new issue rather than updating closed ones. Closed issues are harder for the Adafruit folks to track. I think this is a great question to open as an issue :D.

I'm thinking a virtual REPL using the python exec() command and a simple I2C keyboard handler wouldn't be too hard to write and might be a decent stop gap in lieu of CircuitPython native support. It could just be placed in code.py.

As a side note, [PyDOS](https://github.com/RetiredWiz...

manic glacierBOT
manic glacierBOT
#

I encountered an issue that sounded similar, but wasn't. I wanted to document my issue for anyone who stumbles upon this thread.

Issue:
I'm working with a Metro ESP32-S2 and the Adafruit RGB Matrix Shield. I had a pretty easy time getting a 32x64 matrix up and running, but ran into issues later on in the development process. I found that running code.py worked just fine, but when I dropped into the REPL, I wound up with white lines across my screen when I called `displayio.release_displ...

slender iron
slender iron
#

@tulip sleet @onyx hinge I'm at my desk if you want to do a 9.0 sweep

tulip sleet
#

sure, in a couple minutes

slender iron
#

๐Ÿ‘

tulip sleet
#

I am going to open all the 9.0.0 bugs in tabs as prep

slender iron
#

๐Ÿ‘

#

want to do it in a private video chat or public?

#

(anyone here is free to chime in and be added. we just had some random folks yesterday)

tulip sleet
#

we could do it in the CIrcuitPython channel to make it more obvious, or it could be private

onyx hinge
slender iron
#

we have video disable in the CP channel I think

#

maybe presenting would work though

tulip sleet
#

@onyx hinge we are in the channel

manic glacierBOT
#

Looks like the neopixel transmit won't be using DMA until 12. Without DMA, the PIO FIFO is filled from a while loop that calls background tasks: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/common-hal/rp2pio/StateMachine.c#L869C13-L869C33

This leaves it susceptible to audio buffer fills that may mess up the neopixel transmission. Perhaps we should lower the dma threshold to where it kicks in any time the FIFO is too small.

#

Hello all,

I just flashed circuitpython on my T-Desck and it all works correctly. But to my great surprise I cannot use the REPL keyboard directly from the T-Desck.

Following advice, I'm going to dig around to create a little circuit python script.

It was pointed out to me that there was the execution of the repl.py script before loading the console, as you had planned a development in this direction.

Can we help at our level?

spare jacinth
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I'm not sure if there's an issue already for spurious espidf.MemoryError:. I get these on Requests sock.connect somewhat frequently on 8.2.8, when espidf memory is plentiful, even early after a reset. Several resets later, it will just automatically work. I can only guess there's some non-deterministic espidf activities that trigger this (early after startup, and after running for some time). May not be related to espied memory at all. May be unrelated to this particular issue.

Your ...

tulip sleet
#

Dev machine discussion: Any experience or thoughts you have with doing large compiles on modern CPU's with "perfomance" and "efficiency" cores, like Intel 15-13500 (6p+8e) or i7-13700 (8p+8e) or even i9-13900 (8p+16e)?

I currently have an Optiplex i7-8700 (6 cores) I got off-
lease at a good price, which is honestly pretty fine. A 3x-4x improvement is what I would think worthwhile to replace it, in the long run. I'm not really interested in the big power-hungry unlocked processors.

It is not clear to me what software development speed gains the efficiency cores add. Compiling CircuitPython has some parallelizable parts and some serialized parts (e.g., linking). I see a few benchmarks of large compiles (e.g. chromium), but the testing is on gaming processors and is pretty incomplete.

manic glacierBOT
short tendon
#

@lone axle will you temporarily add me to the circuitpythonistas role before the call on Monday?

random junco
short tendon
#

Thanks. I'll see how busy it gets. I'm trying to dedicate time to Adafruit because, well it's a wonderful community. I want to deserve the tag if it's going to stick around.

random junco
#

Glad to have you here and if you want to chat in the meeting, you'll need it. It's only 2 notifications a week (a reminder before the meeting and after when the next week's doc is posted and pinned). ๐Ÿ™‚

short tendon
#

Oh that's nothing ๐Ÿ˜œ I'm used to channels that hit me 100s of times a day...

onyx hinge
#

It seems like there's really just one thing needed to enable "custom REPL": code.compile_command which is a lot like builtin compile except that it can tell if code is "incomplete" and returns None in that case (instead of a code object or raising an exception). With code.compile_command you can build a repl that knows when to print "..." continuation lines, etc. but could take input from any source that you could make work from Python code.

mp_repl_continue_with_input is basically the implementation of "check if this repl-command is complete"

manic glacierBOT
#
efc

OK, I have run two tests with the board plugged into a power supply instead of the computer. Both failed.

In the first test I left the code as it was with mDNS above. This test ran for about 36 hours with a loop on another computer using the board's webserver to change the neopixel color every minute.

In the second test I commented out the mDNS lines. This one failed after about 90 minutes.

I doubt that the length of time between failures indicates very much, but the failure itself i...

manic glacierBOT
brazen hatch
#

I have been execing everything..

#

I don't even have it in builtins

#

it would trully be revolutionary having it though

onyx hinge
#

@brazen hatch hmm I was testing on the unix "coverage" build

#
    #if MICROPY_PY_BUILTINS_COMPILE
    { MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mp_builtin_compile_obj) },
    #endif
brazen hatch
#

oh, alright, is there a reason this isn't enabled in normal boards?

#

I would looooove compiling stuff during runtime

onyx hinge
#
```if you felt like doing a build you should try enabling it
#

It doesn't look like it pulls in much extra stuff

brazen hatch
#

alright, I have the perfect workload to throw to it

#

ljinux is around 8 nested execs

#

if I compile all of that and it works

#

because the mpy is one thing, but all the programs are .py

#

loaded as text and exec'ed directly

#

I will just have to implement a try-compile function in program loading and do per-port tests.

manic glacierBOT
manic glacierBOT
#

Here is a fully annotated trace that shows the failure.

The test machine is a MacBook Air M1 running Sonoma 14.1.1. The test board is a Metro RP2040. CP is branch 8.2.x with debugging and trace extensions. Flash size has been reduced to 500KB.

The following trace data shows that MacOS delays for 13.3 seconds after writing the file data to the flash. After the delay MacOS writes the root directory with the correct file size and cluster number, then writes the FAT table with the corre...

manic glacierBOT
manic glacierBOT
#

Here is a fully annotated trace that shows the failure also occuring on a >8MB filesystem. It appeared that the problem was resolved when running with a >8MB filesystem, but the tracing shows that the problem is still there.

Comparing this trace with the previous (<8MB filesystem) trace shows that operations occurred in a different order (initial data and directory writes are reversed). It's possible that the ordering difference makes the symptoms less obvious, but it's clear that the lo...

manic glacierBOT
brazen hatch
brazen hatch
#

I don't even know why am I even trying to get to the bottom of this.

brazen hatch
#

I did it.

#

It was much simplier afterall

#

oh

#

It's absolutely amazing.

#

The speedup is very substancial.

#

Oh why wasn't this the default?

onyx hinge
manic glacierBOT
#

Here is what I get:


Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
ip 10.0.0.53
espidf.get_total_psram()=2097152
espidf.heap_caps_get_total_size()=2272023
espidf.heap_caps_get_free_size()=1981999
espidf.heap_caps_get_largest_free_block()=1900544
Traceback (most recent call last):
  File "adafruit_requests.py", line 515, in _get_socket
espidf.MemoryError: 

The above exception was the direct cause of the following exceptio...
manic glacierBOT
#

This enables builtins.compile() for all espressif boards.

This is currently in draft as I want to run more tests and see how it affects storage space.

I have already implemented compilation support within ljinux which heavily relies on exec and the results are pretty impressive.
However since I still haven't made a benchmark, I have no numbers to present.
I suggest as you try for yourselves.

I want to enable this on more and more ports, but I plan on doing it in different PRs, on...

manic glacierBOT
manic glacierBOT
#

I would never have predicted a performance improvement from this. I can see why if you can cache the result of compile() and use it multiple times it could make a difference.

I made some benchmark code and ran it on the unix port on my desktop computer (amd64)

import time

n = 100_000

def timeit(title, f):
    t0 = time.time()
    for _ in range(n): f()
    t1 = time.time()
    dt = t1 - t0
    print(f"{title:<20}: {dt:8.3f}")

def crun(s):
    return exec(compile(s,...
manic glacierBOT
#

I swapped the exec with exec(compile()) in PyDOS. I haven't run any benchmarks but PyDOS doesn't seem to run much different. I have been testing on an S3 so I'll give the C3/ESP32 chips a try as well but PyDOS actually ran pretty well on those chips.

I don't think I fully understand how the compile command should be used. PyDOS only executes a single python line at a time so I'm not sure I see where the speedup comes from.

manic glacierBOT
#

Still on the ESP32-S3, I decided to try timing a program:

Running with exec(compile())

(8155376)/>bench 
time
The current time is: 13:01:20
turtle
Turtle time! Lets draw a rainbow benzene
Press Enter to continue... 
time
The current time is: 13:01:53

Running with just exec()

(8160288)/>bench 
time
The current time is: 00:01:33
turtle
Turtle time! Lets draw a rainbow benzene
Press Enter to continue... 
time
The current time is: 00:01:41

The turtle p...

#

First of all, applications like ljinux are python scripts for the most part, not shell scripts.
So the kernel does not get back control at all while the app runs.
And for long running apps that have plenty of loops and/or user interactions, like nano for example, where we open it once and spend minutes inside, not having to re-interpret anything is pretty massive.
In the backround the code is just looping over and over. If the loops are in ASM already, it's instant.

Let's spice up the c...

wraith crow
#

@brazen hatch I figured that was the difference, PyDOS isn't going to see the same speed increases....

brazen hatch
#

yea yours goes in and out of the kernel

#

mine doesnt

#

I load and run big chunks

#

so it really works wonders for me

#

Yea I should prolly disable compile for my scripts too

#

I should only keep it for py programs

#

I really need to make a bench prog too

#

rn I just use nano scrolling as a bench and overall responsiveness

#

k let's now do JIT so everyone is happi

wraith crow
#

๐Ÿ˜†

brazen hatch
#

@wraith crow something you could still do is have a bytecode cache and store compilations
this will have a speed increase, but is a mess to micromanage

#

I have yet to determine how much ram do the big bytecodes take.

#

If it's nominal, we could maybe just keep everything and only wipe it on an exception handler

wraith crow
#

I haven't really worried too much about execution speed, my headache has been memory so adding caching logic might speed things up a bit but I probably wouldn't be able to run as much on the RP2040's and smaller modules

brazen hatch
#

I mean, not keeping exec text in ram during execution is an improvement as by itself, it's just a matter of if it's a net gain or loss with keeping bytecode
I'll test

wraith crow
#

PyBasic is the only program that I wish would run faster but in order to run any decent sized basic programs I had to make it execute basic code one line at a time from flash so I don't think there' any hope for speeding it up

#

Remember I'm only executing one line of text at a time so there's not much in memory, I loop through the script file and execute each line as I read it

#

Scratch that, it's been a while ๐Ÿ˜† I do read the entire script into memory

#

Now I don't understand why I'm not seeing some improvement with the turtle program :/

#

Or at least the same performance

brazen hatch
#

I have to go for today, but I can prolly take a look at it tomorrow.
I wonder if I could dualboot ljinux and pydos on a single board. That would be cursed.

manic glacierBOT
#

I am seeing these same errors consistently on a FunHouse with 9.0.0 alpha 5 (and each alpha all the way back to 2, also with the absolute newest UF2 at the top of the list at the time of this writing 1f5e692.uf2):

Traceback (most recent call last):
  File "adafruit_requests.py", line 515, in _get_socket
espidf.MemoryError: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "code.py", line 36, in <module>
  File "ad...
wraith crow
#

You can actually run PyDOS with just the PyDOS.py file by itself

brazen hatch
#

yea ljinux can run without a root even too, I wonder though if I could make it run pretty with everything.

#

and make a boot menu

wraith crow
#

There's a lot of board specific and auxiliary stuff that takes up flash space but isn't needed

brazen hatch
#

same here

manic glacierBOT
#

After some Discord discussions will @bill88t I was really confused by my earlier benchmark results and re-tested. Upon re-testing the compile option ran in 8 seconds rather than the 33 seconds I got earlier.

I was using web workflow to move some files back and forth and was seeing issues with the web workflow apparently locking up the serial REPL and possibly crashing the WiFi interface. I haven't been able to isolate for a reproducible issue yet but I suspect it was WiFi issues that slowe...

manic glacierBOT
#

Great work!ย  ย Youโ€™d think with all of this detailed documentation the problem would be easy to fix.

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”
Michael Czeiszperger
Greensboro, NC
@.***

Trace Data
Filesystem characteristics
type: FAT16
sectors: 30720
sector_size: 512
resvd_sectors: 1
clusters: 7664
cluster_size: 4
root_entries: 512
sectors_per_track: 63
heads_per_cylinder: 255
fat_size: 31
fats: 1
start_fat: 1
start_root_dir: 32
start_data: 64
MacOS write file data to the fi...

brazen hatch
#

how fun would it be if I could store the bytecode and do diy .pyc files

#

like, store a sha hash and the bytecode and then retrieve it later

manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 9.0.0-alpha.5-31-g1f5e69243e on 2023-12-03; LILYGO T-DECK with ESP32S3

Code/REPL

import time
from sys import stdin
from supervisor import runtime
cmd = ""

while cmd != 'q':
    print(time.time())
    time.sleep(5)
    if runtime.serial_bytes_available:
        cmd = stdin.read(1)

Behavior

The code.py file occasionally stops displaying time updates when the circuitpy drive is ejected in prepar...

#

I too made an oopsie with my testing (today it's borked tests day apparently).
I had removed my code setter and since I didn't reload I was using an earlier value on my testing above.

Old code (fixed):

import time

n = 1000

def timeit(title, f):
    t0 = time.time()
    for _ in range(n): f()
    t1 = time.time()
    dt = t1 - t0
    print(f"{title:<20}: {dt:8.3f}")
    

codestr = """
for i in range(1000):
    a = sum(range(100)) ^ i
    b = int(a / 3)
"""

cod...
manic glacierBOT
manic glacierBOT
lone axle
onyx hinge
#

thanks @lone axle

#

@tulip sleet @gilded cradle @lone axle can I call on youse to read the sub-sections of "State of"?

tulip sleet
#

sure

lone axle
#

Yep, good for me as well.

lone axle
#

I found about 30 libraries that seem to have different branch permissions from the rest. These libraries failed to push the change from the patch and output an error like Protected branch update failed for refs/heads/main

I don't see much of a pattern in the ones that are like this, they seem like a pretty random set to me.

If there is a desire to look into their permissions and try to normalize them with the rest of the library repos I can save off a list of them seperately for someone with appropriate level of permission to go thru?

#

The error also mentions Changes must be made through a pull request. I'm going to start working through the list and making PRs with the same change as the patch. I'm Hoping to get all of them merged and then do 1 release sweep once everything is merged.

onyx hinge
#

I doubt it's intentional that libraries have inconsistent permissions like that.

#

there is a setting "Allow specified actors to bypass required pull requests" that would theoretically allow adabot to bypass branch protection. It is not set in the first lib I looked at (busdevice).

lone axle
#

For the patches I think the changes come from the user that runs the patch, not adabot directly. So these commits show me as the author. I think when adabot makes commits inside of actions tasks they come from Adabot account directly though.

thorny jay
tulip sleet
#

fixed ๐Ÿ™‚ thanks