luni64 / TeensyTimerTool

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

Compile errors #28

Closed khorner116 closed 1 year ago

khorner116 commented 1 year ago

Just updated the library with your latest changes to RTC for non T4 boards. Now it is failing to compile at all. Using Ard 2.1 and TeensyDuino 1.58 .. i get this missing file error...

#include "TeensyTimerTool.h"
     using namespace TeensyTimerTool;
     PeriodicTimer t_1;
....
//+++++++++++++++++++Setup the main timer loop
   t_1.begin([] { t_1_Callback(); }, 50'000);  // Set timer to 50,000 microseconds (or 0.05sec)
                                                       //   This works out to 20 interrupts/sec
                                                       //   and gives us 20 "ticks" per sec.     

error produced is

c:\Users\mail\Documents\Arduino\libraries\TeensyTimerTool-master\src\config.cpp:12:10: fatal error: TimerModules/RTC/RTC.h: No such file or directory
   12 | #include "TimerModules/RTC/RTC.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~

I'm missing a file in the src folder. Ideas?

luni64 commented 1 year ago

To test this I installed the 2.1.1 IDE and TD 1.58. and TTT 1.4.1 The following sketch runs out of the box for a T4.1

#include "TeensyTimerTool.h"
using namespace TeensyTimerTool;
PeriodicTimer t1;

void setup() 
{
  pinMode(LED_BUILTIN, OUTPUT);
  t1.begin([] {digitalToggleFast(LED_BUILTIN);}, 150ms);
}
void loop() 
{
  // put your main code here, to run repeatedly:
}

Maybe something in your setup is messed up?

khorner116 commented 1 year ago

No, setup has been fine. Things were working great until I updated the libraries and had to correct a conflict between the Adafruit DS3231 real time clock library "RTC" and some names in yours. Have to keep good notes on those changes. Just downloaded the TT library again, and this time it complies fine. Extremely weird. But close this issue, all is well.

luni64 commented 1 year ago

Glad that it works now.
BTW: the TT symbols live in the TeensyTimerTool namespace. In case some names clash with other libraries you can simpliy remove the using namespace TeensyTimerTool and either fully qualify the names or import only the required names from the namespace. Let me know if you are interested in this and need help....

khorner116 commented 1 year ago

Thanks for the help. No, I understand the namespace issue. Handling it on my end was no real problem. Just had to get rid of some "name" references I used from the clock lib. like the I2C address name. Just substituted real values. I have 20 other systems to migrate to the 4.0 platform, so I will keep your get-out-of-jail-free card for a future, larger issue if one turns up. Best. Great work on the code by the way.

On Mon, Aug 14, 2023 at 11:31 AM luni64 @.***> wrote:

Glad that it works now. BTW: the TT symbols live in the TeensyTimerTool namespace. In case some names clashes with other libraries you can simpliy remove the using namespace TeensyTimerTool and either fully qualify the names or import only the required names from the namespace. Let me know if you are interested in this and need help....

— Reply to this email directly, view it on GitHub https://github.com/luni64/TeensyTimerTool/issues/28#issuecomment-1677561012, or unsubscribe https://github.com/notifications/unsubscribe-auth/AICQSLMU5JF6CZRA7W352DLXVJADRANCNFSM6AAAAAA3PCAPOM . You are receiving this because you authored the thread.Message ID: @.***>