Search found 11 matches

by oclyke
Mon Mar 25, 2019 12:29 am
Forum: Development of MicroPython
Topic: Using Pointer to State in NLR Assembly
Replies: 9
Views: 724

Re: Using Pointer to State in NLR Assembly

@pfalcon thanks, the first couple of bullet points there actually helped clarify why the default implementation should remain untouched. Those are some pretty strict guidelines for what is noticeable -- but it figures that you've got to be selective when advancing such a popular project :D In the me...
by oclyke
Fri Mar 22, 2019 3:40 am
Forum: General Discussion and Questions
Topic: Is it possible to run micropython scripts loaded from hTTP?
Replies: 4
Views: 383

Re: Is it possible to run micropython scripts loaded from hTTP?

Hi andrews, This sort of thing is certainly possible - particularly if you already know how you will retrieve the file via HTTP. There is an example of how to embed MicroPython in a C project here: https://github.com/micropython/micropython/tree/master/examples/embedding In addition to the 'mp_lexer...
by oclyke
Wed Mar 20, 2019 7:00 pm
Forum: General Discussion and Questions
Topic: Developing PCB layout
Replies: 5
Views: 572

Re: Developing PCB layout

dhylands is right about the strategy for adapting existing designs - think about why the components exist in the schematic. In your example with the 200 ohm resistor you'd have to look at the context of its use and think about what would change with the different value. Therefore it would be good to...
by oclyke
Wed Mar 20, 2019 4:46 pm
Forum: Programs, Libraries and Tools
Topic: Fast RGB to HSV (And vice versa) calculations?
Replies: 18
Views: 1470

Re: Fast RGB to HSV (And vice versa) calculations?

When I see HSV->RGB I think of this great write-up and portable C library: http://www.vagrearg.org/content/hsvrgb Of course, not too helpful in the near-term but since mattyt is talking about a colorsys module it might be helpful. Speaking of which, I'd like to help out with something like that. Let...
by oclyke
Wed Mar 20, 2019 4:39 pm
Forum: General Discussion and Questions
Topic: How to get CPU load approximate value on Micropython ?
Replies: 3
Views: 402

Re: How to get CPU load approximate value on Micropython ?

ThomasChr and fstengel are correct in saying that on the vanilla microcontroller ports the load is 100% because MicroPython is always running something . For example it might be waiting for input at the REPL prompt or (after receiving input) taking the necessary steps to lex, compile, and then run t...
by oclyke
Wed Mar 20, 2019 4:21 pm
Forum: Development of MicroPython
Topic: Using Pointer to State in NLR Assembly
Replies: 9
Views: 724

Re: Using Pointer to State in NLR Assembly

dhylands , thanks for letting me know - learning something new all the time! Sorry, but there's no need for such a patch (on its own). Thanks - your parenthetical is pretty enticing. What else would you want to see along with such a patch? I'd still argue in favor of making this change and here's w...
by oclyke
Tue Mar 19, 2019 4:28 pm
Forum: Development of MicroPython
Topic: Using Pointer to State in NLR Assembly
Replies: 9
Views: 724

Re: Using Pointer to State in NLR Assembly

Oops, you got it - thanks for spotting that! Ahh what a relief. I was so blinded by worry that some recent changes to the ESP32 port had caused this that I must've just forgot to make that little change. What I'm taking away from this is that the link error was trickier to spot than usual, probably ...
by oclyke
Tue Mar 19, 2019 2:55 pm
Forum: Development of MicroPython
Topic: Using Pointer to State in NLR Assembly
Replies: 9
Views: 724

Re: Using Pointer to State in NLR Assembly

Sure, here is a link to my fork. For what its worth this is not specific to the ESP32 port - you should be able to see the error if you just try to build mpy-cross.
by oclyke
Tue Mar 19, 2019 7:44 am
Forum: Development of MicroPython
Topic: Using Pointer to State in NLR Assembly
Replies: 9
Views: 724

Using Pointer to State in NLR Assembly

Hi everyone. I'd like to submit a PR soon for changing the MP_STATE_XXX(x) macros so that they access the current state through a pointer. I was up-to-date with the repo at commit [41e7ad647] then I diverged and got demo code working on an ESP32. Now I'm making the effort to consolidate my changes i...
by oclyke
Tue Mar 19, 2019 7:16 am
Forum: Development of MicroPython
Topic: Understanding Inside of Micropython
Replies: 3
Views: 548

Re: Understanding Inside of Micropython

hadi, I would agree with jickster and pfalcon - the surefire way to learn about uPython is to read the code. I'll add that if you're like me and tend to get caught up in the details that it is important to take it in small chunks. For example when you're trying to understand the garbage collector do...