New River, Arizona
Offline
God Member
Karma: 15
Posts: 876
Arduino rocks
|
 |
« Reply #90 on: July 05, 2011, 04:54:31 pm » |
Uh, kinda make it hard to test TimeAlarmsTest.cpp: In function 'void onAlarm()': TimeAlarmsTest:37: error: 'class TimeAlarmsClass' has no member named 'getTriggeredAlarmId' TimeAlarmsTest:51: error: 'class TimeAlarmsClass' has no member named 'free' TimeAlarmsTest.cpp: In function 'void loop()': TimeAlarmsTest:137: error: 'class TimeAlarmsClass' has no member named 'getNextTrigger'
|
|
|
|
|
Logged
|
|
|
|
|
New River, Arizona
Offline
God Member
Karma: 15
Posts: 876
Arduino rocks
|
 |
« Reply #91 on: July 05, 2011, 04:59:07 pm » |
Oh, nevermind, found it.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 51
|
 |
« Reply #92 on: July 05, 2011, 06:25:30 pm » |
same issue, had to find the beta directory first :-)
missing void TimeAlarmsClass::write(AlarmID_t ID, time_t value,dtAlarmPeriod_t period) that I added immediatly,
The new isallocated function make code easier to read, but for the sake of my own knowledge, why a function instead of a macro ?
testing tonight and tommorow evening will send you result then.
regards
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 51
|
 |
« Reply #93 on: July 06, 2011, 12:50:32 am » |
It is leaking,
I have to see if it is your base code or my modification (new write function)
regards
------------------------------- Updated: the dtNBR_ALARMS was back to 6 (from the 8 I am currently using) and that triggered some memory leak, it was there with the previous version and I am not at all sure It come from your sketch, it is probably my code So no issue there, I restart my tests this morning without a memory leak.
|
|
|
|
« Last Edit: July 06, 2011, 01:09:23 am by viknet »
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 51
|
 |
« Reply #94 on: July 06, 2011, 04:23:48 pm » |
perfectly working on my side :-)
what about you ?
|
|
|
|
|
Logged
|
|
|
|
|
New River, Arizona
Offline
God Member
Karma: 15
Posts: 876
Arduino rocks
|
 |
« Reply #95 on: July 06, 2011, 07:06:29 pm » |
I've had it going in a random fashion from a couple of years back to 5 years forward, starting over when it goes past the upper. Both timers and alarms have been working fine. I also ran it once to failure in the future and no problem came up.
I suggest publishing it and let other folk play with it as much as they want to.
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #96 on: July 06, 2011, 08:35:02 pm » |
Thanks for the feedback.
I will create a new zip with the directories in the expected places so its less confusing to install and publish tomorrow for wider testing
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #97 on: July 07, 2011, 05:24:25 am » |
Here is a link to the beta Library that fixes the weekly alarm problem. The only change from the code I posted above is the directory structure now matches the old library so the contents can be directly copied into the libraries folder. I also added this text in a release note: Changes made July 5 2011:
This is a beta test version of the libraries that provides a fix for recurring weekly alarms.
TheTime library is unchanged except for fixes to a macro in Time.h that converts the number of days to elapsed seconds and the macros that are used to calculate weekly alarms.
The functionality of the TimeAlarms library has changed slightly in order to make the library easier to maintain and enhance.
In short, if your application used an Alarm method to create weekly alarms then you should change your sketch to use the methods that take the explicit DayOfWeek parameter. Only the Alarm methods are affected, Timer methods are as before.
Here are the details: The previous version could set weekly alarms by calling the AlarmOnce method with a value greater than one day to indicate the day and time of the weekly alarm. This has changed and explicit calls to set weekly alarms must be used when setting weekly alarms. If you were setting weekly alarms by calling either Alarm.alarmRepeat(weeklyValue, AlarmFunction); then you need to change this to: arm.alarmRepeat(DayOfWeek, Hour, Minute, Second, AlarmFunction); Also the clock must be set to a time on or after Jan1 1971 when using the Alarm methods. Timer methods are unchanged and will function even if the clock has not been set Lets see how this goes for a day or so and then I will circulate this more widely Michael p.s. viknet, note that I did not add in the enhanced write method. As explained in my earlier post, I think the library is better suited for its intended purpose without it so will need to add into your version.
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #98 on: July 09, 2011, 04:00:56 am » |
I posted info on the update in a new thread so people would not need to read through the seven pages of background to get to the information on the beta release. Michael
|
|
|
|
|
Logged
|
|
|
|
|
Indonesia
Offline
Newbie
Karma: 0
Posts: 34
ayooo,,,DAB!!!
|
 |
« Reply #99 on: July 09, 2011, 05:12:49 am » |
First, i am noob in arduino and just tinkering arduino. i make a clock using : 1. Arduino UNO 2. RTC DS1307 3. LCD 16*2 this is how it is work: ==> Visual Basic set RTC time ==> Visual Basic set the Alarm and Save to Arduino EEPROM and this is the problem that I got: I have an interval mode alarm, this mode have value to start the alarm, end the alarm, and interval value. when i compare RTC time and EEPROM value and start the alarm, alarm time is late. example: I set the alarm : - start time : 13.00 pm - end time : 14.00 pm - interval : 5 minute the alarm should 'sound' at 13.05.00 pm (HH.MM.SS), but i get the alarm sound at 13.05.30 and will continue till 14.05.30 pm. the code is below this post: sorry for my english
|
|
|
|
|
Logged
|
|
|
|
|
Indonesia
Offline
Newbie
Karma: 0
Posts: 34
ayooo,,,DAB!!!
|
 |
« Reply #100 on: July 09, 2011, 05:14:23 am » |
|
|
|
|
« Last Edit: July 11, 2011, 07:54:09 am by copet_pitik »
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #101 on: July 09, 2011, 05:37:24 am » |
copet_pitik, this thread was reporting a specific issue with the Library so this is not the best place for discussions on help using the library. I have created a thread for that purpose here and I suggest the we move this discussion there. Can you post a shorter version of your sketch that illustrates the problem so its easer to see if your problem is with Alarms or delays in your code to write to eeprom. It would be easier to help if you can translate comments into english so I can understand the purpose of each of you functions. A summary of the purpose of your sketch and overview of the logic you used to implement it would also help in understanding what your sketch is doing. Michael
|
|
|
|
« Last Edit: July 09, 2011, 05:45:54 am by mem »
|
Logged
|
|
|
|
|
Indonesia
Offline
Newbie
Karma: 0
Posts: 34
ayooo,,,DAB!!!
|
 |
« Reply #102 on: July 09, 2011, 08:18:04 am » |
copet_pitik, this thread was reporting a specific issue with the Library so this is not the best place for discussions on help using the library. I have created a thread for that purpose here and I suggest the we move this discussion there. Can you post a shorter version of your sketch that illustrates the problem so its easer to see if your problem is with Alarms or delays in your code to write to eeprom. Michael  wokey 
|
|
|
|
« Last Edit: July 09, 2011, 12:01:00 pm by copet_pitik »
|
Logged
|
|
|
|
|
|