Search found 4 matches

by nadrimajstor
Tue Feb 10, 2015 9:55 am
Forum: General Discussion and Questions
Topic: Bug in the pyb.Timer's callback or a user mistake
Replies: 6
Views: 2563

Re: Bug in the pyb.Timer's callback or a user mistake

The thing that bugs me is how do I repurpose the timer with the same id?
As soon as I add new callback the timer starts with old freq value i.e. I did call

Code: Select all

deinit()
so I expect him to be inactive until I call

Code: Select all

init()
with new arguments.
Or is it a best practice to just use another id?
by nadrimajstor
Mon Feb 09, 2015 7:58 pm
Forum: General Discussion and Questions
Topic: Bug in the pyb.Timer's callback or a user mistake
Replies: 6
Views: 2563

Re: Bug in the pyb.Timer's callback or a user mistake

Ahaaa... I had utterly wrong notion of all counters having the same fixed maximum value, ticking at some internal maximum frequency, and wrapping to zero when the max value is reached. :oops: I like this notion of having my own, per instance, counter's max value and wrapping to zero when triggered, ...
by nadrimajstor
Mon Feb 09, 2015 1:58 am
Forum: Announcements and News
Topic: UPDATED: New users post approval
Replies: 31
Views: 27899

Re: New users post approval

Will try my best not to sell any pills nor to provide Russian brides. ;)
by nadrimajstor
Sun Feb 08, 2015 6:55 pm
Forum: General Discussion and Questions
Topic: Bug in the pyb.Timer's callback or a user mistake
Replies: 6
Views: 2563

Bug in the pyb.Timer's callback or a user mistake

While trying to make a PR for addition of example "How to use named function for a pyb.Timer's callback" (i.e. make it obvious that named function will receive 1 argument - timer object) I came up with: def tick(timer): # we will receive the timer object when being called from the timer print(timer....