luni64 / TeensyTimerTool

Generic Interface to Teensy Timers
MIT License
82 stars 18 forks source link

Destructor on TCK timer #15

Closed carlkesselman closed 2 years ago

carlkesselman commented 3 years ago

I'm using a one shot TCK64 timer on Teensy 4.1. I am creating and deleting timers. However, deleting timers doesn't seem to work in that timers don't get released.

It looks like the destructor for TCK timers is defined, but has an empty body. I have also seen that there is a function called removeTImer, but this is never used. Is there any reason why the removeTImer function could not be used in the destructor so that timer slots could be reused.

Thanks,

Carl

luni64 commented 3 years ago

I never bothered to do proper destructors since Arduino folks mostly create such things globally and objects usually live forever... Anyway, that certainly needs to be fixed and I'll take care of it asap.

luni64 commented 3 years ago

Can you give the code in the development branch a try?

carlkesselman commented 3 years ago

Nice. That seems to work.

Carl


Dr. Carl Kesselman William H. Keck Professor of Engineering Professor, Epstein Department of Industrial and Systems Engineering Professor, Ostrow School of Dentistry Professor, Preventive Medicine Keck School of Medicine Fellow, Information Sciences Institute Viterbi School of Engineering

University of Southern California 4676 Admiralty Way, Suite 1001, Marina del Rey, CA 90292-6695 Phone: +1 (310) 448-9338 Email: @. Web: http://www.isi.edu/~carl On Sep 10, 2021, 6:48 AM -0700, luni64 @.>, wrote:

Can you give the code in the development branch a try?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/luni64/TeensyTimerTool/issues/15#issuecomment-916918221, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA3OGXSY5AQACFQPU3HVLZDUBIECJANCNFSM5DYTBH2Q.

luni64 commented 3 years ago

Good, I'll add the missing ones (PIT, FTM), do some tests and make a new release the next days

luni64 commented 2 years ago

Done in v0.4.1