#circuitpython-dev

1 messages ยท Page 356 of 1

tulip sleet
#

it describes it precisely

marble hornet
#

๐Ÿ‘

tulip sleet
#

@marble hornet i'm looking, and it looks like you might even be able to remove BOARD_HAS_CRYSTAL from the nrf port completely

#

it is set but it is never used

#

it is mentioned only in ports/nrf/boards/*/mpconfigboard.h (and in the atmel-samd port

#

I don't know of any nRF boards or modules that don't have this crystal, since the chip is useless for BLE without it

#

so a PR just to remove it completely from ports/nrf would be the most appropriate

marble hornet
#

agreed. if there is a toggle for turning on bluetooth in the port then it would make sense for it to stay, otherwise I agree it is clearer for it to be removed.
(seems like page 83 of the datasheet specifies the clock as optional)

tulip sleet
#

page 84: The HFXO must be running to use the RADIO or the calibration mechanism associated with the 32.768 kHz
RC oscillator.
So you need the HFXO (and the crystal) to use the RADIO.

#

bluetooth is on by default in the port and no board turns it off

marble hornet
#

then do we want to remove that toggle as well?

tulip sleet
#

it's CIRCUITPY_BLEIO, and it's on in ports/nrf/mpconfigport.mk. Someone might want to turn it off for obscure debugging reasons, but no board turns it off.

#

that's a CPy-wide toggle, so we wouldn't remove it

manic glacierBOT
marble hornet
#

Okay, the pr is on my CircuitPython todo list.

And to summarize, the nrf port without Bluetooth (debugging excluded) is not a supported use? Thus the BOARD_HAS_CRYSTAL is not needed.

tulip sleet
#

@marble hornet right, I know of no boards or modules without a 32 MHz crystal. THe makerdiary board in boards/ has it set to 0, but that is an error. I looked at their schematic and they have both crystals.

marble hornet
#

**is on

tulip sleet
#

thanks! we have both wasted too much time puzzling through this (I don't mean this conversation).

thorny dove
#

Good day everybody! Today finished my first trial to program a RPi Pico with a Pico scroll pack, both on a Pico Decker. Its a scrolling text script (marquee). Here is e very very shot video impression (to keep it under 6 Mb Discord wants). Running standalone on a 3.71 V battery

fossil gorge
#

Quick heads up @lone axle and @mental nexus - the PR for the ProgressBar updates ready for a general review. I mentioned in a comment a few additional edge cases that need to be handled, but I'd love some feedback on things that could be better in some way, particularly if what I've got isn't quite "The Python Way(tm)"

Also, thanks in advance! ๐Ÿ™‚

manic glacierBOT
lone axle
#

I will be diving in soon and will check it out tonight, gotta wrap up the last few things for work for the week.

manic glacierBOT
hoary moat
#

Enjoying the guest appearance by @onyx hinge on Deep Dive. Nice to see the other members of the team and hear the interaction with @slender iron .

manic glacierBOT
idle wharf
#

@lone axle Planning to livestream this weekend?

lone axle
idle wharf
#

What will you be covering on "Cooking Python with FoamGuy" ?

#

I'll have to watch the tape-delay on YT, but I've enjoyed the shows!

lone axle
#

I am not certain yet. Maybe get a few PR reviews in, and work on my new type of label a little.

#

I've also been kicking around an idea in the back of my mind to play with RFM LoRa radios on the stream a little bit one of these days. That may end up being the first one I do that is less focused on displayio things.

still zephyr
#

Talking about the new label, maybe tomorrow we can discuss this, after reviewing the "\t" tab no being seen by text, I think that maybe it could be interesting, to use the same methods for three labels types.

#

And +1 for the LoRa, communications protocols are my favorite things and the most frustrating one

slender iron
#

I think the best suggestion for git with existing micropython fork is: 1) clone adafruit/circuitpython locally 2) add foo/micropython as a remote to push to

#

using a local clone is complex when switching branches

manic glacierBOT
#

We now have byte-based reading from the REPL stream or a second serial stream, unencumbered by REPL-specific characters: https://circuitpython.readthedocs.io/en/latest/shared-bindings/usb_cdc/index.html.

It does seem that the \n behavior is the same in CPython (same result on Windows and Linux):

Python 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.read(2)
a
...
jaunty juniper
#

I'm looking into the second CDC channel on Mac with a Clue, and is there a way to differentiate the two serial lines ?

glossy pecan
#

Jeff, thanks for the quick reply. I work with multiple MCUs (Nordic, ST Micro, Espressif, etc.), so a HW debugging solution that works across the collection of devices is more useful than one per specific dev kit. (I've got a drawerful of Nordic dev kits with bundled Segger adapters :-). So trying avoid the cost and YADA (Yet Another Debugging Adapter) situation this time.

jaunty juniper
#

like i get this, how do I know which one is the REPL, other than assuming it's the first ?

>>> import serial.tools.list_ports                                              >>> for port in serial.tools.list_ports.comports():
...     print(port.device,port.interface)
... 
/dev/cu.Bluetooth-Incoming-Port None
/dev/cu.usbmodem144443121 CircuitPython CDC data
/dev/cu.usbmodem144443123 CircuitPython CDC data
tulip sleet
#

the second one should say CDC2 -- I'm confused why it doesn't

manic glacierBOT
jaunty juniper
#

ah I was wondering

tulip sleet
#

let me try it again on Linux with the latest build

#
$ lsusb -D /dev/bus/usb/003/068 |grep CircuitPython
      iInterface              4 CircuitPython CDC control
      iInterface              5 CircuitPython CDC data
      iInterface              6 CircuitPython CDC2 control
      iInterface              7 CircuitPython CDC2 data
      iInterface              8 CircuitPython Mass Storage
      iInterface              9 CircuitPython HID

#
ython 3.8.5 (default, Jul 28 2020, 12:59:40) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial.tools.list_ports
>>> for port in serial.tools.list_ports.comports():
...     print(port.device,port.interface)
... 
/dev/ttyS4 None
/dev/ttyS0 None
/dev/ttyACM1 CircuitPython CDC2 control
/dev/ttyACM0 CircuitPython CDC control
>>> 
#

@jaunty juniper ๐Ÿคท I don't know what's up with Mac pyserial!

jaunty juniper
#

hmmmm I'm gonna compile locally to be sure I have the right version

#

I grabbed artifacts and I might have done it wrong

tulip sleet
#

try ioreg -p IOUSB

jaunty juniper
#

that doesn't tell me enough

manic glacierBOT
#

Thank you for this! I think we do need to add buffering before we merge this because the API explicitly allows setting the buffer size.

We can either copy other ports and use an interrupt to write into a ring buffer. Or, we can use the RP2040 ring DMA while constraining the buffer sizes to powers of two.

I'd be happy to add the buffering next week if you'd like to hand it off.

tulip sleet
#

@jaunty juniper it's not the build, it's pyserial on the Mac, or whatever it's trying to use. I tried the latest (3.5), and it gives the same duplication you see. The exact same board shows CDC2 on Linux

#

anyway, I think if you sort the devices alaphabetically, the second one will be [1]

jaunty juniper
#

well I'm gonna look into a way to get that info somehow

tulip sleet
#

thanks, let us know if you find anything

tulip sleet
jaunty juniper
#

I use system_profiler to find and associate boards with their mounted drive, but I wasn't able to find the path to the serial ports that way

tulip sleet
#

info.interface = search_for_locationID_in_interfaces(serial_interfaces, locationID) may not be working right

manic glacierBOT
jaunty juniper
#

I assume "locationID" (a property of a USBDevice) is something assigned by the OS, and each serial port has the same, which is the same as the parent USB device

#

so basically the way it's written pyserial assumes there can be only one serial port by USB device

#

I seem to have a fix, but...

tulip sleet
#

i'm holding my breath ๐Ÿ™‚ I have to ๐Ÿ’ค but if you have a PR for pyserial that would be great

jaunty juniper
#

I'm gonna look at pyserial's repo and see if I should open an issue or if doing a PR is fine

tulip sleet
#

i searched for list_ports in issues and PR's and found various things

#

thanks, good night!

jaunty juniper
#

good night

jaunty juniper
#

wait... on linux it lists CDC control, and on mac it lists CDC data ? what ?
Well I have no idea what the difference is anyway...

manic glacierBOT
#

HI

I see 2nd serial is added and thanx to this.

Let's say I want just talk to connected TTL serial
hardware and I need a simple command to cut
me off current REPL and to 8-bit transparently conect to
TX/RX pins, but in background, to keep current
application running.

for example if I have modem on pins 10 and 11
I just need something like this

connect(tx=10,rx=11,baud=115200)
ATD1234
OK

no more REPL until reboot and that's all I need.

solar whale
#

@tulip sleet ran af few tests with CDC2 -- grandcentral_m4 , nrf52840_sense , pico -- all worked fine -- treed read,write, readline,readlines --- nice!

#

basic tests, but all good so far

manic glacierBOT
solar whale
#

Do I understand correctly that esp32s2 and stm cannot support it?

#

or do we have to give up something to enable it?

tulip sleet
#

the latter ... They don't have enough endpoints. Also SAMD21 sadly needs one more endpoint, because on SAMD21 I had to use two endpoints for MSC (CIRCUITPY) instead of just one endpoint pair (IN and OUT, which works on SAMD51. It was flaky with just one. I should re-test that in case something has been fixed, but it seemed like it might be a hardware issue.

solar whale
#

If I disable usd_hid or usb_midi in the esp32s2 build, shouId be able to enable usb_cdc

tulip sleet
#

usb_cdc needs 2 endpoint pairs, one for control and one for data.

endpoint pair 0 - USB control (always needed)
endpoint pair 1 (only IN used) - CDC #1 control
endpoint pair 2 - CDC #1 data (IN and OUT)
endpoint pair 3 - CDC #2 control
endpoint pair 4 - CDC #2 data
endpoint pair 5 - MSC

Most of the STM's have only 4 (0-3 endpoints), so they're completely out of the running. I'm going to double-check that.

ESP32-S2 has 5 (0-4) endpoint pairs, so also mostly out of luck

#

MIDI and HID each take only one endpoint pair

#

MIDI is already off in ESP32-S2

solar whale
#

I see that now -- thanks for the explanation -- lots to understand.

tulip sleet
#

grep for USB_NUM_EP in ports/*/mpconfigport.mk to get the settings. I am still trying to figure out how many endpoints the Spresense has: the datasheet is very unclear. I inquired.

#

people casually say "endpoints", but they mean "bidirectional endpoints", which I am calling a pair

#

occasionally datasheets count each member of a pair separately

solar whale
#

so on something like the STM -- with only 4 -- is MSC on pair 3?

tulip sleet
#

yes,though the ordering usually doesn't matter, except for 0

#

so the spresense is weird

solar whale
#

have you looked at imx (teensy)

tulip sleet
#

the imx have 8 pairs, so they're fine

solar whale
#

nice -- will try one soon.

tulip sleet
#

ports/nrf/mpconfigport.mk:15:USB_NUM_EP = 8
ports/raspberrypi/mpconfigport.mk:54:USB_NUM_EP = 8
ports/stm/mpconfigport.mk:12: USB_NUM_EP = 4
ports/stm/mpconfigport.mk:28: USB_NUM_EP = 4
ports/stm/mpconfigport.mk:47: USB_NUM_EP = 9
ports/stm/mpconfigport.mk:65: USB_NUM_EP = 6
ports/litex/mpconfigport.mk:10:USB_NUM_EP = 16
ports/esp32s2/mpconfigport.mk:45:USB_NUM_EP = 5
ports/mimxrt10xx/mpconfigport.mk:21:USB_NUM_EP = 8
ports/atmel-samd/mpconfigport.mk:26:USB_NUM_EP = 8
ports/cxd56/mpconfigport.mk:11:USB_NUM_EP = 6

#

stm varies based on the family

solar whale
#

do you know of a way to end EOF to readlines from "screen" -- -- so far I have only tested it with a timeout -- have not been able to send EOF

#

or is there some other way to terminate it.

tulip sleet
#

it's just not clear what EOF would mean. This is not a file stream, it's a UART-like stream. I don't know if pyserial handles EOF either, though it's worth trying

solar whale
#

ah -- I missed that -- thanks! Had forgotten about it. Not a problem

tulip sleet
#

I'd suggest instead doing single readline()s and looking for a marker, you could look for ctrl-d

#

or "exit" or whatever makes sense for your protocol. usb_cdc is a bytes stream, not a text stream: utf decoding/encoding is not done

solar whale
#

makes sense --nice for "streaming" data -- don't want it interpreting things.

#

read/readline are kind of a funny case -- with the concept of "lines"

#

Cpython readlines has an optional limit on the number of lines -- that does not appear to be implemented, correct?

tulip sleet
#

that's right, not implemented yet, and it would be implemented not in usb_cdc but in the general stream code that we reuse

solar whale
#

ok -- many layers.... Thanks for all the work on this.

tulip sleet
#

yw! this opens up several projects Limor had in mind. I will be writing a short guide soon with a simple example or two.

#

we could conceivably use the Bluefruit Connect packet protocol too, and just not transmit it over BLE. It is UART-based protocol, after all

solar whale
#

The readthedocs info was very helpful to get started --- looking forward to playing with this

#

only 3 older issues that that one!!

tulip sleet
#

and we closed one last night

#

the getch() one

solar whale
#

just tested on teensy4.1 -- works fine!

manic glacierBOT
#

Definitions are for:

  • Pimoroni Tiny 2040
  • Pimoroni Keybow 2040
  • Pimoroni PicoSystem

I believe I have set all the files up correctly, but am creating this as a draft PR so we can check things over first.

A few questions I couldn't find answers to:

  • Is there a way to specify the amount of flash available on our boards, or does CPy not require this?
  • Some of our LEDs are common anode, so need to be driven low to turn on. Is there a way to invert the pin behaviour globally so do...
manic glacierBOT
#

Thanks and welcome!

Several of your files have no trailing newline. This will cause the pre-commit checks to fail. You can turn on pre-commit locally to catch this before you push.

$ pip3 install pre-commit   # Just do this once.
...
$ pre-commit install        # Do this once in each repo clone.

You can run the pre-commit checks manually: check the help info for pre-commit.

  • Is there a way to specify the amount of flash available on our boards, or does CPy not req...
gloomy shuttle
#

@tulip sleet in reference to PR #4228, would having something like invert as an argument to DigitalInOut allow a user to define a button with a button.pull = Pull.UP and button.invert = True so that button.value is True when it is pressed instead of button.value being False when it is pressed?

tulip sleet
#

yes, that would be the idea. It could make things simpler but would introduce new support issues as well.

gloomy shuttle
#

I think it would be an improvement for code readability. It is counterintuitive for a non-electronics person to use not button.value when you want to tell if a button is pressed.

manic glacierBOT
#

This fixes several problems:

  • memoryview(ndarray) & internal uses of ndarrays with mp_get_buffer and mp_get_buffer_raise no longer hardfault
  • ones(), full(), zeros() and eye() with dtype=bool gave wrong results
  • linalg.dot() could give incorrect results

Thanks to @v923z for making these fixes in the "legacy" branch of ulab, which is used by CircuitPython!

gloomy shuttle
#

or is there room for some sort of button class that handles common tasks like pressed and held and inverts .value of the DigitalInOut object itself?

tulip sleet
#

the debouncer class(es) could do that. #4228 is talking about common-anode LED's which must be grounded to turn on, so a button class would only solve one of those problems.

gloomy shuttle
#

I understood that it was talking about LEDs, but the invert argument appealed to me for use with buttons in particular.

manic glacierBOT
#

@ZodiusInfUser asked in #4228 whether DigitalInOut has functionality to invert the sense of .value, so that True represents a low signal level , and False represents high. The motivation is that Pimoroni has boards where the RGB LEDs are common anode. But this functionality could also be used for buttons that ground when on, etc.

MicroPython has a Signal class that wraps Pin and has an optional invert argume...

tulip sleet
#

i made an issue for discussion. ^^

jaunty juniper
#

I've kind of wanted a .on property that would be value != pull basically (I use a Button class for that purpose in some of my code)

gloomy shuttle
tulip sleet
#

Feel free to add these suggestions to the issue so we can capture your thoughts

manic glacierBOT
#

I like the idea, though it may be good alongside a guide (or reference) on buttons and why they are "False" when pressed and how this can invert it. At least as a newbie that got me for a while, maybe I missed something that exists too. But I think it would make code flow a lot better to set some invert type property and the rest of the code can say if pressed is True.

In terms of CP would potentially inverting .value though cause issues with pre-existing libraries that expect it a ce...

#

It would be helpful to have an easier way to indicate that a button is pressed is True instead of having to use negation in user code. An additional property like .on or .active would probably be a better solution than an invert argument that modified .value.

button = DigitalInOut(board.GP0)
button.direction = Direction.INPUT
button.pull = Pull.UP

# this is counterintuitive for a newbie to electronics
if button.value:
    print('button is NOT pressed')
if not b...
#

I see no reason why you couldn't write a Signal class in Python (and add it, say, to simpleio) for this purpose, without having to add it to digitalio and making the space on the samd21 boards even tighter.

You could even have a Button class that also does debouncing for you.

I agree with both of these points, but was offering support that the solution to the original issue could have a benefit with using buttons as well.

manic glacierBOT
#

I feel like this is related to the discussion we had In The Weeds recently about whether to have a ".voltage" property of AnalogIn objects, or have code need to scale ".value * .reference_voltage / 65535". I think we concluded that while the decision to have a 0..65535 value was also made very early when it was unclear whether CircuitPython would support floating-point numbers at all, it was b...

#

I've kind of wanted a .on property that would be value != pull basically. In fact I use a Button class to encapsulate a DigitalInOut for that purpose in some of my code and give it a .on. For outputs I kind of think of it as an equivalent to pull in the way it is a default value: decide what that value is, treat .on as not being that.

That kind of abstraction is already done in board-specific libraries like magtag.button_a_pressed (return not self.buttons[0].value). In Pimo...

#

Thanks for the reply, and mention about new lines. I thought I'd followed the other board definitions in the folder exactly, but clearly not.

Just tried installing pre-commit, but the second line does not work, as in it cannot find pre-commit. Note I am developing under Ubuntu.

"This has not yet been parameterized, and if yours are different". Yes, I believe both Tiny2040 and PicoSystem have more flash than the default 2MB of the Pico. Also Adafruit's own Feather RP2040 has 4MB accordin...

gilded cradle
#

I'm having trouble compiling CircuitPython. This is what I'm getting (without any changes):

melissa@MacBook-Pro ~/D/c/c/p/atmel-samd (main)> make BOARD=metro_m4_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
../../lib/tinyusb/src/common/tusb_fifo.c: In function 'tu_fifo_write':
../../lib/tinyusb/src/common/tusb_fifo.c:149:6: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
   if ((p > p + offset) || (p + offset > f->max_pointer_idx))
      ^
cc1: all warnings being treated as errors
make: *** [build-metro_m4_express/lib/tinyusb/src/common/tusb_fifo.o] Error 1
#

@tulip sleet do you have any ideas?

tulip sleet
#

hi - what is arm-none-eabi-gcc --version, and did you git submodule update yet?

gilded cradle
#

7.3.1 and yeah, I did git submodule update

tulip sleet
gilded cradle
#

Ah, that's probably it then

#

Thank you

#

Apparently I had both versions and it was defaulting to the older one. I deleted the older one off my system, ran make clean, and it seems to be working now.

manic glacierBOT
#

Fixed the pre-commit issues with a bit of trial and error, so if my config looks okay and matches the style you're expecting, then I think this is good to turn into a proper PR.

"This has not yet been parameterized, and if yours are different". Yes, I believe both Tiny2040 and PicoSystem have more flash than the default 2MB of the Pico. Also Adafruit's own Feather RP2040 has 4MB according to the product page, but that is yet to be configured.

So we need you to provide you a way to s...

manic glacierBOT
#

"So we need to provide you a way to specify a larger flash chip, I think? Or can you live with 2MB for now?"
With the B1 silicon arriving imminently and being put into products, we can live with the 2MB definition for now. Then hopefully in a month we can push an update once the flash changes you mention are in place.

"Are you using a chip from the same family as the Pico or a different manufacturer's chip?" I don't have that information sadly, but I would guess that it's a different flas...

manic glacierBOT
#

This fixes the board config for TG-Watch to match the available crystals. and updates some frozen libraries.

It turns BOARD_HAS_CRYSTAL on and BOARD_HAS_32KHZ_XTAL off since the board has a 32mhz crystal but not a 32khz one.

I'm currently drafting a PR/implementation to remove the confusing naming of BOARD_HAS_CRYSTAL as discussed on discord.

#

The micropython state decoder looks like a solid design for "x4" quadrature decoding that avoids some problems that more naive implementations have. Crucially,

  • the data checked by the decoder is exactly the seen edges, not a sample of the inputs at a later time
  • every state transition is handled, rather than just handling certain transitions

Tracking the previous direction (positive or negative) in an attempt to decode changes in both bits simultaneously I think is of dubious valu...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
wise wigeon
#

About porting alarm to nRF I think we can find most of what we need in the nRF52 SDK's ram_retention example. I want to start testing the most basic implementation of this, preferably without having to account for every call from bindings (Like a big bang implementation). Is there any easy way to get started and then gradually expand, instead of my current approach which is: make, solve error(s) hackishly, repeat?

tulip sleet
#

@wise wigeon you can just copy the esp32s2/common-hal/alarm tree, and then comment out everything, just returning dummy values as necessary. I'd say implement TimeAlarm first; it will be the easiest

manic glacierBOT
wise wigeon
manic glacierBOT
manic glacierBOT
#

Thank you. That was helpful. Somehow I overlooked it. I am lost as to how these modules build into the final CircuitPython file for the board. I see the implementation in the Shared Bindings for PulseIO but can't follow how these shared bindings are connected (well how they would be connected in the case of the RP2040) to the rest of the code. Can someone offer guidance here?

manic glacierBOT
#

I'm sometimes getting "OSError: [Errno 19] Unsupported operation" when attempting to write to an i2c device (a SparkFun Serial LCD) using a RasPi Pico.

code.py:

import board
import busio

i2c = busio.I2C(board.GP17, board.GP16)

while not i2c.try_lock():
    print("i2c not locked, retrying...")

print(i2c.scan())
i2c.writeto(114, "|-") # Clear
i2c.writeto(114, "Hello world!") # Show some text. Error happens here.

The error appears to be happening on line 11, accord...

manic glacierBOT
#

I have implemented alarm (deep and light sleep) for nrf52.
PinAlarm, TimeAlarm and SleepMemory works on my nRF52840 board. My code is based on esp32s2 alarm implementation, with HW specific parts re-implemented.
Set CIRCUITPY_ALARM = 1 in config.mk file to enable the alarm function (already defined in mpconfigport.mk).
Please refer to README_impl.txt below.

I am not sure whether this works on other typical nRF52 boards,
and the source files contain some debugging codes.
Please let...

manic glacierBOT
last crater
#

x2 on this question. Can I just use the wifi module to create the AP?

manic glacierBOT
#

I tried with up to WaveFile(wav_file, bytearray(2 * 4096)). It crackles in a different way. Copying small files to CIRCUITPY still makes it go haywire.

BTW, I think there's a second issue/big here. I've noticed after interrupting and restarting program sometimes it gets stuck while waiting for the sample to complete playing with the typical code of

    while audio_out.playing:
        pass
manic glacierBOT
#

I did some audio RawSample experiments on command line and then copied working code.py onto board and got this

Traceback (most recent call last):
  File "code.py", line 198, in <module>
TypeError: 'float' object does not support 'protocol_audiosample'

Code done running.

It's definitely not a float! I copied code again and it worked.

manic glacierBOT
#

On Adafruit CircuitPython 6.2.0-beta.2-18-g2a467f137 on 2021-02-15 this code spits a RuntimeError: All state machines in use

import time

import rp2pio
import adafruit_pioasm

print("15 second pause in case anything bad happens")
time.sleep(15)


flash_pio_code_2pin = """
.program flash2
    set x, 31
onloop:
    set pins, 3  [5]
    jmp x-- onloop

    set y, 31
offloop:  
    set pins, 0  [5]
    jmp y-- offloop
"""

flash_pio_code_3pin = """
.program flas...
manic glacierBOT
manic glacierBOT
#

We could add .inverted property to specific board. pins, which would make it automatic. However, that doesn't solve the problem of external devices which are not known in advance.

A simple Signal-like class would help. However, you still have to know to specify the inverted behavior. So I am still interested in naming pins with active-low behavior in a way that helps the reader, such as a _INV suffix. On schematics one typically puts an overbar over the signal name or adds a N su...

cobalt grail
#

Hey, @fossil gorge, what did you say about the french translation? ๐Ÿ˜Ž

fossil gorge
#

I dunno, that "Franska" looks suspicious. I'm very particular about my Ska music! ๐Ÿ˜›

manic glacierBOT
thorny jay
fossil gorge
#

lol, that was me

#

I mentioned to @cobalt grail on FoamyGuy's stream yesterday that French needed some updates from new strings, so he was "kindly" reminding me about it!

thorny jay
#

It's a nice other way to see what has recently been added to CP. I guess some of it was PIO. Then some stuff related to program size... maybe also PIO.

fossil gorge
#

Yeah, looks like a lot of it was on the RPI board. I like to keep a look on the right-hand side to see which directory/module and path the text is from. Also handy to see what the message might mean in context.

cobalt grail
#

I was indeed nudging @fossil gorge about me getting to 100%. ๐Ÿ™‚

#

And yes, most of the new strings are RPi related.

fossil gorge
#

"nudging", just like hockey players "nudge" each other! ๐Ÿ˜›

manic glacierBOT
#

A couple of conversions from float to uint64_t in usb_cdc brought in a bunch of floating-point library routines that were otherwise not needed, adding a couple of kB to the build. Use a special-purpose conversion routine instead.

Another alternative would be to limit the conversion to uint32_t, but then I have to check for the timeouts being too large, so this is probably less code.

This is the inverse of a routine I wrote a long time ago to compactly convert a uint64_t to a `fl...

manic glacierBOT
#

A long time ago when I was working on HID, I found that MSC on the SAMD21 needed to use separate endpoint pairs for IN and OUT. I discovered this only empirically. There is no erratum that would dictate needing two endpoints. At the time we were using the ASF4 USB stack. I was suspicious it was due to ASF4, but could not be sure.

Now that we are using TinyUSB, I tried this again, and, after some mild testing, I di...

jaunty juniper
#

say, has anyone looked into setting up an ESP32S2 as an access point ?

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I didn't actually test or check binary sizes. However, I did use cbmc to "prove" that your code is equivalent to the standard cast. This should include any possible floating-point value (though this is done via theorem prover, not exhaustive testing):

#include 
#include 

uint64_t float_to_uint64_danh(float f) {
    // 4294967296 = 2^32
    const uint32_t upper_half = (uint32_t) (f /  4294967296.0f);
    const uint32_t lower_half = (uint32_t) f;
    return (((uint64_t) upper_ha...
manic glacierBOT
manic glacierBOT
#

I am following this tutorial. Everything was going well up to the point where I ran make BOARD=circuitplayground_express. An alert popped up on my screen that arm-gcc was not a verified developer and so the download would not be processed. I have run into this quite a bit with Apple (I wish there was a way to turn this annoying feature off...) so, I opened up my System Preferences and then Security & Privacy and on...

manic glacierBOT
#

When the change to fix use of this routine via the case '(uint64_t)(float
expression)' is reverted, this error occurs during the build of
feather_m4_express:

.../firmware.elf.lto.o: in function `usb_cdc_serial_write_stream':
.../Serial.c:81: undefined reference to `__aeabi_f2ulz'
.../ld: firmware.elf.lto.o: in function `usb_cdc_serial_read_stream':
.../Serial.c:44: undefined reference to `__aeabi_f2ulz'

I don't exactly know why it says that __aeabi_f2ulz is the undefined
...

#

Okay, good to know @jepler. I will purchase an express.

I am getting a new error now.

Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
[Errno 2] No such file or directory: 'arm-none-eabi-gcc'
[Errno 2] No such file or directory: 'arm-none-eabi-gcc'
[Errno 2] No such file or directory: 'arm-none-eabi-gcc'
[Errno 2] No such file or directory: 'arm-none-eabi-gcc'
[Errno 2] No such file or directory: 'arm-none-eabi-gcc'
[Errno...
manic glacierBOT
#

cost: may use more stack

Most (all?) usb string descriptors use ASCII, but are stored as uint16_t[], and on metro m0 express these total 273 elements. If we "compress" them (store 8-bit values) we save half of that (546->273 bytes).

Tag the string pointers with the low bit to distinguish them; when requested, decompress them to a stack buffer, something like (untested)

      if ((intptr_t)desc_str & 1) {
        desc_str = (uint8_t*)((intptr_t)desc_str - 1);
        uint8_t d...
manic glacierBOT
#

This is a nice savings for descriptors in flash. We have to make sure they are really transmitted before giving up the stack buffer. Once we go to some kind of dynamic descriptors, they will be constructed at runtime anyway, so we will just store the strings, or even concatenate them at runtime. (There's a lot of duplication of "CircuitPython", for instance.)

slender iron
#

so, no. it isn't supported yet

manic glacierBOT
stiff pelican
#

A couple of questions about Issues and PRs:

Is one big PR or multiple smaller PRs the preferred way?
Should every PR be based off an issue, or are PRs without an issue still considered?

I've a list of about 10 changes I want to make to the Adafruit_CircuitPython_GPS library including at least one bug and want to decide on the best way to approach it.

manic glacierBOT
stuck elbow
#

@stiff pelican depends. Don't put multiple unrelated changes into a single PR, for sure. A PR is already an issue, though it might make sense to create an issue if it's going to need several PRs

copper crescent
#

Another PR related Q :). I've designed a few testers (like https://twitter.com/burtyb/status/1362321502624956416) I'm going to run CircuitPython on. Is it OK to add them to CircuitPython proper (once I've got the schematics/docs published) or do you not want that sort of thing?

manic glacierBOT
#

I don't think this is particularly significant but worth checking this works on any bugfix

Adafruit CircuitPython 6.2.0-beta.2-18-g2a467f137 on 2021-02-15; Raspberry Pi Pico with rp2040
>>> import pwmio
>>> import board
>>> pwm0 = pwmio.PWMOut(board.GP0, frequency=5000, variable_frequency=False, duty_cycle=0)
>>> pwm1 = pwmio.PWMOut(board.GP1, frequency=5000, variable_frequency=False, duty_cycle=0)
>>> pwm0.frequency  ### working output
5000
>>> pwm1.frequency  ### broken outpu...
stuck elbow
#

@copper crescent the CP projects welcomes al CP-based hardware, by all means add it, then it will be maintained as things change

copper crescent
#

@stuck elbow ok, thanks :)

stuck elbow
#

@wicked garden one small hassle is that you will need a unique usb vid/pid

copper crescent
#

I had a moment of crazy with the CC before one of the many USB-IF price rises so that bit won't be a problem :)

tulip sleet
#

@copper crescent my understanding is that you distribute these boards, so there are multiple ones out in the world, and more coming, is that right?

#

(as opposed to you have one or a few copies that exist solely at your house)

copper crescent
#

@tulip sleet they only exist in my office atm

manic glacierBOT
#

I had a read of the code. This might be caused by a failure to initialise self->top for the second PWM in a channel's slice. The duty cycle code depends on this

https://github.com/adafruit/circuitpython/blob/0ec99b37e0cb906d86590687ed06013516823cbe/ports/raspberrypi/common-hal/pwmio/PWMOut.c#L177-L190

but it's only set in common_hal_pwmio_pwmout_set_frequency and pwmio_pwmout_set_top. The latter is not called in PWMOut.c and the former is only called once per slice. This woul...

simple pulsar
manic glacierBOT
fossil gorge
jaunty juniper
#

I was wondering if anybody had started or looked into implementing AP on the S2

manic glacierBOT
jaunty juniper
#

so far it seems nobody has it on their radar

fossil gorge
jaunty juniper
#

(which is fine, there's a lot to do, especially with the rp2040 poping unexpected)

fossil gorge
#

Unless I've completely misunderstood something

#

(as a married man, I'm used to completely misunderstanding.... everything?)

ionic elk
#

@tulip sleet how exactly does a "value based" pin interrupt work? Is it polling the pin value really slowly, or something?

#

I don't really get how you could have an interrupt associated with the value of a pin that doesn't trigger when the pin actually changes to that value, unless it's checking it on some kind of regular schedule

#

even then it's still kind of an edge detection, just a really slow and inaccurate one

tulip sleet
#

are you talking about pin alarms?

#

when you start the hw polling for a value, it will interrupt as soon as it sees that value. On the other hand, an edge-based interrupt will definitely look for a transition from the opposite value to the desired value

#

so a value-based one will trigger as soon as it sees the value, but an edge-based one will require a transition

ionic elk
#

pin alarms yeah, value vs edge

#

So ESP32-S2 does hardware polling for pin interrupts?

tulip sleet
#

if you want to alarm on high, then if the pin is already high, it will trigger, for value-based. For edge-based, it must start as low and move to high

ionic elk
#

I'm just trying to figure out what to do with "value" since that's not a thing in STM32 land

tulip sleet
#

yes, the RTC peripheral does polling

#

it's just not implemented. There are some chips that do edge triggering even during sleep

#

so you would complain if someone set edge=True

ionic elk
#

you mean if value=True, right?

#

Basically I should throw a NotImplemented if they try to use Value since an ST chip should always be Edge.

#

Why aren't value and edge a single variable? Are there cases where you could trigger on both an edge and a value? misread the API

tulip sleet
#

ah ok, I thought you were saying there was not edge detection

#

the sleep pin stuff is very different on different chips, unfortuantely

ionic elk
#

No I thought it was two redundant flags, bad reading comprehension

manic glacierBOT
livid cypress
fossil gorge
#

Ah, ok. So yeah, I misunderstood. Probably should make that my "default state of being"!

plucky flint
#

Hello friends ๐Ÿ‘‹ - in an attempt to avoid timezone-mageddon... umm... when (how long until) is the weekly catch-up meeting..?

idle owl
#

@plucky flint Hey!! ~2 hours.

plucky flint
#

Cool... 7pm UK time.

#

I've been booked for a run with my daughter at 6pm, so I should be good to make it. Looking forward to it. ๐Ÿ‘

idle owl
#

Brilliant! Looking forward to seeing you!

manic glacierBOT
#

I ran storage.erase_filesystem() in the repl, then got a traceback in gdb using a picoprobe.

The debugger shows that this is down in the USB device enumeration workaround code. The "tight loop" never terminates.

^Ctarget halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000178 msp: 0x20041f00

Thread 1 received signal SIGINT, Interrupt.
hw_line_state ()
    at sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c:...
plucky flint
#

Hope to raise โ˜๏ธ for wider input. (Also, it'll be great to say "hi" again).

idle owl
#

Sounds like a plan. Here's the notes doc if you want to add yourself alphabetically to "Status Updates" or add it to "in the Weeds" https://docs.google.com/document/d/10c1pc8x_d5PM5QPUSj9Ex0OfgyFvTiLZV9Cuno_UQDI/edit

plucky flint
#

Perfect.... looking forward to this... ๐Ÿ™‚

analog bridge
#

@slender iron would you like to see a PR for MicroPython V1.14 merge

idle owl
#

@plucky flint In the Weeds is probably the best place for a discussion. Status updates is more what you're up to and a quick answer to a question if you had one, for example.

plucky flint
#

Got it. ๐Ÿ‘

idle owl
#

Obviously feel free to add Hug Reports and Status Updates as well, if you wish ๐Ÿ™‚

slender iron
plucky flint
#

@idle owl how long do these meetings usually take..? I also have an 8pm meeting (an hour after CP meeting starts).

slender iron
idle owl
#

@plucky flint 60-90 minutes. We can mix up the order of things and do an "in the weeds" during "status updates" so we can get it in. I'll let the host know we're going to "mix is up a bit" and we'll have you go first for Status Updates.

slender iron
analog bridge
#

Yeah..! I have got it compiling ๐Ÿš€

slender iron
#

whoa! that's epic

idle owl
#

@plucky flint So that said, put your notes under your name under "Status Updates" so it's easier for us to move things around later to get them in numerical order with time stamps.

livid cypress
analog bridge
#

mpy-cross builds successfully.... ports are next

slender iron
#

@analog bridge do you want me to finish uart?

plucky flint
slender iron
#

@plucky flint I can follow up on that issue too

analog bridge
idle owl
#

Better to sort it out now than later ๐Ÿ™‚

plucky flint
#

Quite..! ๐Ÿ™‚

slender iron
stiff pelican
idle owl
#

@onyx hinge Hey! Quick note about the meeting, when it's time for Status Updates, we're going to change things up a little bit and do a mini-in-the-weeds. You can do your status update, then turn it over to @plucky flint to talk about a GitHub issue. He needs to leave 60 minutes into the meeting which means he's unlikely to make to actual-in-the-weeds. Does that make sense? I had ntoll put his notes under Status Updates so it's easier for your timestamping.

ionic elk
#

@tulip sleet One option for ST is to interrupt on both rising and falling edges. Do you think this is worth implementing? It would need a tri-state for value, not sure what the best format for that would be.

onyx hinge
#

@idle owl yes that's fine!

#

@plucky flint happy to accommodate you!

idle owl
#

Excellent! Thanks Jeff!

manic glacierBOT
analog bridge
plucky flint
slender iron
#

ok, thanks @analog bridge

plucky flint
#

bbiaw... mu โžก๏ธ ๐Ÿƒ โžก๏ธ blinka โžก๏ธ moar meetings ๐Ÿ˜‰

onyx hinge
#

<@&356864093652516868> this is as good a time as any to remind you that our weekly meeting is in about 90 minutes! We're changing things up slightly starting today: If you're just listening (lurking) there's no need to do anything in the notes document. On the other hand, if you are speaking you will need to make sure your name is in the document in the right spot(s). Adding your notes is super helpful, and it's of course critical if you want us to read your notes for you. This is basically what you are all doing already (we really appreciate everyone's attention to the notes doc!) except for being even easier for the casual listener. If what I said isn't clear, please ask and I'll do my best to clear it up for you. Also, as noted earlier, @plucky flint has an In The Weeds topic that we'll handle out of order, as they have a time limit on participating with us today. Notes: https://docs.google.com/document/d/10c1pc8x_d5PM5QPUSj9Ex0OfgyFvTiLZV9Cuno_UQDI/edit?usp=sharing

fossil gorge
#

Just realized I'll be absent for this week's meeting, since I've been scheduled for a 1-2pm CST meeting along with 2-3 by "Those folks who pay me to do stuff and junk" :/ I'd rather attend the CP one!

idle owl
#

@fossil gorge We'll read your notes. Thanks for including them!

still zephyr
#

Sorry I cannot be in the meeting, but I "modified" the I2C from the pico, only address.

blissful pollen
fossil gorge
#

Usually have the 2-3(ish) one on a weekly basis, this one is just a handoff for [another] project I'm taking over. The curse of being good at stuff maybe?

modern wing
#

Good afternoon folks -- happily lurking. Notes doc not updated....because I'm a rebel like that. adabot

solar whale
#

@modern wing I wondered what you were doing in the other voice channel ๐Ÿ˜‰

modern wing
#

@solar whale The same thing I do every night in the other voice channel! Try to take over the World! Realize that I'm just in the wrong place at the wrong time.

tidal kiln
#

lurking just listening thanks for the changes to the notes docs for us professional lurkers just listeners

errant grail
#

Text only today

jaunty juniper
#

I'm gonna lurk too, listening live for once

candid stump
#

lurking

idle owl
#

We'll be there soon! Finishing up an internal meeting.

thorny jay
#

lurking, did not do much, but some note in the document.

solar whale
#

๐Ÿ™ˆ

idle owl
#

Yes I can do notes.

lone axle
#

Yep, I have links ready

plucky flint
#

Thank you..! ๐Ÿ‘

modern wing
lone axle
#

this one didn't onebox for some reason but does look pretty cool!

old smelt
#

lurking

gloomy shuttle
#

They said videos would be up in a couple days

slender iron
#

two day video lag I think. the chat was excited about it

modern wing
#

๐ŸŽ‰

jaunty juniper
#

sorry lurking

#

no I overlooked it sorry

thorny jay
#

That's a new voice...

slender iron
#

haha, hugs arm race

#

could be worse

stuck elbow
#

can't unmute, sorry

idle owl
#

Indeed, it'll need a bit of a change.

#

Good call.

slender iron
#

are we detouring to the weeds first?

idle owl
#

@onyx hinge Detour to @plucky flint after you.

thorny jay
#

did it just cut or it is me?

slender iron
#

I can still hear fine

lone axle
thorny jay
#

Is that a "in the weed" topic for today?

#

"Mu myself and I"

slender iron
#

thanks @plucky flint !

#

and @candid stump

idle owl
#

@plucky flint Thank you for stopping by and putting that together!

gilded cradle
#

Thanks @plucky flint

plucky flint
#

Thanks folks. You're welcome @idle owl ..! Here's to making wonderful things happen. I'm dropping off to go help some local musicians build a website..! ๐Ÿ™‚ ๐Ÿ‘‹

slender iron
#

๐ŸŽ‰

#

๐Ÿš€

plucky flint
manic glacierBOT
idle owl
#

@errant grail Expanding your horizons!

old smelt
#

@onyx hinge - regarding your comment about warmer weather, it's nearly 60 degrees warmer today than it was one week ago.

stuck elbow
#

I think I fixed my mike

solar whale
#

๐Ÿ”

slender iron
#

๐Ÿ‘ sounds good @ionic elk

#

have you looked at the G0 or G4 at all?

ionic elk
#

Yes, I'm actually making feathers for them RN

#

along with an L4 one

slender iron
#

nice!!!

tulip sleet
#

there is some "big" announcement from ST on the 25th, sounds like it might be a new family of low-power chips

ionic elk
#

hmm

#

that's interesting

#

I'd be interested in adding L4 and G4 support, but the primary complication for them is they need some extra work to make sure the flash management is set up properly

tulip sleet
#

see their homepage: i got some email

ionic elk
#

one of the biggest areas that ST families diverge is their flash, they barely even share APIs and the structure is totally different

#

@tulip sleet will do

idle owl
#

@fossil gorge Please let me know what you'd like to work on with regards to other libraries. I'm happy to discuss it.

tulip sleet
#

the "Trailer" video mentions low-power, the rest is a vague teaser

ionic elk
#

@tulip sleet do you think I should register for the webcast?

#

They say "free chips" on the homepage... ๐Ÿคค

tulip sleet
#

i think you could just review the stuff after the announcement. They are having drawings for free boards, it's not guaranteed to be free

ionic elk
#

bah

hoary moat
#

I finally figured out how to listen ๐Ÿ˜‰

slender iron
#

welcome @hoary moat

hoary moat
#

Just lurking today. Will likely want to speak in a future meeting.

idle owl
#

@hoary moat I've added you to the circuitpythonistas role on Discord. We notify about the meetings, and it's required to be able to speak in the meeting. ๐Ÿ™‚

hoary moat
#

@idle owl thank you!

idle owl
#

You'll get a couple of pings each week about the meeting.

idle owl
lone axle
#

Some of the new bitmap manipulation functions that kmatch98 is working on might be helpful for rotating bitmaps I think.

mental nexus
#

Sorry had to duck out to answer a phone call. Sounds like the Tilegrid rotation is a good option if you want 90 degree rotations. @honest nova if you want to evaluate the bitmap rotation tool (any angle), I have a version in Python you can try out. https://gist.github.com/kmatch98/263866738b064ae81970e5c9c8e85ff0

Gist

A bitmap copy function with rotation, scaling and clipping of source or destination bitmaps. - bitmap_scale_rotate.py

marble hornet
idle owl
#

@marble hornet I was supposed to end up with a couple, but didn't. I wrote the guide for it without them. ๐Ÿ˜„

lone axle
#

I do have one of those breakouts and am willing to do any needed tests on it when the time comes @marble hornet feel free to ping me when you need someone to try running a test.

marble hornet
#

thank you @lone axle I will take you up on that!

idle owl
#

Actually now I'm wondering if I did end up with a proto and I'm not sure where it is. Because the screenshot in the guide is from my terminal. And I would have needed it to get the screenshot.

#

ยฏ_(ใƒ„)_/ยฏ

solar whale
#

@marble hornet I have some as well and can help with testing. Do you have a basic test case that shows the issue. I have not noticed problems with them but have not looked too closely. They return data and don't cause errors....I've had them running for quite a while ( several weeks)

#

I'm using them on esp32s2 boards

hoary moat
#

March?

uncut nexus
#

March 22nd??

hoary moat
#

What is time?

stuck elbow
#

wibbly-wobbly timey-wimey

thorny jay
#

Maybe more use of the glossary can increase compresability (is that a word) of weblate translation.

modern wing
#

The ides of March have come....and gone.

solar whale
#

๐Ÿ˜ฌ

stuck elbow
#

the IDE of March

hoary moat
#

Hugs @onyx hinge

modern wing
#

๐Ÿค—

gilded cradle
#

Thanks everyone

marble hornet
#

@solar whale huh! and i've been using the simple test as the test script , a 350mah lipo, and a feather. running it w/out a thermistor attached.

modern wing
#

Thanks everyone! Thanks @onyx hinge for hosting!

thorny jay
#

Thanks. Did someone said timezone and daylight saving?

stuck elbow
#

at least we are still limited to just one planet

gilded cradle
#

I'm off to have lunch

solar whale
#

@marble hornet what is the issue you see?

inland tusk
#

Bless you all

thorny jay
#

I was trying to make a project a week and send to Anne.

marble hornet
#

RuntimeError: CRC failure on reading word

#

based on the guithub issue it only exists on the nrf

gloomy shuttle
#

I was tagging Anne in twitter stuff, would using email be the preferred method now?

thorny jay
#

On Twitter I try to use @CircuitPython below. I believe one trick is that Anne actively search on Twitter and started to follow frequent poster and those making RT.

onyx hinge
thorny jay
marble hornet
#

@solar whale what board are you running it on?

idle owl
#

Hashtag will work better for me @thorny jay

mental nexus
#

Thanks everyone!

thorny jay
#

@ help find what it is...

solar whale
#

@marble hornet mostly on umfeathers2 -- but I can set it up on any board -- what are you seeing errors on?

thorny jay
#

Many maker project might pop up on the week-end...

idle owl
#

@thorny jay Exactly. That's why having Monday is super useful.

marble hornet
thorny jay
#

But then again... timezone and everything. My target was to finish for the meeting of Monday and put it in the note from the meeting. But that was already last minute for Anne.

marble hornet
#

@solar whale I'm also free to audio chat if that is a preferred form of communication.

solar whale
#

@marble hornet Yes -- I'll do that -- probably not until tomorrow -- but then I'll let you know if I can reproduce the issue. Have you opened an issue in the library?

marble hornet
solar whale
#

Lets see if I can reproduce it

#

Great -- I'll post any findings there.

marble hornet
#

๐Ÿคž.
I'll try it on a metro and do the same.

solar whale
#

looks like most of the issues have been with nrf52840...

marble hornet
#

yeah, all excluding anecdata's

solar whale
#

OK -- will try on nrf52840 first -- I have a few variants. Ten can compare with other MCUs

#

should be able to try some tests this evening.

marble hornet
#

๐Ÿ‘. gtg, thank you.
I'll put any debug modifications to the library on a fork.

last crater
alpine nimbus
#

btw, the volume on the weekly meeting on youtube for everyone except the organizer are just barely audible when i have the volume cranked up all the way on my laptop.

fossil gorge
#

Trying to catch up on this week's meeting - seems like the participant audio is pretty low. Not sure how it compares to other meetings (listening in background)

still zephyr
#

@mental nexus Thank you for the code, I will take a look. I think is the same code that you were using for the new library right?

mental nexus
#

Yep also Iโ€™m working on adding this as an option to the core so it will run a lot faster.

still zephyr
#

@stuck elbow Thanks for the info, three weeks ago I tried to rotate the tile Inspired by one your games, I could not rotate a characters, granted at that time I was not so familiar with the display text libraries. I will try again and harder. Thanks for the info

#

Ok thanks, I will try that too, and give my comments and see if we can have the fayette Font in vertical mode ๐Ÿ™ƒ

stuck elbow
#

@still zephyr at least with terminalio this should work -- you just rotate the TileGrid that you pass to the terminal class

still zephyr
#

YEs agree with Endico and Hugo the volume was too low, and I am using my headphones to eatch the youtube video

still zephyr
fossil gorge
slender iron
#

@alpine nimbus and @still zephyr thats on the youtube recording right? It might be jeff's setup. is last week's ok? I recorded last week

still zephyr
#

Last week was ok

alpine nimbus
#

@slender iron Yes, the youtube recording. I believe last weeks was ok

still zephyr
#

And to confirm this is youtube for me also

slender iron
#

๐Ÿ‘

#

@onyx hinge you might want to check your OBS settings

onyx hinge
#

the audio levels?

slender iron
#

ya, for the desktop audio

onyx hinge
#

I was having trouble today adjusting my headphones separately from obs's monitor

#

if my headphones are "up" too much it is picked up by the mic

#

I had hoped it would be OK but I guess not ๐Ÿ˜ฆ

#

I'll fiddle with it before next time.

slender iron
#

kk, np

onyx hinge
#

sorry for the trouble, @alpine nimbus , @still zephyr I'll try to do better next time

alpine nimbus
#

I could probably be able to hear the others if I hooked up an external speaker and cranked it up (and back down when jeff speaks). But I can't get that loud with the old macbook speakers

#

no biggie

manic glacierBOT
blissful pollen
#

@slender iron @onyx hinge Just was listening to the meeting about the countio. I can try IRQs (I looked at them but saw the SDK handled it as well). I'll look at what examples already used them (off hand if you know one I'll take a look at it). The PMW way with a background task could still miss a wrap if the task is delayed, so I do like IRQ better

onyx hinge
#

people really do listen to this thing after the fact

slender iron
#

then the function is: void isr_dma_0(void)

#

looks at the pwm structure

#

enabling irqs is usually a two step process. enabling it in the peripheral and then enabling it in the nvic in the cpu

blissful pollen
#

Thanks, just want to keep it consistent with what you did. I thought (could be wrong) each core could only handle one call back function?

slender iron
#

ya, doing it that way will override the sdk's implementation

idle owl
#

@worldly dragon I disconnected you from the voice chat so no one popped in and startled you.

slender iron
#

looks like there is only one pwm interrupt so things might get trickier when its shared

#

(section 2.3.2 shows interrupt lines into the nvic)

manic glacierBOT
blissful pollen
#

I was looking at the GPIO interrupts too but even that is shared too hmm

slender iron
#

@blissful pollen it's ok if it's shared. it just means you need to check the peripheral registers to determine why the interrupt happened

#

the pico-sdk might do this

manic glacierBOT
blissful pollen
#

okay i'll dig into it a bit more and see what I find.

still zephyr
mental nexus
#

I got a pylint error in a library (displayio_layout) due to the examples. Any idea how to resolve this?examples/displayio_layout_gridlayout_simpletest.py:1:0: R0801: Similar lines in 2 files

idle owl
#

@mental nexus Oi. Apparently it's a Pylint issue, and it's a bug that it can't be disabled.

#

@mental nexus Try doing a # pylint: disable=duplicate-code which I think is the error name, in the example file(s). See if they fixed that bug at least.

#

I feel like this is going to bite us across the board.

#

I think we'll need to add duplicate-code to the things it skips for examples.

manic glacierBOT
#

I don't really like the idea of changing DigitalInOut. value is meant to represent the gpio's binary value, not really "on-ness" of a button or LED.

My gut aligns with @jerryneedell's point to do it in Python. However, having native support would be very nice so that board could have objects that work out of the box.

What if we added two new native classes LED and Button (module TBD)? They'd be similar to Signal except they'd lean into what they are. LED could be explicitly do...

#

Can someone offer guidance here?

The mechanics for adding a module to the build and putting it in the top level modules is in py/circuitpy-. It's controlled by the CIRCUITPY_PULSEIO definition. Once it's enabled, the build will fail because ports/raspberrypi/common-hal/pulseio is missing. That's where the implementation goes.

mental nexus
# idle owl I think we'll need to add `duplicate-code` to the things it skips for examples.

I tried adding this locally and it gave the same error. Maybe this can't be overridden? -> https://github.com/PyCQA/pylint/issues/214#issuecomment-778429794

idle owl
#

According to that issue, it can't be.

idle owl
mental nexus
#

No problem.

manic glacierBOT
manic glacierBOT
#

This might be caused by a failure to initialise self->top for the second PWM in a channel's slice

This definitely seems like a bug! Mind making a PR for it?

BTW, why does common_hal_pwmio_pwmout_set_frequency call common_hal_pwmio_pwmout_set_duty_cycle?

duty_cycle is called again because the duty_cycle is scaled by the top value (which set_frequency changes.)

On reflection, there's a bit of an issue here with having independent values of top per PWMOut when it's a ...

manic glacierBOT
fossil gorge
manic glacierBOT
slender iron
#

Anyone have a good way of testing PDMIn? Maybe @meager fog or @onyx hinge? I have numbers coming from it now

onyx hinge
#

@slender iron you can graph its intensity or even an fft of it

slender iron
#

ok, will look at that tomorrow

onyx hinge
#

the second code is probably good to start with, small numbers when not much noise, big numbers when big noise

slender iron
#

at least it's not crashing now ๐Ÿ™‚

onyx hinge
#

you'll see things like "is there a signed/unsigned problem" right away

#

good to hear -- look forward to the results of your testing tomorrow

slender iron
#

I also need to check to see if the fifo is overflowing on the pio

#

I'm trying not to use dma

#

but I'm not sure I can keep up

#

I can probably leave it as a TODO

#

PDMIn is rarely used

still zephyr
#

For all interested in the Vertical Text tests: 1. Label, will require a refactor of the factory as each character is a bitmap, and then the result will be each turning. Bitmap_label is more promising as probably transpose_xy and flip_X and flip_y combination could do the trick with less coding. Bimap only is the easier, as probably some folks have tested already. I have changed the old library to include a parameter and do the tests, please disregard this parameter. results and test code are here: https://github.com/jposada202020/Label_Vertical

manic glacierBOT
manic glacierBOT
#

@dhalbert I have done most of my implementation, but I would like to hear from you to decide further work.

(1)
Checking nRF SDK info and nrf touchin discussion in CY github, I understand nRF processor cannot be woken up by touch (neither light sleep nor deep sleep).
Should we simply ignore TouchAlarm operations (current implementation), or should we raise an exception ?

(2)
I have moved all the debugging codes to a new file debug_uart.c under ports/nrf/supervisor/, and these codes a...

#

We had many ad-hoc build-shrink settings for builds that were too big, most of which are SAMD21 boards with no external flash. This set of changes sets SUPEROPT_VM = 0 on most of these boards, except for those that already have several modules turned off to make space. It removes the translation-specific shrinks that increase build time and make performance vary by language.

SUPEROPT_VM = 0 is reported to decrease performance by about 20%. This is somewhat regrettable, but there were a...

atomic summit
#

Anyone able to compile any ESP32S2 firmware using the latest? I can't build FeatherS2 or TinyS2 - I keep getting a bunch of errors around tud_cdc_* stuff <- never seen this before.

#
../../supervisor/shared/serial.c:82:12: error: implicit declaration of function 'tud_cdc_connected'; did you mean 'serial_connected'? [-Werror=implicit-function-declaration]
     return tud_cdc_connected();
            ^~~~~~~~~~~~~~~~~
            serial_connected
../../supervisor/shared/serial.c:82:12: error: nested extern declaration of 'tud_cdc_connected' [-Werror=nested-externs]
../../supervisor/shared/serial.c: In function 'serial_read':
../../supervisor/shared/serial.c:104:19: error: implicit declaration of function 'tud_cdc_read_char' [-Werror=implicit-function-declaration]
     return (char) tud_cdc_read_char();
                   ^~~~~~~~~~~~~~~~~
../../supervisor/shared/serial.c:104:19: error: nested extern declaration of 'tud_cdc_read_char' [-Werror=nested-externs]
../../supervisor/shared/serial.c: In function 'serial_bytes_available':
../../supervisor/shared/serial.c:118:12: error: implicit declaration of function 'tud_cdc_available' [-Werror=implicit-function-declaration]
     return tud_cdc_available() > 0;
            ^~~~~~~~~~~~~~~~~
../../supervisor/shared/serial.c:118:12: error: nested extern declaration of 'tud_cdc_available' [-Werror=nested-externs]
../../supervisor/shared/serial.c: In function 'serial_write_substring':
../../supervisor/shared/serial.c:138:18: error: implicit declaration of function 'tud_cdc_write'; did you mean 'tu_fifo_write'? [-Werror=implicit-function-declaration]
         count += tud_cdc_write(text + count, length - count);
                  ^~~~~~~~~~~~~
                  tu_fifo_write
../../supervisor/shared/serial.c:138:18: error: nested extern declaration of 'tud_cdc_write' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make: *** [build-unexpectedmaker_tinys2/supervisor/shared/serial.o] Error 1```
analog bridge
atomic summit
#

I tried that... seems it's up to date

#

I've tried all of the usual stuff...

#

other than stomping the repo and starting again

#

But the CI is also failing with the same error on my PR

analog bridge
#

I am compiling the latest main now...

atomic summit
#

oh, hmm, has the USB_DEVICES = "CDC,MSC,HID" stuff now been removed?

analog bridge
#

yes... it was in #4215

atomic summit
#

trying again now without it.... as I cant find any boards using that

#

ok, I missed that memo... checking that now...

analog bridge
#

that seems to be the issue...

#

mine finished compiling successfully

atomic summit
#

yup, mine is compiling now

analog bridge
#

nice! ๐Ÿ‘

atomic summit
#

so has anyone implemented the newer compile time flags for USB stuff in a board profile?

#

I might leave that for another time - hopefully the CI will be happy now!

analog bridge
#

ya... dan updated the flags in his 4215 work

atomic summit
#

Right, but has anyone added those flags to a board definition anywhere? Just curious to look at one if someone has

analog bridge
#

as per my understanding they aren't needed anymore...
I think this has moved to a port specific basis rather than board specific

atomic summit
#

Oh, right... I'm a little lost reading the comments on this ๐Ÿ˜‰ Ok, I'll move on, thanks for the help @analog bridge !

atomic summit
#

Ok, CI failed build again, but this time it looks like it's not me... Clone IDF submodules failed...
Failed to clone 'components/asio/asio' a second time, aborting

#

But that was on my FeatherS2_Prerelease, My TinyS2 built ok.

manic glacierBOT
manic glacierBOT
analog bridge
#

say, I have the following example object. Is it possible to get the value of b when only base and a are known?

typedef struct {
    mp_obj_base_t base;
    uint8_t a;
    uint8_t b;
} example_obj_t;
ornate breach
#

Sure, private variables with a little logic in a getter method might suffice

#

I canโ€™t say for certain how it would look off the top of my head though

analog bridge
#

yes... I am interested in knowing if CPY already has a function for this

tulip sleet
tulip sleet
analog bridge
#

ignore it... I have found an easier way to accomplish what I am trying to do
its one those things where you start making it more complex and then suddenly realize an easier way to do it

tulip sleet
manic glacierBOT
manic glacierBOT
tulip sleet
#

@onyx hinge Do you understand why we are getting " [Hosted Weblate] New language added to CircuitPython/CircuitPython" messages? There have been several. The latest is for "de", not "de_DE", but when I click on the appropriate links in the message, it goes to the existing translation.

onyx hinge
#

yes, the link in that message is to "glossary", so I gues some action someone took on the website added the glossary for our German translation

idle owl
#

@idle wharf Good morning! Please ping me when you're around.

tulip sleet
#

I think you are right about the "glossary". I remember that word in the previous messages as well.

onyx hinge
manic glacierBOT
#

It's ok for me to wait. But I would like this PR to be in the next CircuitPython release.

Currently on the website: https://circuitpython.org/board/spresense/ there are 2 versions of CP that you can choose from: CircuitPython 6.1.0 and CircuitPython 6.2.0-beta.2.

Unfortunately, CircuitPython 6.1.0 does not work for Spresense and CircuitPython 6.2.0-beta.2 only works on Linux.

idle owl
#

@ionic elk Around for a question?

analog bridge
#

@slender iron I have got the the internal buffering implemented but the pico-sdk doesn't have functionality of passing args in callbacks...
I need to pass data regarding uart instance and the linked ringbuf... how should I proceed with this
https://github.com/raspberrypi/pico-sdk/issues/71

slender iron
#

@analog bridge are there per-instance callbacks?

#

you could probably statically do it because there are only two

ionic elk
#

@idle owl what's up?

analog bridge
idle owl
#

Feedback on one of my guides saying I should mention that you can't use 192+ or something in CP.

#

From November 2020 though. So I thought I'd ask you.

analog bridge
ionic elk
#

@idle owl yes, that's still true I think. It has two different kinds of RAM, and one of them is small and invalid for certain kinds of processor operations. So we use it to buffer the flash, instead of being user accessible.

idle owl
#

Alright. Thank you!

ionic elk
#

np

slender iron
still zephyr
# idle owl <@!366059101203202052> Try doing a `# pylint: disable=duplicate-code` which I th...

I have just have the same error, however this is in the main code, should I do the same, it is for this PR https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/pull/121

idle owl
#

@still zephyr It can't be disabled. I'm looking into the solution. Please sit tight for a bit and I'll let you know as soon as I know what we're going to do.

still zephyr
idle owl
#

@still zephyr I will definitely let you know if you can help. Whatever solution we come up with will need to be tested, so you may be able to help there. And you're welcome ๐Ÿ™‚

manic glacierBOT
manic glacierBOT
#

@tannewt Peeking at the west docs, it uses cmake to generate ninja build files & board files. But since it's Python, that part can probably be replumbed. There's also a flashing component; could that be handy for priming/repairing boards for usb disk?

Flashing is interesting but not very urgent. Most CircuitPython boards have UF2 bootloaders that are easy to manage separately. The main reason I'd like to rework our build system is to simplify configuration of different boards and genera...

manic glacierBOT
manic glacierBOT
ionic elk
#

@tulip sleet could we hop in voice chat sometime to talk about the alarm system? I'm having trouble grokking the get_wake_alarm subsystems.

tulip sleet
ionic elk
#

Ok, I'm in amelia

manic glacierBOT
#

Matrix vector multiplication isn't working in ulab on the following version:
Adafruit CircuitPython 6.1.0 on 2021-01-21; Adafruit Grand Central M4 Express with samd51p20

Here is an example of it's current functionality:

import ulab as np
A = np.eye(3)
B = np.array([1,2,3.0])

# the following two lines don't work 
C = np.linalg.dot(A,B)                    # ValueError: matrix dimensions do not match
C = np.linalg.dot(A,B.transpose())        # ValueError: matrix dimensions do ...
ionic elk
#

@tulip sleet

import board
import busio
i2c = board.I2C()
#i2c = busio.I2C(board.IO5, board.IO6)
def printdevices():
    i2c.try_lock()
    devices = i2c.scan()
    print("I2C devices:", len(devices))
    for device in devices:
        print(hex(device))
    i2c.unlock()
printdevices()
stiff pewter
# manic glacier

@slender iron I figured it might make more sense to continue the discussion here instead of GitHub for scheduling the chat about migrating to ninja build. I see that from the time you introduced the project to me at the pycon hackathon in May, there are 2 more commits to your ninja branch. I would like to learn about your vision. I'll have some time to work on the weekends, but for the chat we can also meet during the week. I noticed you had some "Deep Dive" sessions on the Adafruit YouTube channel about every week; perhaps it might make sense for me to attend one of those sessions and touch on it sometime then if it's not going to put off other listeners? Are you have a session this Thursday or Friday?

manic glacierBOT
slender iron
#

@stiff pewter thanks for pinging me! ya, I plan on doing a deep dive this friday

stiff pewter
#

Ok, great. I'll stop by then.

slender iron
#

next week will be on thursday

#

ok, I'll plan on talking more about my vision for it

stiff pewter
#

I noticed a pinned Google doc. Is there an agenda somewhere I should add this on to?

slender iron
#

should fit in nicely with the flash work I want to do sooner too

#

I can make the doc now

#

the pinned doc is for the circuitpython weekly which is on mondays at 11am pacific

#

that may be a better place to discuss actually

#

to get input from other circuitpython folks

#

we have an "in the weeds" section that usually happens around noon

subtle sun
#

@slender iron on this topic is there a specific reason you don't want to use cmake as the build system?
I am guessing that you plan on a python wrapper anyway and cmake would allow for simpler integration to other projects such as the esp-idf.
This is also the direction micropython is moving towards.

slender iron
#

@subtle sun I dislike cmake every time I look at it. One thing it doesn't do that I'd like to is generate one ninja file that produces all of the artifacts

#

usually cmake is setup like our make is now where the board is an input to a bunch of conditional code

#

I do think it's worth thinking about how to integrate with cmake

#

I don't want to learn another language (cmake) if python can do what it does

stiff pewter
#

When you compile python itself from source, it uses python as it's "build" system

slender iron
#

of course, I should caveat this with the fact I haven't used cmake for any of my projects

#

I like what ninja provides though

#

I don't care to do the build from python directly

#

python is good at generating text ๐Ÿ™‚

stiff pewter
#

I've put in my calendar to attend both Friday and Monday's sessions. See y'all then!

slender iron
#

thanks!

subtle sun
#

Totally understood. As long as it plays nicely with circuitpython dependencies should be fine.

I have been working with a colleague at work on building micropython as a library for embedding into a native executable.
This is probably a good example for how this would look in cmake.
https://github.com/michelhe/micropython/tree/libmicropython-port-fixes

#

Just to get a feel

slender iron
#

ya, it is interesting because I'm very much of the opinion that CP is always the top level project

#

whereas MP is going the libmicropython route

subtle sun
#

Sorry my mistake the version with cmake is hasn't been pushed yet.
Will update when it is up.

slender iron
#

๐Ÿ‘

#

I'm super biased about this. ๐Ÿ™‚ I don't feel like most vendor hals work well for us either. they are all geared towards being their own ecosystem and supporting a project on a single board

#

the HALs also don't do much dynamically. there is a lot of "this pin shall do this" baked into the compile

#

tinyusb represents the world I want

#

one API that works across vendors

subtle sun
#

Personally i am hoping to get back to work on the the successor to the https://circuitpython.org/board/aramcon_badge_2019/ .
The conference has been postponed because of the pandemic but we are hoping to be able to reschedule the conference to September (the vaccination here in Israel is moving extremely quick).

nRF52840-Based Smart Badge with Bluetooth, Thread Mesh Network, 2.9โ€ ePaper Display, Neopixels, built-in MP3 Sound decoder and more!Features: Nordic nRF52840 Cortex M4 Module(E73-2G4M08S1C) 2.9 inch e-paper glass display(GDEW029T5) IยฒC Accelerometer(LIS2DH12) 16MBit Serial Flash(GD25Q16C) MP...

slender iron
#

๐Ÿ‘ BLE workflow is a higher priority than this build stuff for me

subtle sun
# slender iron tinyusb represents the world I want

Agreed. I don't see how one could implement https://github.com/adafruit/circuitpython/pull/4215 across boards without tinyusb.
But this is traditionally what you would get from an RTOS.

GitHub

Implements a second CDC channel on boards where it is possible.

New module usb_cdc. usb_cdc.serials[0] is the REPL channel; usb_cdc.serials[1] is the new secondary channel. Both are pre-created in...

#

The HAL that is.

slender iron
#

๐Ÿ’ฏ my beef with RTOSes is that they are usually monolithic and usually bake configuration in at compile time

manic glacierBOT
subtle sun
#

It is a trade-off they choose to take for code size, performance and safety.
I don't think that there is one true answer.
The possibility of a dynamic environment like CircuitPython on commodity hardware is quite recent.

slender iron
#

yup, I totally get configuring stuff at compile time for that reason

#

I do think some could be less tightly coupled

#

migrating to zephyr for example is all-or-nothing really

subtle sun
#

And i would be unlikely to deploy CircuitPython as is into an industrial / safety critical environment.
That said i think there is a lot to be said about using it in less constrained use cases.

slender iron
#

ya, we don't claim to be good enough for industrial and safety critical

#

the MP space stuff though used it for non-critical things which makes a lot of sense to me

subtle sun
#

I think something like LibOpenCM3 for RISC-V could bring us much closer to where you would like us to be

slender iron
#

I like to watch the zephyr project because of the safety stuff they do

#

libopencm3 is gpl though which means we can't use it in CP unless we relicense (which we won't)

subtle sun
#

I wasn't talking so much about the license but more about a vendor agnostic library (although not architecture agnostic)

#

Would you be interested to accept work on a Zephyr port of CP?

slender iron
slender iron
#

(maureen has been doing MP zephyr work)

subtle sun
ionic elk
subtle sun
idle owl
#

HAH. Me: 1, Pylint: 0.

slender iron
#

@subtle sun USB IP varies enough that you have multiple implementations under the hood. I suspect it's about the same for SPI. And yes, you are understanding where I'm going with this. common-hals could be split out as separate libraries. I like the idea of moving to a peripheral IP based model rather than chip family like we have now. Suddenly your driver support becomes much more like I2C drivers then.

idle owl
#

@gilded cradle Do you have a few minutes to discuss your Tri-Color SSD1681 PR and give me a little more information on what failed? I can't find a failing Actions run for your PR.

gilded cradle
#

Sure

idle owl
# gilded cradle Sure

Excellent. First thing, where is the failure? I need to see what it failed on and how.

gilded cradle
idle owl
#

Thanks!

subtle sun
#

@slender iron sounds good. This would make the effort on the abstraction well spent.

idle owl
#

Oh I see. Not today though.

idle owl
gilded cradle
#

Yep, I see there's a new release of pylint. They probably messed up

idle owl
#

The thing is, this check has been in place for ages, and it wasn't working

#

Something in the latest release made it work

#

I have a fix for it but I need to make sure it will work.

#

Fact is, it's a good check, and should be run on the libs. But not on the examples which will obviously have duplicate code.

gilded cradle
#

Yeah, I was looking through commits and they fixed something that caused it to work

idle owl
#

Yeah. I wanted to make sure it was failing on the examples for you and not on the lib files.

#

If it's failing on the lib files, we need to do something else as well.

gilded cradle
#

It was the lib files because it selectively loads the right eink drivers, so there really is a lot of duplicate code.

idle owl
#

There are settings for the check we can use, but I don't want to blanket use them to fix the example files issue. So I have a fix for that, but need to know if we need to also change the config a little.

gilded cradle
idle owl
#

Oi ok.

manic glacierBOT
gilded cradle
#

I imagine the Adafruit_CircuitPython_RGB_Display library would suffer a similar fate on the next update/

idle owl
#

And this is as refactored as they can get?

#

Ignorant question, but worth asking.

gilded cradle
#

The EPD could probably be refactored, but it would need major refactoring.

manic glacierBOT
idle owl
#

Ok.

gilded cradle
#

It's kind of a hold over until we can add eInk support to Blinka displayio

#

So It's probably not worth a major refactor

idle owl
#

That's fair. Still, this is my grumpy face.

#

Ok.

#

Do you think there are many libs like this? Other than this and RGB Display?

gilded cradle
#

No, probably not. Those are the only 2 I can think of and I don't even know if we used RGB_Display anymore since I added in Blinka Displayio

idle owl
#

Ok. I think I'm going to make an exception to the rule and have us change the .pylintrc only in those repos. We're already taping them together to keep them going, I refuse to put the rest of the libraries in a less-than-useful state to accommodate two that we're limping along.

gilded cradle
#

That sounds fine with me

#

Shall I re-enable it for EPD then?

idle owl
#

Yes give me a moment, I'll have you make the change I think.

#

Remove the change you already made, if you haven't already. Update line 256 in the .pylintrc file in the EPD repo to 210. This section here should look like this when you're done ```[SIMILARITIES]

Ignore comments when computing similarities.

ignore-comments=yes

Ignore docstrings when computing similarities.

ignore-docstrings=yes

Ignore imports when computing similarities.

ignore-imports=no

Minimum lines number of a similarity.

min-similarity-lines=210```

#

We'll be patching all the other libs' build.yml file here in a bit, but this change will apply ONLY to EPD and RGB_Display.

gilded cradle
#

I just ran it locally and it's still failing with 210

idle owl
#

Please save the output to a file and send it to me here

#

Or paste it into a file rather. I figure it's too long for a Discord message

gilded cradle
idle owl
#

Looking into it.

gilded cradle
#

Yeah, the number doesn't make a difference. I changed it as high as 20000 and it still had a wall of errors.

manic glacierBOT
gilded cradle
idle owl
#

@gilded cradle I just generated a new pylintrc and it works.

#

There's something in our config making it ignore that change.

#

I'm sorting out what it is.

gilded cradle
#

Oh, ok

idle owl
#

Good find though

gilded cradle
#

Thanks

idle owl
#

Oh that might be it.

#

Yep. That's it.

gilded cradle
#

Ok, changing to jobs=1 fixes the issue

idle owl
#

Yep.

#

Ok.

gilded cradle
#

๐Ÿ™‚

idle owl
#

For now, just do that.

#

It's only two libs, so we'll deal with manually updating them if we need to later.

gilded cradle
#

Ok. I also think I can use something lower than 210 like 50

idle owl
#

Really?

#

I grabbed that from the number of similar lines in the output.

gilded cradle
#

based on the file I uploaded, yeah

idle owl
#

Test it out and go as low as you can, but bear in mind we don't want to keep updating this.

gilded cradle
#

50 works, 40 fails

idle owl
#

Ok go with 50.

gilded cradle
#

ok

idle owl
#

Can you update the .pylintrc on the RGB Display lib as well? It fails, I checked.

gilded cradle
#

sure

idle owl
#

Perfect.

manic glacierBOT
#

Thinking further, we would need to make a copy of the original members before sorting, and then, after sorting, iterate over it, and for every element, locate its previous position โ€” if that position is more to the back than the new one, then iterate over all layers in between the two positions, and check for overlaps โ€” if an overlap is detected, mark the layer dirty.

A simplified, and possibly much faster approach, would be to mark dirty any layers that moved forward, no matter if the...

ionic elk
#

@tulip sleet I found the ST table for power utilization. It turns out that sleep mode (WFI) by itself on the STM32 really doesn't do too much, unless you shut off peripherals - the difference between Run and Sleep with all peripherals on is 87mA vs 59mA. Stop mode (all state retained, but clocks disabled) is much, much lower - 0.45mA. Standby is 3uA or lower but can only be woken by the RTC and a specific Wakeup pin.

#

There are also big power savings if you turn the clock speed down, but I'm wary of how that would affect things on the fly.

ionic elk
#

But the Stop mode savings do show some potential value to an intermediate low power mode. Sleep by itself isn't going to do very much and I worry that Deep Sleep could drop an unacceptable amount of state for some projects.

uncut nexus
#

If I call m_malloc() in a core module routine; do I need to free up that memory upon a deinit(). I see some modules that are just setting the pointer to NULL. Is that sufficient?

manic glacierBOT
#

TimeAlarm for deep sleep (I am not sure if it is possible)

This is quite possible if you just use System ON. The power consumption can still be negligible. You don't have to use System OFF if it is inconvenient. See the chart below from the datasheet. System ON with wake from RTC is on about 3uA, which is still wonderfully low. SYSTEM OFF gets it below 1 uA in certain circumstances. You could choose which to do based on which alarms are set. But to start you don't have to differentiate a...

slender iron
uncut nexus
#

OK, thanks!

slender iron
#

np, what are you working on?

uncut nexus
#

pulsein using pio

slender iron
#

awesome! dht folks will love that

uncut nexus
#

I have it mostly working for DHT and irremote - just cleaning up the edges.

idle owl
#

@fossil gorge I've started looking into the same thing you're working on but for a different reason. And there's a catch now. That I don't know if it's even possible to handle.

fossil gorge
#

Which thing is that? Pylint/Pre-Commit?

idle owl
#

Yes

#

Here's what I now need from it.

#

I need it to run Pylint on the example files separately. So, separate Pylint runs for each file. It's doable with it in the github workflow build.yml file, but I'm struggling to figure out how to do it using pre-commit.

#

The build.yml change is this: (find examples/ -name \*.py) but pre-commit doesn't work that way.

fossil gorge
#

So like it is now, with different rules disabled/set for examples/*.py and adafruit_*.py?

idle owl
#

Sort of.

fossil gorge
#

There are ways around it, no worries ๐Ÿ˜‰

idle owl
#

Not like it is now.

#

Now it runs on all examples at the same time.

fossil gorge
#

And it should be 1 call per example?

idle owl
#

Yes. It's a workaround for the now-functioning duplicate-code check.

#

Checking each file separately means it doesn't compare them.

fossil gorge
#

Ah, I see

idle owl
#

I want this ONLY on examples.

#

Because they should be similar, that's fine. Lib files, less so.

fossil gorge
#

Gotcha. Makes sense

idle owl
#

And here's the other catch. I need this.... ASAP.

fossil gorge
#

Ok

idle owl
#

Because if we can get it working, I'm going to have Dylan patch all the libs. Because this check is breaking all my builds.

fossil gorge
#

Tsk tsk tsk. Bad Pylint, BAD!

idle owl
#

This was always the plan, but maybe not so quickly. Thank, Pylint. ๐Ÿ™„

fossil gorge
#

Let me dig into it a bit.

idle owl
#

Thank you! I have done so and am at a loss.

fossil gorge
#

I think I can come up with a somehting

idle owl
#

I have a setup I can test.

fossil gorge
#

Ok. Is it running a specific version of pylint that's causing the issue?

idle owl
#

Actually, I should explain it to you so you can test it locally.

fossil gorge
#

So I can repro on my end as well

idle owl
#

2.7.0 should do it.

#

If you clone the Adafruit_CircuitPython_DisplayIO_Layout library, and let the latest Pylint run on the examples/, it will fail appropriately. Unless you force it to iterate over each file, in which case, it should not fail.

fossil gorge
#

Got it. I'll work off that repo to make sure we're working off the same data

idle owl
#

It's not a complicated setup. I've been editing the pre-commit-config.yaml file locally and running pre-commit run.

#

Thank you so much

fossil gorge
#

That was my technique as well

#

You're welcome!

idle owl
#

Good to know I was at least on the right track there!

#

Run pylint examples/*.py to make sure you've got the fail version, if you're unsure.

fossil gorge
#

Sounds good

slender iron
#

anyone working on rotaryio for rp2040?

fossil gorge
#

Might be away for a bit, since kids apparently want to be fed more than once/day ๐Ÿ™„

#

But shouldn't be long, and i'll be on that

idle owl
#

No worries! Life comes first!

ornate breach
onyx hinge
#

Here is the notes document for 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/1u7_1iSfVo1LGNRU6WGSMYAr9Dp6VvEqK8UMHlco8oVA/edit?usp=sharing

onyx hinge
#

Realizes he already has some folks to hug-report, realize he forgot to make the meeting document .. yay

ornate breach
#

๐Ÿ˜…

thorny jay
manic glacierBOT
onyx hinge
#

I'm supposed to do it right after the previous meeting, so it's there for you to do exactly that @thorny jay

manic glacierBOT
slender iron
#

@blissful pollen are you working on any rp2040 stuff?

#

countio right?

blissful pollen
slender iron
#

kk, I want to make sure we're not working on the same things

#

microdev is doing uart, davep is doing pulsein

blissful pollen
#

cool, yeah I'll usually ask here first to see if anyone is working on it

slender iron
#

๐Ÿ™‚

thorny jay
#

Anyway, I have a big gap in "making" anything since a few weeks... except for watching YouTube video.

onyx hinge
#

you wouldn't necessarily think so, but it does take a lot out of you (me) to run the meeting. A break right after it is much needed.

idle owl
#

A break you didn't get because of newsletter training.

manic glacierBOT
low sentinel
#

If youโ€™ve got improvements to that library feel free to open a pull request ๐Ÿ˜„
I have been very swamped with life and work the past few months and havenโ€™t been able to drive that where I want it to be but Iโ€™m always happy to burn midnight oil on prโ€™s.

onyx hinge
fossil gorge
#

Just to keep you informed @idle owl, I'm at least 60% sure I'm onto something that works

idle owl
#

@fossil gorge Oooh I hope so!

fossil gorge
#

It was supposed to be a Draft, but I flubbed on clicking. Again

manic glacierBOT
blissful pollen
fossil gorge
#

Given the the changes, in theory, it tested itself, no? Looking at the build action outputs, the previous commit still had the GH action, and it failed with the known/expected error. However, removing that call from the GH action, it works.

#

I just want to make doubly sure it's really calling pylint on the files correctly

#

And maybe one day, I can learn to type "pylint" on the first try, instead of "pylin_g_"

blissful pollen
#

Oh yeah, forgot it would be self-testing as such. Yeah I see the pylint run and the lack of pylint in the main test lists

blissful pollen
gloomy shuttle
manic glacierBOT
blissful pollen
#

ugh somehow I managed to push commits I didn't want to again

fossil gorge
#

Thanks @gloomy shuttle. Appreciate the double-check

ornate breach
#

I mostly just amend my initial commit anymore to avoid pushing new commits

idle owl
#

@fossil gorge That's amazing! Don't commit it to the DisplayIO_Layout library. Or rather, don't PR it to that. Let's get it into cookiecutter first. I'll have Dylan run a patch against all the libraries with the update.

#

Also, we can apparently remove bad-whitespace because Pylint finally handed that over to other formatters.

#

I need to make sure we don't need to remove it to avoid it saying "invalid argument" or some such.

#

Wait, how does that work using a local thing remotely?

#

As in, will it still run when someone PRs to the lib?

#

I'm asking in the PR. ๐Ÿ˜„

fossil gorge
#

Replied in the PR

#

Since I figured it'd be nice to have it documented

mental nexus
#

I'm looking for guidance on the variations of function definitions MP_DEFINE_CONST_FUN_OBJ_KW options along with using MP_ARG_REQUIRED in the argument parser. It seems like the n_args_min value specified is the minimum number of positional arguments required? I'm confused how to use this.

My goal: I'm trying to enforce that two inputs are required, but I don't want to require them to be positional. Can anyone give hints how to use this?

I've tried different permutations, but keep getting "function missing 1 required positional argument".

fossil gorge
#

I'll make the changes to cookiecutter, which should hopefully be straightforward since the changes should be in files that are static and don't change during the execution of cookiecutter.

idle owl
fossil gorge
#

You're welcome. Have a good night, and you'll have a PR that looks forward to meeting you in the morning! ๐ŸŒ™

blissful pollen
mental nexus
#

Let me go look.

#

Hmm.. so the positional argument is the buffer and the other two (start, end) are the optional keyword arguments. Then why do you specify 2 for the n_args_min?

blissful pollen
#

is "self" from like the python class maybe the other one?

#

I mean I may have done it cause it worked and that's what I saw

mental nexus
#

Ok, maybe that's my problem. I'm pulling a function out of the bitmap class and trying to put it in standalone module. I used to call my_bitmap.rotozoom(....) and now it's going to be rotozoom(my_bitmap, ...). Now it isn't a method of "bitmap". Maybe that's my issue...

idle wharf
#

@fossil gorge feel free to ping me if you need someone to test cookiecutter tonight ... I'll be around

fossil gorge
#

That's awesome of you, thanks @idle wharf

blissful pollen
mental nexus
#

Oops. also I probably made an error in the mp_arg_parse_all arguments.....

#

I didn't change that when I pulled it out into a separate module.

#

Thanks @blissful pollen for the example, that helped a lot. There are a lot of ways to make it wrong, but only one set of proper incantations. Thanks for the pointers!

blissful pollen
#

no problem and I totally get what you mean

fossil gorge
idle wharf
#

@fossil gorge without asking you to re-explain can you send me a link that summarizes the issue we're fixing (I've not kept up with the chat today, sorry).

#

I know I changed this to run on all .py files so because we can't specify any inout options from the cookiecutter to the .yml