├── .travis.yml ├── DCF77.cpp ├── DCF77.h ├── LICENSE.md ├── README.md ├── examples ├── DCFBinaryStream │ ├── DCFBinaryStream.ino │ └── output.png ├── DCFPulseLength │ ├── DCFPulseLength.ino │ ├── screenshot 1.png │ └── screenshot 2 - misfire.png ├── DCFSignal │ ├── DCFSignal.ino │ ├── screenshot 1.png │ └── screenshot 2.png ├── InternalClockSync │ ├── InternalClockSync.ino │ └── output.png ├── SyncProvider │ └── SyncProvider.ino └── TimeZones │ └── TimeZones.ino ├── extras ├── Connected DCF receiver_bb.png ├── Connected DCF receiver_schem.png ├── DCF77 641138.fzpz └── documentation │ ├── Documentation.html │ └── html │ ├── _d_c_f77_8h_source.html │ ├── annotated.html │ ├── bc_s.png │ ├── class_d_c_f77-members.html │ ├── class_d_c_f77.html │ ├── classes.html │ ├── closed.png │ ├── doxygen.css │ ├── doxygen.png │ ├── files.html │ ├── functions.html │ ├── functions_func.html │ ├── index.html │ ├── jquery.js │ ├── nav_f.png │ ├── nav_h.png │ ├── open.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css ├── keywords.txt ├── library.json ├── library.properties └── utility ├── Utils.cpp └── Utils.h /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | before_install: 3 | - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16" 4 | - sleep 3 5 | - export DISPLAY=:1.0 6 | - wget http://downloads.arduino.cc/arduino-1.8.1-linux64.tar.xz 7 | - tar xf arduino-1.8.1-linux64.tar.xz 8 | - sudo mv arduino-1.8.1 /usr/local/share/arduino 9 | - sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino 10 | install: 11 | - ln -s $PWD /usr/local/share/arduino/libraries/DCF77 12 | - arduino --install-library "Time" 13 | script: 14 | - arduino --verify --board arduino:avr:uno $PWD/examples/DCFBinaryStream/DCFBinaryStream.ino 15 | - arduino --verify --board arduino:avr:uno $PWD/examples/DCFPulseLength/DCFPulseLength.ino 16 | - arduino --verify --board arduino:avr:uno $PWD/examples/DCFSignal/DCFSignal.ino 17 | - arduino --verify --board arduino:avr:uno $PWD/examples/InternalClockSync/InternalClockSync.ino 18 | - arduino --verify --board arduino:avr:uno $PWD/examples/SyncProvider/SyncProvider.ino 19 | notifications: 20 | email: 21 | on_success: change 22 | on_failure: change 23 | -------------------------------------------------------------------------------- /DCF77.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | DCF77.c - DCF77 library 3 | Copyright (c) Thijs Elenbaas 2012 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | 11 Apr 2012 - initial release 20 | 23 Apr 2012 - added UTC support 21 | 2 Jul 2012 - minor bugfix and additional noise rejection 22 | */ 23 | 24 | #include //https://github.com/thijse/Arduino-Libraries/downloads 25 | #include //http://playground.arduino.cc/code/time 26 | #include 27 | 28 | #define _DCF77_VERSION 1_0_0 // software version of this library 29 | 30 | using namespace Utils; 31 | 32 | /** 33 | * Constructor 34 | */ 35 | DCF77::DCF77(int DCF77Pin, int DCFinterrupt, bool OnRisingFlank) 36 | { 37 | dCF77Pin = DCF77Pin; 38 | dCFinterrupt = DCFinterrupt; 39 | pulseStart = OnRisingFlank ? HIGH : LOW; 40 | 41 | if (!initialized) { 42 | pinMode(dCF77Pin, INPUT); 43 | initialize(); 44 | } 45 | initialized = true; 46 | } 47 | 48 | /** 49 | * Initialize parameters 50 | */ 51 | void DCF77::initialize(void) 52 | { 53 | leadingEdge = 0; 54 | trailingEdge = 0; 55 | PreviousLeadingEdge = 0; 56 | Up = false; 57 | runningBuffer = 0; 58 | FilledBufferAvailable = false; 59 | bufferPosition = 0; 60 | flags.parityDate = 0; 61 | flags.parityFlag = 0; 62 | flags.parityHour = 0; 63 | flags.parityMin = 0; 64 | CEST = 0; 65 | } 66 | 67 | /** 68 | * Start receiving DCF77 information 69 | */ 70 | void DCF77::Start(void) 71 | { 72 | attachInterrupt(dCFinterrupt, int0handler, CHANGE); 73 | } 74 | 75 | /** 76 | * Stop receiving DCF77 information 77 | */ 78 | void DCF77::Stop(void) 79 | { 80 | detachInterrupt(dCFinterrupt); 81 | } 82 | 83 | /** 84 | * Initialize buffer for next time update 85 | */ 86 | inline void DCF77::bufferinit(void) 87 | { 88 | runningBuffer = 0; 89 | bufferPosition = 0; 90 | } 91 | 92 | /** 93 | * Interrupt handler that processes up-down flanks into pulses and stores these in the buffer 94 | */ 95 | void DCF77::int0handler() { 96 | int flankTime = millis(); 97 | byte sensorValue = digitalRead(dCF77Pin); 98 | 99 | // If flank is detected quickly after previous flank up 100 | // this will be an incorrect pulse that we shall reject 101 | if ((flankTime-PreviousLeadingEdge) DCFSyncTime) { 126 | finalizeBuffer(); 127 | } 128 | PreviousLeadingEdge = leadingEdge; 129 | // Distinguish between long and short pulses 130 | if (difference < DCFSplitTime) { appendSignal(0); } else { appendSignal(1); } 131 | Up = false; 132 | } 133 | } 134 | } 135 | 136 | /** 137 | * Add new bit to buffer 138 | */ 139 | inline void DCF77::appendSignal(unsigned char signal) { 140 | Log(signal, DEC); 141 | runningBuffer = runningBuffer | ((unsigned long long) signal << bufferPosition); 142 | bufferPosition++; 143 | if (bufferPosition > 59) { 144 | // Buffer is full before at end of time-sequence 145 | // this may be due to noise giving additional peaks 146 | LogLn("EoB"); 147 | finalizeBuffer(); 148 | } 149 | } 150 | 151 | /** 152 | * Finalize filled buffer 153 | */ 154 | inline void DCF77::finalizeBuffer(void) { 155 | if (bufferPosition == 59) { 156 | // Buffer is full 157 | LogLn("BF"); 158 | // Prepare filled buffer and time stamp for main loop 159 | filledBuffer = runningBuffer; 160 | filledTimestamp = now(); 161 | // Reset running buffer 162 | bufferinit(); 163 | FilledBufferAvailable = true; 164 | } else { 165 | // Buffer is not yet full at end of time-sequence 166 | LogLn("EoM"); 167 | // Reset running buffer 168 | bufferinit(); 169 | } 170 | } 171 | 172 | /** 173 | * Returns whether there is a new time update available 174 | * This functions should be called prior to getTime() function. 175 | */ 176 | bool DCF77::receivedTimeUpdate(void) { 177 | // If buffer is not filled, there is no new time 178 | if(!FilledBufferAvailable) { 179 | return false; 180 | } 181 | // if buffer is filled, we will process it and see if this results in valid parity 182 | if (!processBuffer()) { 183 | LogLn("Invalid parity"); 184 | return false; 185 | } 186 | 187 | // Since the received signal is error-prone, and the parity check is not very strong, 188 | // we will do some sanity checks on the time 189 | time_t processedTime = latestupdatedTime + (now() - processingTimestamp); 190 | if (processedTimeMAX_TIME) { 191 | LogLn("Time outside of bounds"); 192 | return false; 193 | } 194 | 195 | // If received time is close to internal clock (2 min) we are satisfied 196 | time_t difference = abs(processedTime - now()); 197 | if(difference < 2*SECS_PER_MIN) { 198 | LogLn("close to internal clock"); 199 | storePreviousTime(); 200 | return true; 201 | } 202 | 203 | // Time can be further from internal clock for several reasons 204 | // We will check if lag from internal clock is consistent 205 | time_t shiftPrevious = (previousUpdatedTime - previousProcessingTimestamp); 206 | time_t shiftCurrent = (latestupdatedTime - processingTimestamp); 207 | time_t shiftDifference = abs(shiftCurrent-shiftPrevious); 208 | storePreviousTime(); 209 | if(shiftDifference < 2*SECS_PER_MIN) { 210 | LogLn("time lag consistent"); 211 | return true; 212 | } else { 213 | LogLn("time lag inconsistent"); 214 | } 215 | 216 | // If lag is inconsistent, this may be because of no previous stored date 217 | // This would be resolved in a second run. 218 | return false; 219 | } 220 | 221 | /** 222 | * Store previous time. Needed for consistency 223 | */ 224 | void DCF77::storePreviousTime(void) { 225 | previousUpdatedTime = latestupdatedTime; 226 | previousProcessingTimestamp = processingTimestamp; 227 | } 228 | 229 | /** 230 | * Calculate the parity of the time and date. 231 | */ 232 | void DCF77::calculateBufferParities(void) { 233 | // Calculate Parity 234 | flags.parityFlag = 0; 235 | for(int pos=0;pos<59;pos++) { 236 | bool s = (processingBuffer >> pos) & 1; 237 | 238 | // Update the parity bits. First: Reset when minute, hour or date starts. 239 | if (pos == 21 || pos == 29 || pos == 36) { 240 | flags.parityFlag = 0; 241 | } 242 | // save the parity when the corresponding segment ends 243 | if (pos == 28) {flags.parityMin = flags.parityFlag;}; 244 | if (pos == 35) {flags.parityHour = flags.parityFlag;}; 245 | if (pos == 58) {flags.parityDate = flags.parityFlag;}; 246 | // When we received a 1, toggle the parity flag 247 | if (s == 1) { 248 | flags.parityFlag = flags.parityFlag ^ 1; 249 | } 250 | } 251 | } 252 | 253 | /** 254 | * Evaluates the information stored in the buffer. This is where the DCF77 255 | * signal is decoded 256 | */ 257 | bool DCF77::processBuffer(void) { 258 | 259 | ///// Start interaction with interrupt driven loop ///// 260 | 261 | // Copy filled buffer and timestamp from interrupt driven loop 262 | processingBuffer = filledBuffer; 263 | processingTimestamp = filledTimestamp; 264 | // Indicate that there is no filled, unprocessed buffer anymore 265 | FilledBufferAvailable = false; 266 | 267 | 268 | ///// End interaction with interrupt driven loop ///// 269 | 270 | // Calculate parities for checking buffer 271 | calculateBufferParities(); 272 | tmElements_t time; 273 | bool proccessedSucces; 274 | 275 | struct DCF77Buffer *rx_buffer; 276 | rx_buffer = (struct DCF77Buffer *)(unsigned long long)&processingBuffer; 277 | 278 | 279 | // Check parities 280 | if (flags.parityMin == rx_buffer->P1 && 281 | flags.parityHour == rx_buffer->P2 && 282 | flags.parityDate == rx_buffer->P3 && 283 | rx_buffer->CEST != rx_buffer->CET) 284 | { 285 | //convert the received buffer into time 286 | time.Second = 0; 287 | time.Minute = rx_buffer->Min-((rx_buffer->Min/16)*6); 288 | time.Hour = rx_buffer->Hour-((rx_buffer->Hour/16)*6); 289 | time.Day = rx_buffer->Day-((rx_buffer->Day/16)*6); 290 | time.Month = rx_buffer->Month-((rx_buffer->Month/16)*6); 291 | time.Year = 2000 + rx_buffer->Year-((rx_buffer->Year/16)*6) -1970; 292 | latestupdatedTime = makeTime(time); 293 | CEST = rx_buffer->CEST; 294 | //Parity correct 295 | return true; 296 | } else { 297 | //Parity incorrect 298 | return false; 299 | } 300 | } 301 | 302 | /** 303 | * Get most recently received time 304 | * Note, this only returns an time once, until the next update 305 | */ 306 | time_t DCF77::getTime(void) 307 | { 308 | if (!receivedTimeUpdate()) { 309 | return(0); 310 | } else { 311 | // Send out time, taking into account the difference between when the DCF time was received and the current time 312 | time_t currentTime =latestupdatedTime + (now() - processingTimestamp); 313 | return(currentTime); 314 | } 315 | } 316 | 317 | /** 318 | * Get most recently received time in UTC 319 | * Note, this only returns an time once, until the next update 320 | */ 321 | time_t DCF77::getUTCTime(void) 322 | { 323 | if (!receivedTimeUpdate()) { 324 | return(0); 325 | } else { 326 | // Send out time UTC time 327 | int UTCTimeDifference = (CEST ? 2 : 1)*SECS_PER_HOUR; 328 | time_t currentTime =latestupdatedTime - UTCTimeDifference + (now() - processingTimestamp); 329 | return(currentTime); 330 | } 331 | } 332 | 333 | int DCF77::getSummerTime(void) 334 | { 335 | return (CEST)?1:0; 336 | } 337 | 338 | /** 339 | * Initialize parameters 340 | */ 341 | int DCF77::dCF77Pin=0; 342 | int DCF77::dCFinterrupt=0; 343 | byte DCF77::pulseStart=HIGH; 344 | 345 | // Parameters shared between interupt loop and main loop 346 | 347 | volatile unsigned long long DCF77::filledBuffer = 0; 348 | volatile bool DCF77::FilledBufferAvailable= false; 349 | volatile time_t DCF77::filledTimestamp= 0; 350 | 351 | // DCF Buffers and indicators 352 | int DCF77::bufferPosition = 0; 353 | unsigned long long DCF77::runningBuffer = 0; 354 | unsigned long long DCF77::processingBuffer = 0; 355 | 356 | // Pulse flanks 357 | int DCF77::leadingEdge=0; 358 | int DCF77::trailingEdge=0; 359 | int DCF77::PreviousLeadingEdge=0; 360 | bool DCF77::Up= false; 361 | 362 | // DCF77 and internal timestamps 363 | time_t DCF77::latestupdatedTime= 0; 364 | time_t DCF77::previousUpdatedTime= 0; 365 | time_t DCF77::processingTimestamp= 0; 366 | time_t DCF77::previousProcessingTimestamp=0; 367 | unsigned char DCF77::CEST=0; 368 | DCF77::ParityFlags DCF77::flags = {0,0,0,0}; 369 | 370 | 371 | -------------------------------------------------------------------------------- /DCF77.h: -------------------------------------------------------------------------------- 1 | #ifndef DCF77_h 2 | #define DCF77_h 3 | 4 | #if ARDUINO >= 100 5 | #include 6 | #else 7 | #include 8 | #endif 9 | #include 10 | 11 | #define MIN_TIME 1334102400 // Date: 11-4-2012 12 | #define MAX_TIME 4102444800 // Date: 1-1-2100 13 | 14 | #define DCFRejectionTime 700 // Pulse-to-Pulse rejection time. 15 | #define DCFRejectPulseWidth 50 // Minimal pulse width 16 | #define DCFSplitTime 180 // Specifications distinguishes pulse width 100 ms and 200 ms. In practice we see 130 ms and 230 17 | #define DCFSyncTime 1500 // Specifications defines 2000 ms pulse for end of sequence 18 | 19 | class DCF77 { 20 | private: 21 | 22 | //Private variables 23 | bool initialized; 24 | static int dCF77Pin; 25 | static int dCFinterrupt; 26 | static byte pulseStart; 27 | 28 | // DCF77 and internal timestamps 29 | static time_t previousUpdatedTime; 30 | static time_t latestupdatedTime; 31 | static time_t processingTimestamp; 32 | static time_t previousProcessingTimestamp; 33 | static unsigned char CEST; 34 | // DCF time format structure 35 | struct DCF77Buffer { 36 | //unsigned long long prefix :21; 37 | unsigned long long prefix :17; 38 | unsigned long long CEST :1; // CEST 39 | unsigned long long CET :1; // CET 40 | unsigned long long unused :2; // unused bits 41 | unsigned long long Min :7; // minutes 42 | unsigned long long P1 :1; // parity minutes 43 | unsigned long long Hour :6; // hours 44 | unsigned long long P2 :1; // parity hours 45 | unsigned long long Day :6; // day 46 | unsigned long long Weekday :3; // day of week 47 | unsigned long long Month :5; // month 48 | unsigned long long Year :8; // year (5 -> 2005) 49 | unsigned long long P3 :1; // parity 50 | }; 51 | 52 | 53 | // DCF Parity format structure 54 | struct ParityFlags{ 55 | unsigned char parityFlag :1; 56 | unsigned char parityMin :1; 57 | unsigned char parityHour :1; 58 | unsigned char parityDate :1; 59 | } static flags; 60 | 61 | // Parameters shared between interupt loop and main loop 62 | static volatile bool FilledBufferAvailable; 63 | static volatile unsigned long long filledBuffer; 64 | static volatile time_t filledTimestamp; 65 | 66 | // DCF Buffers and indicators 67 | static int bufferPosition; 68 | static unsigned long long runningBuffer; 69 | static unsigned long long processingBuffer; 70 | 71 | // Pulse flanks 72 | static int leadingEdge; 73 | static int trailingEdge; 74 | static int PreviousLeadingEdge; 75 | static bool Up; 76 | 77 | //Private functions 78 | void static initialize(void); 79 | void static bufferinit(void); 80 | void static finalizeBuffer(void); 81 | static bool receivedTimeUpdate(void); 82 | void static storePreviousTime(void); 83 | void static calculateBufferParities(void); 84 | bool static processBuffer(void); 85 | void static appendSignal(unsigned char signal); 86 | 87 | public: 88 | // Public Functions 89 | DCF77(int DCF77Pin, int DCFinterrupt, bool OnRisingFlank=true); 90 | 91 | static time_t getTime(void); 92 | static time_t getUTCTime(void); 93 | static void Start(void); 94 | static void Stop(void); 95 | static void int0handler(); 96 | static int getSummerTime(); 97 | }; 98 | 99 | #endif 100 | 101 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | (This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.) 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | {description} 474 | Copyright (C) {year} {fullname} 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 489 | USA 490 | 491 | Also add information on how to contact you by electronic and paper mail. 492 | 493 | You should also get your employer (if you work as a programmer) or your 494 | school, if any, to sign a "copyright disclaimer" for the library, if 495 | necessary. Here is a sample; alter the names: 496 | 497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 498 | library `Frob' (a library for tweaking knobs) written by James Random 499 | Hacker. 500 | 501 | {signature of Ty Coon}, 1 April 1990 502 | Ty Coon, President of Vice 503 | 504 | That's all there is to it! 505 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arduino DCF77 library 2 | [![Build Status](https://travis-ci.org/thijse/Arduino-DCF77.svg?branch=master)](https://travis-ci.org/thijse/Arduino-DCF77) 3 | [![License: LGPL v21](https://img.shields.io/badge/License-LGPL%20v2.1-blue.svg)](https://img.shields.io/badge/License-LGPL%20v2.1-blue.svg) 4 | 5 | The DCF77 library adds the ability to read and decode the atomic time broadcasted by the 6 | DCF77 radiostation. It has been designed to work in conjunction with the Arduino Time 7 | library and allows a sketch to get the precise CET time and date as a standard C time_t. 8 | The DCF77 Library download. Example sketches have been added to 9 | 10 | 1. illustrate and debug the incoming signal 11 | 2. use the library, using the setSyncProvider callback and converting to different 12 | time zones. In order to exploit all features in the library, Both the Time and 13 | TimeZone library are included. 14 | 15 | Additional documentation and full explanations of the samples can be found in these blog 16 | posts on DCF Hardware, DCF Signal can be found here: 17 | [http://thijs.elenbaas.net/2012/04/arduino-dcf77-radio-clock-receiver-library/](http://thijs.elenbaas.net/2012/04/arduino-dcf77-radio-clock-receiver-library/) 18 | 19 | 20 | ## Downloading 21 | 22 | This package can be downloaded in different manners 23 | 24 | 25 | - The Arduino Library Manager: [see here how to use it](http://www.arduino.cc/en/guide/libraries#toc3). 26 | - The PlatformIO Library Manager: [see here how to use it](http://docs.platformio.org/en/latest/ide/arduino.html). 27 | - By directly loading fetching the Archive from GitHub: 28 | 1. Go to [https://github.com/thijse/Arduino-DCF77](https://github.com/thijse/Arduino-DCF77) 29 | 2. Click the DOWNLOAD ZIP button in the panel on the 30 | 3. Rename the uncompressed folder **Arduino-DCF77-master** to **DCF77**. 31 | 4. You may need to create the libraries subfolder if its your first library. 32 | 5. Place the **DCF77** library folder in your **arduinosketchfolder/libraries/** folder. 33 | 5. Restart the IDE. 34 | 6. For more information, [read this extended manual](http://thijs.elenbaas.net/2012/07/installing-an-arduino-library/) 35 | - If you want to have a package that includes all referenced libraries, use the pre-packaged library 36 | 1. Download the package as a zipfile [here](https://github.com/thijse/Zipballs/blob/master/DCF77/DCF77.zip?raw=true) or as a tarball [here ](https://github.com/thijse/Zipballs/blob/master/DCF77/DCF77.tar.gz?raw=true). 37 | 2. Copy the folders inside the **libraries** folder to you your **arduinosketchfolder/libraries/** folder. 38 | 3. Restart the IDE. 39 | 3. For more information, [read this extended manual](http://thijs.elenbaas.net/2012/07/installing-an-arduino-library/) 40 | 41 | ##Samples 42 | 43 | The DCF77 directory contains some examples: 44 | 45 | ### DCFSignal.pde 46 | 47 | This is the most basic example: it shows the raw signal coming from the 48 | DCF decoder. It will show Pulse-to-Pulse times of approximately 1000 ms and 49 | pulse widths of approx 100ms and 200ms. 50 | 51 | ### DCFPulseLength 52 | 53 | This example illustrates the pulse-to-pulse time and pulse lengths 54 | coming from the DCF decoder. While the DCF specification says that pulses 55 | should be either 100 or 200 ms, you will probably see longer pulse lengths. 56 | For optimal distinction between long and short pulses use the output of this 57 | sketch to set the parameter #define DCFSplitTime in DCF77.h to (Tshort+Tlong)/2. 58 | 59 | ### DCFBinaryStream 60 | 61 | This example shows the binary stream generated by the pulse train coming 62 | from the DCF decoder and the resulting CET time. 63 | 64 | ### InternalClockSync 65 | 66 | This is the probably the most important example: It shows how to fetch a 67 | DCF77 time and synchronize the internal Arduino clock. 68 | 69 | ### SyncProvider 70 | 71 | This sketch shows how to fetch a DCF77 time and synchronize the internal clock 72 | using the setSyncProvider function. Note that the loop code does not require any 73 | logic to maintain time sync. The Time library will monitor DC77 and sync the 74 | time as necessary. 75 | 76 | ### TimeZones 77 | 78 | This example shows how to convert the DCF77 time to a different timezone. It uses 79 | the UTC time to ensure that no ambiguities can exist. For timezone conversion it 80 | employs the TimeZone library. 81 | 82 | 83 | *** Using the Library *** 84 | 85 | To use the library, first download the DCF77 library here: 86 | https://github.com/thijse/Arduino-Libraries/downloads 87 | and install it in the Arduino Library folder. 88 | For a tutorial on how to install new libraries for use with the Arduino development 89 | environment please refer to http://www.arduino.cc/en/Reference/Libraries 90 | or follow this step-by-step how-to article on installing Arduino libraries: 91 | http://thijs.elenbaas.net/2012/07/installing-an-arduino-library 92 | 93 | If the library is installed at the correct location, you can find the examples discussed 94 | in this and the previous post under Examples > DCF77. I also added the time library to 95 | the archive for convenience. 96 | 97 | The DCFF77 directory contains the DCFF77 library and some example sketches 98 | 99 | - DCFSignal.pde 100 | 101 | This is the most basic example: it shows the raw signal coming from the 102 | DCF decoder. It will show Pulse-to-Pulse times of approximately 1000 ms and 103 | pulse widths of approx 100ms and 200ms. 104 | 105 | - DCFPulseLength.pde 106 | 107 | This example illustrates the pulse-to-pulse time and pulse lengths 108 | coming from the DCF decoder. While the DCF specification says that pulses 109 | should be either 100 or 200 ms, you will probably see longer pulse lengths. 110 | For optimal distinction between long and short pulses use the output of this 111 | sketch to set the parameter #define DCFSplitTime in DCF77.h to (Tshort+Tlong)/2. 112 | 113 | - DCFBinaryStream.pde 114 | 115 | This example shows the binary stream generated by the pulse train coming 116 | from the DCF decoder and the resulting CET time. 117 | 118 | - InternalClockSync.pde 119 | 120 | This is the probably the most important example: It shows how to fetch a 121 | DCF77 time and synchronize the internal Arduino clock. 122 | 123 | - SyncProvider.pde 124 | 125 | This sketch shows how to fetch a DCF77 time and synchronize the internal clock 126 | using the setSyncProvider function. Note that the loop code does not require any 127 | logic to maintain time sync. The Time library will monitor DC77 and sync the 128 | time as necessary. 129 | 130 | - TimeZones.pde 131 | 132 | This example shows how to convert the DCF77 time to a different timezone. It uses 133 | the UTC time to ensure that no ambiguities can exist. For timezone conversion it 134 | employs the TimeZone library. 135 | 136 | ### Example sketch 137 | The sketch below implements the most DCF77 basic functionality. It reads the signal from 138 | pin 2, and 2-3 minutes it will update the internal clock. More information on this example 139 | can be found here: 140 | 141 | [http://thijs.elenbaas.net/2012/04/arduino-dcf77-radio-clock-receiver-library/ 142 | ](http://thijs.elenbaas.net/2012/04/arduino-dcf77-radio-clock-receiver-library/) 143 | 144 | #include "DCF77.h" 145 | #include "TimeLib.h" 146 | 147 | #define DCF_PIN 2// Connection pin to DCF 77 device 148 | #define DCF_INTERRUPT 0 // Interrupt number associated with pin 149 | 150 | time_t time; 151 | DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT); 152 | 153 | void setup() { 154 | Serial.begin(9600); 155 | DCF.Start(); 156 | Serial.println("Waiting for DCF77 time ... "); 157 | Serial.println("It will take at least 2 minutes before a first time update."); 158 | } 159 | 160 | void loop() { 161 | delay(1000); 162 | time_t DCFtime = DCF.getTime(); // Check if new DCF77 time is available 163 | if (DCFtime!=0) 164 | { 165 | Serial.println("Time is updated"); 166 | setTime(DCFtime); 167 | } 168 | digitalClockDisplay(); 169 | } 170 | 171 | void digitalClockDisplay(){ 172 | // digital clock display of the time 173 | Serial.print(hour()); 174 | printDigits(minute()); 175 | printDigits(second()); 176 | Serial.print(" "); 177 | Serial.print(day()); 178 | Serial.print(" "); 179 | Serial.print(month()); 180 | Serial.print(" "); 181 | Serial.print(year()); 182 | Serial.println(); 183 | } 184 | 185 | void printDigits(int digits){ 186 | // utility function for digital clock display: prints preceding colon and leading 0 187 | Serial.print(":"); 188 | if(digits < 10) 189 | Serial.print('0'); 190 | Serial.print(digits); 191 | } 192 | 193 | ## On using and modifying libraries 194 | 195 | - [http://www.arduino.cc/en/Main/Libraries](http://www.arduino.cc/en/Main/Libraries) 196 | - [http://www.arduino.cc/en/Reference/Libraries](http://www.arduino.cc/en/Reference/Libraries) 197 | 198 | ## Copyright 199 | 200 | DCF77 is provided Copyright © 2013-2017 under LGPL License. 201 | 202 | -------------------------------------------------------------------------------- /examples/DCFBinaryStream/DCFBinaryStream.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * DCFBinaryStream.ino 3 | * example code illustrating time synced from a DCF77 receiver 4 | * Thijs Elenbaas, 2012-2017 5 | * This example code is in the public domain. 6 | 7 | This example shows the binary stream generated by the 8 | pulse train coming from the DCF decoder and the resulting 9 | time 10 | In order for this example to give output from the DCF library, 11 | make sure that logging is turned on in the DCF library. You can 12 | do this by adding the #define VERBOSE_DEBUG 1 in Utils.cpp. 13 | 14 | NOTE: If you used a package manager to download the DCF77 library, 15 | make sure have also fetched these libraries: 16 | 17 | * Time 18 | 19 | */ 20 | 21 | 22 | #include //https://github.com/thijse/Arduino-Libraries/downloads 23 | #include //http://www.arduino.cc/playground/Code/Time 24 | 25 | #define DCF_PIN 2 // Connection pin to DCF 77 device 26 | #define DCF_INTERRUPT 0 // Interrupt number associated with pin 27 | 28 | time_t time; 29 | DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT); 30 | 31 | void setup() { 32 | Serial.begin(9600); 33 | Serial.println("1 - binary 1 corresponding to long pulse"); 34 | Serial.println("0 - binary 0 corresponding to short pulse"); 35 | Serial.println("BF - Buffer is full at end of time-sequence. This is good"); 36 | Serial.println("EoB - Buffer is full before at end of time-sequence"); 37 | Serial.println("EoM - Buffer is not yet full at end of time-sequence"); 38 | DCF.Start(); 39 | } 40 | 41 | void loop() { 42 | delay(1000); 43 | time_t DCFtime = DCF.getTime(); 44 | if (DCFtime!=0) { 45 | digitalClockDisplay(DCFtime); 46 | } 47 | } 48 | 49 | void digitalClockDisplay(time_t _time){ 50 | tmElements_t tm; 51 | breakTime(_time, tm); 52 | 53 | Serial.println(""); 54 | Serial.print("Time: "); 55 | Serial.print(tm.Hour); 56 | Serial.print(":"); 57 | printDigits(tm.Minute); 58 | Serial.print(":"); 59 | printDigits(tm.Second); 60 | Serial.print(" Date: "); 61 | Serial.print(tm.Day); 62 | Serial.print("."); 63 | Serial.print(tm.Month); 64 | Serial.print("."); 65 | Serial.println(tm.Year+1970); 66 | } 67 | 68 | void printDigits(int digits){ 69 | // utility function for digital clock display: prints preceding colon and leading 0 70 | Serial.print(":"); 71 | if(digits < 10) 72 | Serial.print('0'); 73 | Serial.print(digits); 74 | } -------------------------------------------------------------------------------- /examples/DCFBinaryStream/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/examples/DCFBinaryStream/output.png -------------------------------------------------------------------------------- /examples/DCFPulseLength/DCFPulseLength.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * DCFPulseLength.ino - DCF77 debug Example 3 | * Thijs Elenbaas, 2012-2017 4 | * This example code is in the public domain. 5 | 6 | This simple example shows the pulse-to-pulse time and pulse lengths 7 | coming from the DCF decoder. 8 | 9 | Notice that will the DCF specification says that pulses should be either 10 | 100 or 200 ms, we notice longer pulse lengths. This is likely due to to 11 | the hardware of the decoder. For optimal distinction between long and 12 | short pulses in the DCF library, set the parameter 13 | #define DCFSplitTime in DCF77.h to (Tlongpulse+Tlongpulse)/2 14 | 15 | */ 16 | 17 | #define BLINKPIN 13 18 | #define DCF77PIN 2 19 | 20 | int flankUp = 0; 21 | int flankDown = 0; 22 | int PreviousflankUp; 23 | bool Up = false; 24 | 25 | void setup() { 26 | Serial.begin(9600); 27 | pinMode(DCF77PIN, INPUT); 28 | pinMode(BLINKPIN, OUTPUT); 29 | } 30 | 31 | void loop() { 32 | int sensorValue = digitalRead(DCF77PIN); 33 | if (sensorValue) { 34 | if (!Up) { 35 | flankUp=millis(); 36 | Up = true; 37 | digitalWrite(BLINKPIN, HIGH); 38 | } 39 | } else { 40 | if (Up) { 41 | flankDown=millis(); 42 | Serial.print("Cycle: "); 43 | Serial.print(flankUp-PreviousflankUp); 44 | Serial.print(" Pulse :"); 45 | Serial.println(flankDown - flankUp); 46 | PreviousflankUp = flankUp; 47 | Up = false; 48 | digitalWrite(BLINKPIN, LOW); 49 | } 50 | } 51 | 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /examples/DCFPulseLength/screenshot 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/examples/DCFPulseLength/screenshot 1.png -------------------------------------------------------------------------------- /examples/DCFPulseLength/screenshot 2 - misfire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/examples/DCFPulseLength/screenshot 2 - misfire.png -------------------------------------------------------------------------------- /examples/DCFSignal/DCFSignal.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * DCFSignal.ino - DCF77 debug Example 3 | * Thijs Elenbaas, 2012-2017 4 | * This example code is in the public domain. 5 | 6 | This simple example shows the raw signal coming from the DCF decoder. 7 | 8 | Pulse-to-Pulse is approximately 1000 ms and pulse with is approx 100ms or 200ms 9 | The axis underestimates the elapsed time slightly, because a single loop takes a bit 10 | longer than 10ms. 11 | 12 | NOTE: If you used a package manager to download the DCF77 library, 13 | make sure have also fetched these libraries: 14 | 15 | * Time 16 | 17 | */ 18 | 19 | #define BLINKPIN 13 20 | #define DCF77PIN 2 21 | 22 | int prevSensorValue=0; 23 | 24 | void setup() { 25 | Serial.begin(9600); 26 | pinMode(DCF77PIN, INPUT); 27 | pinMode(13, OUTPUT); 28 | Serial.println("0ms 100ms 200ms 300ms 400ms 500ms 600ms 700ms 800ms 900ms 1000ms 1100ms 1200ms"); 29 | } 30 | 31 | void loop() { 32 | int sensorValue = digitalRead(DCF77PIN); 33 | if (sensorValue==1 && prevSensorValue==0) { Serial.println(""); } 34 | digitalWrite(BLINKPIN, sensorValue); 35 | Serial.print(sensorValue); 36 | prevSensorValue = sensorValue; 37 | delay(10); 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /examples/DCFSignal/screenshot 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/examples/DCFSignal/screenshot 1.png -------------------------------------------------------------------------------- /examples/DCFSignal/screenshot 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/examples/DCFSignal/screenshot 2.png -------------------------------------------------------------------------------- /examples/InternalClockSync/InternalClockSync.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * InternalClockSync.ino 3 | * example code illustrating time synced from a DCF77 receiver 4 | * Thijs Elenbaas, 2012-2017 5 | * This example code is in the public domain. 6 | 7 | This example shows how to fetch a DCF77 time and synchronize 8 | the internal clock. In order for this example to give clear output, 9 | make sure that you disable logging from the DCF library. You can 10 | do this by commenting out #define VERBOSE_DEBUG 1 in Utils.cpp. 11 | 12 | NOTE: If you used a package manager to download the DCF77 library, 13 | make sure have also fetched these libraries: 14 | 15 | * Time 16 | 17 | */ 18 | 19 | #include "DCF77.h" 20 | #include "TimeLib.h" 21 | 22 | #define DCF_PIN 2 // Connection pin to DCF 77 device 23 | #define DCF_INTERRUPT 0 // Interrupt number associated with pin 24 | 25 | time_t time; 26 | DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT); 27 | 28 | 29 | void setup() { 30 | Serial.begin(9600); 31 | DCF.Start(); 32 | Serial.println("Waiting for DCF77 time ... "); 33 | Serial.println("It will take at least 2 minutes until a first update can be processed."); 34 | } 35 | 36 | void loop() { 37 | delay(1000); 38 | time_t DCFtime = DCF.getTime(); // Check if new DCF77 time is available 39 | if (DCFtime!=0) 40 | { 41 | Serial.println("Time is updated"); 42 | setTime(DCFtime); 43 | } 44 | digitalClockDisplay(); 45 | } 46 | 47 | void digitalClockDisplay(){ 48 | // digital clock display of the time 49 | Serial.print(hour()); 50 | printDigits(minute()); 51 | printDigits(second()); 52 | Serial.print(" "); 53 | Serial.print(day()); 54 | Serial.print(" "); 55 | Serial.print(month()); 56 | Serial.print(" "); 57 | Serial.print(year()); 58 | Serial.println(); 59 | } 60 | 61 | void printDigits(int digits){ 62 | // utility function for digital clock display: prints preceding colon and leading 0 63 | Serial.print(":"); 64 | if(digits < 10) 65 | Serial.print('0'); 66 | Serial.print(digits); 67 | } -------------------------------------------------------------------------------- /examples/InternalClockSync/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/examples/InternalClockSync/output.png -------------------------------------------------------------------------------- /examples/SyncProvider/SyncProvider.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * SyncProvider.ino 3 | * example code illustrating time synced from a DCF77 receiver 4 | * Thijs Elenbaas, 2012-2017 5 | * This example code is in the public domain. 6 | 7 | This example shows how to fetch a DCF77 time and synchronize 8 | the internal clock. In order for this example to give clear output, 9 | make sure that you disable logging from the DCF library. You can 10 | do this by commenting out #define VERBOSE_DEBUG 1 in Utils.cpp. 11 | 12 | NOTE: If you used a package manager to download the DCF77 library, 13 | make sure have also fetched these libraries: 14 | 15 | * Time 16 | 17 | */ 18 | 19 | #include //https://github.com/thijse/Arduino-Libraries/downloads 20 | #include //http://www.arduino.cc/playground/Code/Time 21 | 22 | #define DCF_PIN 2 // Connection pin to DCF 77 device 23 | #define DCF_INTERRUPT 0 // Interrupt number associated with pin 24 | 25 | time_t prevDisplay = 0; // when the digital clock was displayed 26 | time_t time; 27 | DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT); 28 | 29 | 30 | void setup() { 31 | Serial.begin(9600); 32 | DCF.Start(); 33 | setSyncInterval(30); 34 | setSyncProvider(getDCFTime); 35 | // It is also possible to directly use DCF.getTime, but this function gives a bit of feedback 36 | //setSyncProvider(DCF.getTime); 37 | 38 | Serial.println("Waiting for DCF77 time ... "); 39 | Serial.println("It will take at least 2 minutes until a first update can be processed."); 40 | while(timeStatus()== timeNotSet) { 41 | // wait until the time is set by the sync provider 42 | Serial.print("."); 43 | delay(2000); 44 | } 45 | } 46 | 47 | 48 | void loop() 49 | { 50 | if( now() != prevDisplay) //update the display only if the time has changed 51 | { 52 | prevDisplay = now(); 53 | digitalClockDisplay(); 54 | } 55 | } 56 | 57 | void digitalClockDisplay(){ 58 | // digital clock display of the time 59 | Serial.println(""); 60 | Serial.print(hour()); 61 | printDigits(minute()); 62 | printDigits(second()); 63 | Serial.print(" "); 64 | Serial.print(day()); 65 | Serial.print(" "); 66 | Serial.print(month()); 67 | Serial.print(" "); 68 | Serial.print(year()); 69 | Serial.println(); 70 | } 71 | 72 | void printDigits(int digits){ 73 | // utility function for digital clock display: prints preceding colon and leading 0 74 | Serial.print(":"); 75 | if(digits < 10) 76 | Serial.print('0'); 77 | Serial.print(digits); 78 | } 79 | 80 | unsigned long getDCFTime() 81 | { 82 | time_t DCFtime = DCF.getTime(); 83 | // Indicator that a time check is done 84 | if (DCFtime!=0) { 85 | Serial.print("X"); 86 | } 87 | return DCFtime; 88 | } 89 | -------------------------------------------------------------------------------- /examples/TimeZones/TimeZones.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * TimeZones.ino 3 | * example code illustrating time synced from a DCF77 receiver 4 | * Thijs Elenbaas, 2012-2017 5 | * This example code is in the public domain. 6 | 7 | This example shows how to fetch a DCF77 time and synchronize 8 | the internal clock. In order for this example to give clear output, 9 | make sure that you disable logging from the DCF library. You can 10 | do this by commenting out #define VERBOSE_DEBUG 1 in Utils.cpp. 11 | 12 | NOTE: If you used a package manager to download the DCF77 library, 13 | make sure have also fetched these libraries: 14 | 15 | * Time 16 | * Timezone 17 | 18 | */ 19 | 20 | #include //https://github.com/thijse/Arduino-Libraries/downloads 21 | #include //http://www.arduino.cc/playground/Code/Time 22 | #include //https://github.com/JChristensen/Timezone 23 | 24 | #define DCF_PIN 2 // Connection pin to DCF 77 device 25 | #define DCF_INTERRUPT 0 // Interrupt number associated with pin 26 | 27 | // more time zones, see http://en.wikipedia.org/wiki/Time_zones_of_Europe 28 | //United Kingdom (London, Belfast) 29 | TimeChangeRule rBST = {"BST", Last, Sun, Mar, 1, 60}; //British Summer Time 30 | TimeChangeRule rGMT = {"GMT", Last, Sun, Oct, 2, 0}; //Standard Time 31 | Timezone UK(rBST, rGMT); 32 | 33 | //Eastern European Time (Finland, Greece, etc) 34 | TimeChangeRule rEST = {"EST", Last, Sun, Mar, 1, 180}; //Eastern European Time 35 | TimeChangeRule rEET = {"EET", Last, Sun, Oct, 1, 120}; //Eastern European Summer Time 36 | Timezone EET(rEST, rEET); 37 | 38 | 39 | time_t prevDisplay = 0; // when the digital clock was displayed 40 | time_t time; 41 | DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT); 42 | 43 | 44 | void setup() { 45 | Serial.begin(9600); 46 | DCF.Start(); 47 | setSyncInterval(30); 48 | setSyncProvider(getDCFTime); 49 | // It is also possible to directly use DCF.getTime, but this function gives a bit of feedback 50 | //setSyncProvider(DCF.getTime); 51 | 52 | Serial.println("Waiting for DCF77 UK local time ... "); 53 | Serial.println("It will take at least 2 minutes until a first update can be processed."); 54 | while(timeStatus()== timeNotSet) { 55 | // wait until the time is set by the sync provider 56 | Serial.print("."); 57 | delay(2000); 58 | } 59 | } 60 | 61 | 62 | void loop() 63 | { 64 | if( now() != prevDisplay) //update the display only if the time has changed 65 | { 66 | prevDisplay = now(); 67 | digitalClockDisplay(); 68 | } 69 | } 70 | 71 | void digitalClockDisplay(){ 72 | // digital clock display of the time 73 | Serial.println(""); 74 | Serial.print(hour()); 75 | printDigits(minute()); 76 | printDigits(second()); 77 | Serial.print(" "); 78 | Serial.print(day()); 79 | Serial.print(" "); 80 | Serial.print(month()); 81 | Serial.print(" "); 82 | Serial.print(year()); 83 | Serial.println(); 84 | } 85 | 86 | void printDigits(int digits){ 87 | // utility function for digital clock display: prints preceding colon and leading 0 88 | Serial.print(":"); 89 | if(digits < 10) 90 | Serial.print('0'); 91 | Serial.print(digits); 92 | } 93 | 94 | unsigned long getDCFTime() 95 | { 96 | time_t DCFtime = DCF.getUTCTime(); // Convert from UTC 97 | 98 | if (DCFtime!=0) { 99 | Serial.print("X"); // Indicator that a time check is done 100 | time_t LocalTime = UK.toLocal(DCFtime); 101 | return LocalTime; 102 | } 103 | return 0; 104 | } 105 | -------------------------------------------------------------------------------- /extras/Connected DCF receiver_bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/extras/Connected DCF receiver_bb.png -------------------------------------------------------------------------------- /extras/Connected DCF receiver_schem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/extras/Connected DCF receiver_schem.png -------------------------------------------------------------------------------- /extras/DCF77 641138.fzpz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/extras/DCF77 641138.fzpz -------------------------------------------------------------------------------- /extras/documentation/Documentation.html: -------------------------------------------------------------------------------- 1 |

DCF77 documentation

2 |

Browse the DCF77 documentation

3 | -------------------------------------------------------------------------------- /extras/documentation/html/_d_c_f77_8h_source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: D:/My Documents/Github/Arduino/Own Arduino libraries/DCF77/Arduino-DCF77/DCF77.h Source File 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 51 |
52 |
53 |
54 |
D:/My Documents/Github/Arduino/Own Arduino libraries/DCF77/Arduino-DCF77/DCF77.h
55 |
56 |
57 |
00001 #ifndef DCF77_h
 58 | 00002 #define DCF77_h
 59 | 00003 
 60 | 00004 #if ARDUINO >= 100
 61 | 00005 #include <Arduino.h> 
 62 | 00006 #else
 63 | 00007 #include <WProgram.h> 
 64 | 00008 #endif
 65 | 00009 #include <TimeLib.h>
 66 | 00010 
 67 | 00011 #define MIN_TIME 1334102400     // Date: 11-4-2012
 68 | 00012 #define MAX_TIME 4102444800     // Date:  1-1-2100
 69 | 00013 
 70 | 00014 #define DCFRejectionTime 700    // Pulse-to-Pulse rejection time. 
 71 | 00015 #define DCFRejectPulseWidth 50  // Minimal pulse width
 72 | 00016 #define DCFSplitTime 180        // Specifications distinguishes pulse width 100 ms and 200 ms. In practice we see 130 ms and 230
 73 | 00017 #define DCFSyncTime 1500        // Specifications defines 2000 ms pulse for end of sequence
 74 | 00018 
 75 | 00019 class DCF77 {
 76 | 00020 private:
 77 | 00021 
 78 | 00022     //Private variables
 79 | 00023     bool initialized;   
 80 | 00024     static int dCF77Pin;
 81 | 00025     static int dCFinterrupt;
 82 | 00026     static byte pulseStart;
 83 | 00027 
 84 | 00028     // DCF77 and internal timestamps
 85 | 00029     static time_t previousUpdatedTime;
 86 | 00030     static time_t latestupdatedTime;            
 87 | 00031     static  time_t processingTimestamp;
 88 | 00032     static  time_t previousProcessingTimestamp;     
 89 | 00033     static unsigned char CEST;
 90 | 00034     // DCF time format structure
 91 | 00035     struct DCF77Buffer {
 92 | 00036       //unsigned long long prefix       :21;
 93 | 00037       unsigned long long prefix     :17;
 94 | 00038       unsigned long long CEST       :1; // CEST 
 95 | 00039       unsigned long long CET        :1; // CET 
 96 | 00040       unsigned long long unused     :2; // unused bits
 97 | 00041       unsigned long long Min        :7; // minutes
 98 | 00042       unsigned long long P1         :1; // parity minutes
 99 | 00043       unsigned long long Hour       :6; // hours
100 | 00044       unsigned long long P2         :1; // parity hours
101 | 00045       unsigned long long Day        :6; // day
102 | 00046       unsigned long long Weekday    :3; // day of week
103 | 00047       unsigned long long Month      :5; // month
104 | 00048       unsigned long long Year       :8; // year (5 -> 2005)
105 | 00049       unsigned long long P3         :1; // parity
106 | 00050     };
107 | 00051     
108 | 00052     
109 | 00053     // DCF Parity format structure
110 | 00054     struct ParityFlags{
111 | 00055         unsigned char parityFlag    :1;
112 | 00056         unsigned char parityMin     :1;
113 | 00057         unsigned char parityHour    :1;
114 | 00058         unsigned char parityDate    :1;
115 | 00059     } static flags;
116 | 00060 
117 | 00061     // Parameters shared between interupt loop and main loop
118 | 00062     static volatile bool FilledBufferAvailable;
119 | 00063     static volatile unsigned long long filledBuffer;
120 | 00064     static volatile time_t filledTimestamp;
121 | 00065 
122 | 00066     // DCF Buffers and indicators
123 | 00067     static int  bufferPosition;
124 | 00068     static unsigned long long runningBuffer;
125 | 00069     static unsigned long long processingBuffer;
126 | 00070 
127 | 00071     // Pulse flanks
128 | 00072     static   int  leadingEdge;
129 | 00073     static   int  trailingEdge;
130 | 00074     static   int  PreviousLeadingEdge;
131 | 00075     static   bool Up;
132 | 00076     
133 | 00077     //Private functions
134 | 00078     void static initialize(void);
135 | 00079     void static bufferinit(void);
136 | 00080     void static finalizeBuffer(void);
137 | 00081     static bool receivedTimeUpdate(void);
138 | 00082     void static storePreviousTime(void);
139 | 00083     void static calculateBufferParities(void);
140 | 00084     bool static processBuffer(void);
141 | 00085     void static appendSignal(unsigned char signal);
142 | 00086 
143 | 00087 public: 
144 | 00088     // Public Functions
145 | 00089     DCF77(int DCF77Pin, int DCFinterrupt, bool OnRisingFlank=true); 
146 | 00090     
147 | 00091     static time_t getTime(void);
148 | 00092     static time_t getUTCTime(void);
149 | 00093     static void Start(void);
150 | 00094     static void Stop(void);
151 | 00095     static void int0handler();
152 | 00096  };
153 | 00097 
154 | 00098 #endif
155 | 00099 
156 | 
157 | 158 | 159 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /extras/documentation/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: Class List 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 53 |
54 |
55 |
56 |
Class List
57 |
58 |
59 |
Here are the classes, structs, unions and interfaces with brief descriptions:
60 | 61 |
DCF77
62 |
63 | 64 | 65 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /extras/documentation/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/extras/documentation/html/bc_s.png -------------------------------------------------------------------------------- /extras/documentation/html/class_d_c_f77-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: Member List 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 53 |
54 |
55 |
56 |
DCF77 Member List
57 |
58 |
59 | This is the complete list of members for DCF77, including all inherited members. 60 | 61 | 62 | 63 | 64 | 65 | 66 |
DCF77(int DCF77Pin, int DCFinterrupt, bool OnRisingFlank=true)DCF77
getTime(void)DCF77 [static]
getUTCTime(void)DCF77 [static]
int0handler()DCF77 [static]
Start(void)DCF77 [static]
Stop(void)DCF77 [static]
67 | 68 | 69 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /extras/documentation/html/class_d_c_f77.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: DCF77 Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 53 |
54 |
55 | 59 |
60 |
DCF77 Class Reference
61 |
62 |
63 | 64 |

List of all members.

65 | 66 | 68 | 69 | 70 | 72 | 73 | 75 | 76 | 77 | 78 | 79 | 80 |

67 | Classes

struct  DCF77Buffer
struct  ParityFlags

71 | Public Member Functions

 DCF77 (int DCF77Pin, int DCFinterrupt, bool OnRisingFlank=true)

74 | Static Public Member Functions

static time_t getTime (void)
static time_t getUTCTime (void)
static void Start (void)
static void Stop (void)
static void int0handler ()
81 |

Constructor & Destructor Documentation

82 | 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 |
DCF77::DCF77 (int DCF77Pin,
int DCFinterrupt,
bool OnRisingFlank = true 
)
110 |
111 |
112 |

Constructor

113 | 114 |
115 |
116 |

Member Function Documentation

117 | 118 |
119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 |
time_t DCF77::getTime (void ) [static]
129 |
130 |
131 |

Get most recently received time Note, this only returns an time once, until the next update

132 | 133 |
134 |
135 | 136 |
137 |
138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 |
time_t DCF77::getUTCTime (void ) [static]
147 |
148 |
149 |

Get most recently received time in UTC Note, this only returns an time once, until the next update

150 | 151 |
152 |
153 | 154 |
155 |
156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 |
void DCF77::int0handler () [static]
164 |
165 |
166 |

Interrupt handler that processes up-down flanks into pulses and stores these in the buffer

167 | 168 |
169 |
170 | 171 |
172 |
173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 |
void DCF77::Start (void ) [static]
182 |
183 |
184 |

Start receiving DCF77 information

185 | 186 |
187 |
188 | 189 |
190 |
191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 |
void DCF77::Stop (void ) [static]
200 |
201 |
202 |

Stop receiving DCF77 information

203 | 204 |
205 |
206 |
The documentation for this class was generated from the following files:
    207 |
  • D:/My Documents/Github/Arduino/Own Arduino libraries/DCF77/Arduino-DCF77/DCF77.h
  • 208 |
  • D:/My Documents/Github/Arduino/Own Arduino libraries/DCF77/Arduino-DCF77/DCF77.cpp
  • 209 |
210 |
211 | 212 | 213 | 218 | 219 | 220 | 221 | -------------------------------------------------------------------------------- /extras/documentation/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: Class Index 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 53 |
54 |
55 |
56 |
Class Index
57 |
58 |
59 | 60 | 61 | 63 | 64 | 65 | 66 |
  D  
62 |
DCF77   
67 | 68 |
69 | 70 | 71 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /extras/documentation/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/extras/documentation/html/closed.png -------------------------------------------------------------------------------- /extras/documentation/html/doxygen.css: -------------------------------------------------------------------------------- 1 | /* The standard CSS for doxygen */ 2 | 3 | body, table, div, p, dl { 4 | font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; 5 | font-size: 13px; 6 | line-height: 1.3; 7 | } 8 | 9 | /* @group Heading Levels */ 10 | 11 | h1 { 12 | font-size: 150%; 13 | } 14 | 15 | .title { 16 | font-size: 150%; 17 | font-weight: bold; 18 | margin: 10px 2px; 19 | } 20 | 21 | h2 { 22 | font-size: 120%; 23 | } 24 | 25 | h3 { 26 | font-size: 100%; 27 | } 28 | 29 | dt { 30 | font-weight: bold; 31 | } 32 | 33 | div.multicol { 34 | -moz-column-gap: 1em; 35 | -webkit-column-gap: 1em; 36 | -moz-column-count: 3; 37 | -webkit-column-count: 3; 38 | } 39 | 40 | p.startli, p.startdd, p.starttd { 41 | margin-top: 2px; 42 | } 43 | 44 | p.endli { 45 | margin-bottom: 0px; 46 | } 47 | 48 | p.enddd { 49 | margin-bottom: 4px; 50 | } 51 | 52 | p.endtd { 53 | margin-bottom: 2px; 54 | } 55 | 56 | /* @end */ 57 | 58 | caption { 59 | font-weight: bold; 60 | } 61 | 62 | span.legend { 63 | font-size: 70%; 64 | text-align: center; 65 | } 66 | 67 | h3.version { 68 | font-size: 90%; 69 | text-align: center; 70 | } 71 | 72 | div.qindex, div.navtab{ 73 | background-color: #EBEFF6; 74 | border: 1px solid #A3B4D7; 75 | text-align: center; 76 | } 77 | 78 | div.qindex, div.navpath { 79 | width: 100%; 80 | line-height: 140%; 81 | } 82 | 83 | div.navtab { 84 | margin-right: 15px; 85 | } 86 | 87 | /* @group Link Styling */ 88 | 89 | a { 90 | color: #3D578C; 91 | font-weight: normal; 92 | text-decoration: none; 93 | } 94 | 95 | .contents a:visited { 96 | color: #4665A2; 97 | } 98 | 99 | a:hover { 100 | text-decoration: underline; 101 | } 102 | 103 | a.qindex { 104 | font-weight: bold; 105 | } 106 | 107 | a.qindexHL { 108 | font-weight: bold; 109 | background-color: #9CAFD4; 110 | color: #ffffff; 111 | border: 1px double #869DCA; 112 | } 113 | 114 | .contents a.qindexHL:visited { 115 | color: #ffffff; 116 | } 117 | 118 | a.el { 119 | font-weight: bold; 120 | } 121 | 122 | a.elRef { 123 | } 124 | 125 | a.code, a.code:visited { 126 | color: #4665A2; 127 | } 128 | 129 | a.codeRef, a.codeRef:visited { 130 | color: #4665A2; 131 | } 132 | 133 | /* @end */ 134 | 135 | dl.el { 136 | margin-left: -1cm; 137 | } 138 | 139 | .fragment { 140 | font-family: monospace, fixed; 141 | font-size: 105%; 142 | } 143 | 144 | pre.fragment { 145 | border: 1px solid #C4CFE5; 146 | background-color: #FBFCFD; 147 | padding: 4px 6px; 148 | margin: 4px 8px 4px 2px; 149 | overflow: auto; 150 | word-wrap: break-word; 151 | font-size: 9pt; 152 | line-height: 125%; 153 | } 154 | 155 | div.ah { 156 | background-color: black; 157 | font-weight: bold; 158 | color: #ffffff; 159 | margin-bottom: 3px; 160 | margin-top: 3px; 161 | padding: 0.2em; 162 | border: solid thin #333; 163 | border-radius: 0.5em; 164 | -webkit-border-radius: .5em; 165 | -moz-border-radius: .5em; 166 | box-shadow: 2px 2px 3px #999; 167 | -webkit-box-shadow: 2px 2px 3px #999; 168 | -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; 169 | background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); 170 | background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); 171 | } 172 | 173 | div.groupHeader { 174 | margin-left: 16px; 175 | margin-top: 12px; 176 | font-weight: bold; 177 | } 178 | 179 | div.groupText { 180 | margin-left: 16px; 181 | font-style: italic; 182 | } 183 | 184 | body { 185 | background-color: white; 186 | color: black; 187 | margin: 0; 188 | } 189 | 190 | div.contents { 191 | margin-top: 10px; 192 | margin-left: 8px; 193 | margin-right: 8px; 194 | } 195 | 196 | td.indexkey { 197 | background-color: #EBEFF6; 198 | font-weight: bold; 199 | border: 1px solid #C4CFE5; 200 | margin: 2px 0px 2px 0; 201 | padding: 2px 10px; 202 | white-space: nowrap; 203 | vertical-align: top; 204 | } 205 | 206 | td.indexvalue { 207 | background-color: #EBEFF6; 208 | border: 1px solid #C4CFE5; 209 | padding: 2px 10px; 210 | margin: 2px 0px; 211 | } 212 | 213 | tr.memlist { 214 | background-color: #EEF1F7; 215 | } 216 | 217 | p.formulaDsp { 218 | text-align: center; 219 | } 220 | 221 | img.formulaDsp { 222 | 223 | } 224 | 225 | img.formulaInl { 226 | vertical-align: middle; 227 | } 228 | 229 | div.center { 230 | text-align: center; 231 | margin-top: 0px; 232 | margin-bottom: 0px; 233 | padding: 0px; 234 | } 235 | 236 | div.center img { 237 | border: 0px; 238 | } 239 | 240 | address.footer { 241 | text-align: right; 242 | padding-right: 12px; 243 | } 244 | 245 | img.footer { 246 | border: 0px; 247 | vertical-align: middle; 248 | } 249 | 250 | /* @group Code Colorization */ 251 | 252 | span.keyword { 253 | color: #008000 254 | } 255 | 256 | span.keywordtype { 257 | color: #604020 258 | } 259 | 260 | span.keywordflow { 261 | color: #e08000 262 | } 263 | 264 | span.comment { 265 | color: #800000 266 | } 267 | 268 | span.preprocessor { 269 | color: #806020 270 | } 271 | 272 | span.stringliteral { 273 | color: #002080 274 | } 275 | 276 | span.charliteral { 277 | color: #008080 278 | } 279 | 280 | span.vhdldigit { 281 | color: #ff00ff 282 | } 283 | 284 | span.vhdlchar { 285 | color: #000000 286 | } 287 | 288 | span.vhdlkeyword { 289 | color: #700070 290 | } 291 | 292 | span.vhdllogic { 293 | color: #ff0000 294 | } 295 | 296 | /* @end */ 297 | 298 | /* 299 | .search { 300 | color: #003399; 301 | font-weight: bold; 302 | } 303 | 304 | form.search { 305 | margin-bottom: 0px; 306 | margin-top: 0px; 307 | } 308 | 309 | input.search { 310 | font-size: 75%; 311 | color: #000080; 312 | font-weight: normal; 313 | background-color: #e8eef2; 314 | } 315 | */ 316 | 317 | td.tiny { 318 | font-size: 75%; 319 | } 320 | 321 | .dirtab { 322 | padding: 4px; 323 | border-collapse: collapse; 324 | border: 1px solid #A3B4D7; 325 | } 326 | 327 | th.dirtab { 328 | background: #EBEFF6; 329 | font-weight: bold; 330 | } 331 | 332 | hr { 333 | height: 0px; 334 | border: none; 335 | border-top: 1px solid #4A6AAA; 336 | } 337 | 338 | hr.footer { 339 | height: 1px; 340 | } 341 | 342 | /* @group Member Descriptions */ 343 | 344 | table.memberdecls { 345 | border-spacing: 0px; 346 | padding: 0px; 347 | } 348 | 349 | .mdescLeft, .mdescRight, 350 | .memItemLeft, .memItemRight, 351 | .memTemplItemLeft, .memTemplItemRight, .memTemplParams { 352 | background-color: #F9FAFC; 353 | border: none; 354 | margin: 4px; 355 | padding: 1px 0 0 8px; 356 | } 357 | 358 | .mdescLeft, .mdescRight { 359 | padding: 0px 8px 4px 8px; 360 | color: #555; 361 | } 362 | 363 | .memItemLeft, .memItemRight, .memTemplParams { 364 | border-top: 1px solid #C4CFE5; 365 | } 366 | 367 | .memItemLeft, .memTemplItemLeft { 368 | white-space: nowrap; 369 | } 370 | 371 | .memItemRight { 372 | width: 100%; 373 | } 374 | 375 | .memTemplParams { 376 | color: #4665A2; 377 | white-space: nowrap; 378 | } 379 | 380 | /* @end */ 381 | 382 | /* @group Member Details */ 383 | 384 | /* Styles for detailed member documentation */ 385 | 386 | .memtemplate { 387 | font-size: 80%; 388 | color: #4665A2; 389 | font-weight: normal; 390 | margin-left: 9px; 391 | } 392 | 393 | .memnav { 394 | background-color: #EBEFF6; 395 | border: 1px solid #A3B4D7; 396 | text-align: center; 397 | margin: 2px; 398 | margin-right: 15px; 399 | padding: 2px; 400 | } 401 | 402 | .mempage { 403 | width: 100%; 404 | } 405 | 406 | .memitem { 407 | padding: 0; 408 | margin-bottom: 10px; 409 | margin-right: 5px; 410 | } 411 | 412 | .memname { 413 | white-space: nowrap; 414 | font-weight: bold; 415 | margin-left: 6px; 416 | } 417 | 418 | .memproto, dl.reflist dt { 419 | border-top: 1px solid #A8B8D9; 420 | border-left: 1px solid #A8B8D9; 421 | border-right: 1px solid #A8B8D9; 422 | padding: 6px 0px 6px 0px; 423 | color: #253555; 424 | font-weight: bold; 425 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 426 | /* opera specific markup */ 427 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 428 | border-top-right-radius: 8px; 429 | border-top-left-radius: 8px; 430 | /* firefox specific markup */ 431 | -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; 432 | -moz-border-radius-topright: 8px; 433 | -moz-border-radius-topleft: 8px; 434 | /* webkit specific markup */ 435 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 436 | -webkit-border-top-right-radius: 8px; 437 | -webkit-border-top-left-radius: 8px; 438 | background-image:url('nav_f.png'); 439 | background-repeat:repeat-x; 440 | background-color: #E2E8F2; 441 | 442 | } 443 | 444 | .memdoc, dl.reflist dd { 445 | border-bottom: 1px solid #A8B8D9; 446 | border-left: 1px solid #A8B8D9; 447 | border-right: 1px solid #A8B8D9; 448 | padding: 2px 5px; 449 | background-color: #FBFCFD; 450 | border-top-width: 0; 451 | /* opera specific markup */ 452 | border-bottom-left-radius: 8px; 453 | border-bottom-right-radius: 8px; 454 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 455 | /* firefox specific markup */ 456 | -moz-border-radius-bottomleft: 8px; 457 | -moz-border-radius-bottomright: 8px; 458 | -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; 459 | background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); 460 | /* webkit specific markup */ 461 | -webkit-border-bottom-left-radius: 8px; 462 | -webkit-border-bottom-right-radius: 8px; 463 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 464 | background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); 465 | } 466 | 467 | dl.reflist dt { 468 | padding: 5px; 469 | } 470 | 471 | dl.reflist dd { 472 | margin: 0px 0px 10px 0px; 473 | padding: 5px; 474 | } 475 | 476 | .paramkey { 477 | text-align: right; 478 | } 479 | 480 | .paramtype { 481 | white-space: nowrap; 482 | } 483 | 484 | .paramname { 485 | color: #602020; 486 | white-space: nowrap; 487 | } 488 | .paramname em { 489 | font-style: normal; 490 | } 491 | 492 | .params, .retval, .exception, .tparams { 493 | border-spacing: 6px 2px; 494 | } 495 | 496 | .params .paramname, .retval .paramname { 497 | font-weight: bold; 498 | vertical-align: top; 499 | } 500 | 501 | .params .paramtype { 502 | font-style: italic; 503 | vertical-align: top; 504 | } 505 | 506 | .params .paramdir { 507 | font-family: "courier new",courier,monospace; 508 | vertical-align: top; 509 | } 510 | 511 | 512 | 513 | 514 | /* @end */ 515 | 516 | /* @group Directory (tree) */ 517 | 518 | /* for the tree view */ 519 | 520 | .ftvtree { 521 | font-family: sans-serif; 522 | margin: 0px; 523 | } 524 | 525 | /* these are for tree view when used as main index */ 526 | 527 | .directory { 528 | font-size: 9pt; 529 | font-weight: bold; 530 | margin: 5px; 531 | } 532 | 533 | .directory h3 { 534 | margin: 0px; 535 | margin-top: 1em; 536 | font-size: 11pt; 537 | } 538 | 539 | /* 540 | The following two styles can be used to replace the root node title 541 | with an image of your choice. Simply uncomment the next two styles, 542 | specify the name of your image and be sure to set 'height' to the 543 | proper pixel height of your image. 544 | */ 545 | 546 | /* 547 | .directory h3.swap { 548 | height: 61px; 549 | background-repeat: no-repeat; 550 | background-image: url("yourimage.gif"); 551 | } 552 | .directory h3.swap span { 553 | display: none; 554 | } 555 | */ 556 | 557 | .directory > h3 { 558 | margin-top: 0; 559 | } 560 | 561 | .directory p { 562 | margin: 0px; 563 | white-space: nowrap; 564 | } 565 | 566 | .directory div { 567 | display: none; 568 | margin: 0px; 569 | } 570 | 571 | .directory img { 572 | vertical-align: -30%; 573 | } 574 | 575 | /* these are for tree view when not used as main index */ 576 | 577 | .directory-alt { 578 | font-size: 100%; 579 | font-weight: bold; 580 | } 581 | 582 | .directory-alt h3 { 583 | margin: 0px; 584 | margin-top: 1em; 585 | font-size: 11pt; 586 | } 587 | 588 | .directory-alt > h3 { 589 | margin-top: 0; 590 | } 591 | 592 | .directory-alt p { 593 | margin: 0px; 594 | white-space: nowrap; 595 | } 596 | 597 | .directory-alt div { 598 | display: none; 599 | margin: 0px; 600 | } 601 | 602 | .directory-alt img { 603 | vertical-align: -30%; 604 | } 605 | 606 | /* @end */ 607 | 608 | div.dynheader { 609 | margin-top: 8px; 610 | } 611 | 612 | address { 613 | font-style: normal; 614 | color: #2A3D61; 615 | } 616 | 617 | table.doxtable { 618 | border-collapse:collapse; 619 | } 620 | 621 | table.doxtable td, table.doxtable th { 622 | border: 1px solid #2D4068; 623 | padding: 3px 7px 2px; 624 | } 625 | 626 | table.doxtable th { 627 | background-color: #374F7F; 628 | color: #FFFFFF; 629 | font-size: 110%; 630 | padding-bottom: 4px; 631 | padding-top: 5px; 632 | text-align:left; 633 | } 634 | 635 | table.fieldtable { 636 | width: 100%; 637 | margin-bottom: 10px; 638 | border: 1px solid #A8B8D9; 639 | border-spacing: 0px; 640 | -moz-border-radius: 4px; 641 | -webkit-border-radius: 4px; 642 | border-radius: 4px; 643 | -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; 644 | -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); 645 | box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); 646 | } 647 | 648 | .fieldtable td, .fieldtable th { 649 | padding: 3px 7px 2px; 650 | } 651 | 652 | .fieldtable td.fieldtype, .fieldtable td.fieldname { 653 | white-space: nowrap; 654 | border-right: 1px solid #A8B8D9; 655 | border-bottom: 1px solid #A8B8D9; 656 | vertical-align: top; 657 | } 658 | 659 | .fieldtable td.fielddoc { 660 | border-bottom: 1px solid #A8B8D9; 661 | width: 100%; 662 | } 663 | 664 | .fieldtable tr:last-child td { 665 | border-bottom: none; 666 | } 667 | 668 | .fieldtable th { 669 | background-image:url('nav_f.png'); 670 | background-repeat:repeat-x; 671 | background-color: #E2E8F2; 672 | font-size: 90%; 673 | color: #253555; 674 | padding-bottom: 4px; 675 | padding-top: 5px; 676 | text-align:left; 677 | -moz-border-radius-topleft: 4px; 678 | -moz-border-radius-topright: 4px; 679 | -webkit-border-top-left-radius: 4px; 680 | -webkit-border-top-right-radius: 4px; 681 | border-top-left-radius: 4px; 682 | border-top-right-radius: 4px; 683 | border-bottom: 1px solid #A8B8D9; 684 | } 685 | 686 | 687 | .tabsearch { 688 | top: 0px; 689 | left: 10px; 690 | height: 36px; 691 | background-image: url('tab_b.png'); 692 | z-index: 101; 693 | overflow: hidden; 694 | font-size: 13px; 695 | } 696 | 697 | .navpath ul 698 | { 699 | font-size: 11px; 700 | background-image:url('tab_b.png'); 701 | background-repeat:repeat-x; 702 | height:30px; 703 | line-height:30px; 704 | color:#8AA0CC; 705 | border:solid 1px #C2CDE4; 706 | overflow:hidden; 707 | margin:0px; 708 | padding:0px; 709 | } 710 | 711 | .navpath li 712 | { 713 | list-style-type:none; 714 | float:left; 715 | padding-left:10px; 716 | padding-right:15px; 717 | background-image:url('bc_s.png'); 718 | background-repeat:no-repeat; 719 | background-position:right; 720 | color:#364D7C; 721 | } 722 | 723 | .navpath li.navelem a 724 | { 725 | height:32px; 726 | display:block; 727 | text-decoration: none; 728 | outline: none; 729 | } 730 | 731 | .navpath li.navelem a:hover 732 | { 733 | color:#6884BD; 734 | } 735 | 736 | .navpath li.footer 737 | { 738 | list-style-type:none; 739 | float:right; 740 | padding-left:10px; 741 | padding-right:15px; 742 | background-image:none; 743 | background-repeat:no-repeat; 744 | background-position:right; 745 | color:#364D7C; 746 | font-size: 8pt; 747 | } 748 | 749 | 750 | div.summary 751 | { 752 | float: right; 753 | font-size: 8pt; 754 | padding-right: 5px; 755 | width: 50%; 756 | text-align: right; 757 | } 758 | 759 | div.summary a 760 | { 761 | white-space: nowrap; 762 | } 763 | 764 | div.ingroups 765 | { 766 | margin-left: 5px; 767 | font-size: 8pt; 768 | padding-left: 5px; 769 | width: 50%; 770 | text-align: left; 771 | } 772 | 773 | div.ingroups a 774 | { 775 | white-space: nowrap; 776 | } 777 | 778 | div.header 779 | { 780 | background-image:url('nav_h.png'); 781 | background-repeat:repeat-x; 782 | background-color: #F9FAFC; 783 | margin: 0px; 784 | border-bottom: 1px solid #C4CFE5; 785 | } 786 | 787 | div.headertitle 788 | { 789 | padding: 5px 5px 5px 7px; 790 | } 791 | 792 | dl 793 | { 794 | padding: 0 0 0 10px; 795 | } 796 | 797 | dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug 798 | { 799 | border-left:4px solid; 800 | padding: 0 0 0 6px; 801 | } 802 | 803 | dl.note 804 | { 805 | border-color: #D0C000; 806 | } 807 | 808 | dl.warning, dl.attention 809 | { 810 | border-color: #FF0000; 811 | } 812 | 813 | dl.pre, dl.post, dl.invariant 814 | { 815 | border-color: #00D000; 816 | } 817 | 818 | dl.deprecated 819 | { 820 | border-color: #505050; 821 | } 822 | 823 | dl.todo 824 | { 825 | border-color: #00C0E0; 826 | } 827 | 828 | dl.test 829 | { 830 | border-color: #3030E0; 831 | } 832 | 833 | dl.bug 834 | { 835 | border-color: #C08050; 836 | } 837 | 838 | #projectlogo 839 | { 840 | text-align: center; 841 | vertical-align: bottom; 842 | border-collapse: separate; 843 | } 844 | 845 | #projectlogo img 846 | { 847 | border: 0px none; 848 | } 849 | 850 | #projectname 851 | { 852 | font: 300% Tahoma, Arial,sans-serif; 853 | margin: 0px; 854 | padding: 2px 0px; 855 | } 856 | 857 | #projectbrief 858 | { 859 | font: 120% Tahoma, Arial,sans-serif; 860 | margin: 0px; 861 | padding: 0px; 862 | } 863 | 864 | #projectnumber 865 | { 866 | font: 50% Tahoma, Arial,sans-serif; 867 | margin: 0px; 868 | padding: 0px; 869 | } 870 | 871 | #titlearea 872 | { 873 | padding: 0px; 874 | margin: 0px; 875 | width: 100%; 876 | border-bottom: 1px solid #5373B4; 877 | } 878 | 879 | .image 880 | { 881 | text-align: center; 882 | } 883 | 884 | .dotgraph 885 | { 886 | text-align: center; 887 | } 888 | 889 | .mscgraph 890 | { 891 | text-align: center; 892 | } 893 | 894 | .caption 895 | { 896 | font-weight: bold; 897 | } 898 | 899 | div.zoom 900 | { 901 | border: 1px solid #90A5CE; 902 | } 903 | 904 | dl.citelist { 905 | margin-bottom:50px; 906 | } 907 | 908 | dl.citelist dt { 909 | color:#334975; 910 | float:left; 911 | font-weight:bold; 912 | margin-right:10px; 913 | padding:5px; 914 | } 915 | 916 | dl.citelist dd { 917 | margin:2px 0; 918 | padding:5px 0; 919 | } 920 | 921 | @media print 922 | { 923 | #top { display: none; } 924 | #side-nav { display: none; } 925 | #nav-path { display: none; } 926 | body { overflow:visible; } 927 | h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } 928 | .summary { display: none; } 929 | .memitem { page-break-inside: avoid; } 930 | #doc-content 931 | { 932 | margin-left:0 !important; 933 | height:auto !important; 934 | width:auto !important; 935 | overflow:inherit; 936 | display:inline; 937 | } 938 | pre.fragment 939 | { 940 | overflow: visible; 941 | text-wrap: unrestricted; 942 | white-space: -moz-pre-wrap; /* Moz */ 943 | white-space: -pre-wrap; /* Opera 4-6 */ 944 | white-space: -o-pre-wrap; /* Opera 7 */ 945 | white-space: pre-wrap; /* CSS3 */ 946 | word-wrap: break-word; /* IE 5.5+ */ 947 | } 948 | } 949 | 950 | -------------------------------------------------------------------------------- /extras/documentation/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thijse/Arduino-DCF77/de6ba17d61e8c99baf632aef345e8712d3d2d62e/extras/documentation/html/doxygen.png -------------------------------------------------------------------------------- /extras/documentation/html/files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: File List 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 51 |
52 |
53 |
54 |
File List
55 |
56 |
57 |
Here is a list of all documented files with brief descriptions:
58 | 59 |
D:/My Documents/Github/Arduino/Own Arduino libraries/DCF77/Arduino-DCF77/DCF77.h [code]
60 |
61 | 62 | 63 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /extras/documentation/html/functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: Class Members 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 53 | 59 |
60 |
61 |
Here is a list of all documented class members with links to the class documentation for each member:
    62 |
  • DCF77() 63 | : DCF77 64 |
  • 65 |
  • getTime() 66 | : DCF77 67 |
  • 68 |
  • getUTCTime() 69 | : DCF77 70 |
  • 71 |
  • int0handler() 72 | : DCF77 73 |
  • 74 |
  • Start() 75 | : DCF77 76 |
  • 77 |
  • Stop() 78 | : DCF77 79 |
  • 80 |
81 |
82 | 83 | 84 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /extras/documentation/html/functions_func.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: Class Members - Functions 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 | 53 | 59 |
60 |
61 |  
    62 |
  • DCF77() 63 | : DCF77 64 |
  • 65 |
  • getTime() 66 | : DCF77 67 |
  • 68 |
  • getUTCTime() 69 | : DCF77 70 |
  • 71 |
  • int0handler() 72 | : DCF77 73 |
  • 74 |
  • Start() 75 | : DCF77 76 |
  • 77 |
  • Stop() 78 | : DCF77 79 |
  • 80 |
81 |
82 | 83 | 84 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /extras/documentation/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DCF77: Main Page 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 |
25 |
DCF77 26 |  1.0.0 27 |
28 |
DCF77 is a library for the Arduino Platform to read and decode the atomic time broadcasted by the DCF77 radiostation.
29 |
36 |
37 | 38 | 39 | 46 |
47 |
48 |
49 |
DCF77 Documentation
50 |
51 |
52 |
53 | 54 | 55 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /extras/documentation/html/jquery.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery JavaScript Library v1.3.2 3 | * http://jquery.com/ 4 | * 5 | * Copyright (c) 2009 John Resig 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://docs.jquery.com/License 8 | * 9 | * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) 10 | * Revision: 6246 11 | */ 12 | (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); 14 | /* 15 | * Sizzle CSS Selector Engine - v0.9.3 16 | * Copyright 2009, The Dojo Foundation 17 | * Released under the MIT, BSD, and GPL Licenses. 18 | * More information: http://sizzlejs.com/ 19 | */ 20 | (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) 21 | {I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() 22 | {G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); 23 | 24 | /* 25 | * jQuery hashchange event - v1.3 - 7/21/2010 26 | * http://benalman.com/projects/jquery-hashchange-plugin/ 27 | * 28 | * Copyright (c) 2010 "Cowboy" Ben Alman 29 | * Dual licensed under the MIT and GPL licenses. 30 | * http://benalman.com/about/license/ 31 | */ 32 | (function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('