I guess I'm confused weather your library should use a RTC, or should take user input. For example, what day of the week is today, or what day of the week is March 1st 2013?
Matt. On Apr 17, 5:04 pm, mattschinkel <[email protected]> wrote: > An RTC may have it's own seconds, hour, day, year etc, and may not use > yours. This may cause duplicate names. > > I think your library can use variables that have prefixes such as > time_ and date_, however it should not define them. The RTC lib should > not define them either. > > The sample should define them or alias the RTC's variables so they can > be used by the calendar. > > For your current sample, you can do: > > var byte time_second = 0 > var byte time_minute = 0 > var byte time_hour = 0 > var byte date_day = 31 > var byte date_month = 12 > var word date_year = 2009 > include big_calendar > > or if your using a RTC lib: > > alias time_second is rtcdevicename_second > alias time_minute is rtcdevicename_minute > alias time_hour is rtcdevicename_hour > alias date_day is rtcdevicename_day > alias date_month is rtcdevicename_month > alias date_year is rtcdevicename_year > include big_calendar > > This is also a great way to educate the user about the variables used. > They can then use the variables in their sample and know where it came > from. > print_word_dec(serial_hw_data, date_year) > > Is this ok? then you get to use the generic names as you prefer :) > > Matt. > > On Apr 17, 8:53 am, Oliver Seitz <[email protected]> wrote: > > > > > > > > > > A good standard prefix may be time_ > > > so you will have things like > > > time_second, time_hour, time_year etc. > > > Ok :-D > > > I felt this was a bit generic, for someone could want to use timespans and > > the like, so I called the records which hold the counting present time > > "current_date" and "current_time". Which was for you, Matt, too generic. > > Sorry ;-) > > > Shall I remove the prefixes again, then? > > > Greets, > > Kiste -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
