IRremote
IRremote.h
Go to the documentation of this file.
1 
7 #ifndef IRremote_h
8 #define IRremote_h
9 
10 #include "IRremote.hpp"
11 
12 #warning Thank you for using the IRremote library!
13 #warning It seems, that you are using a old version 2.0 code / example.
14 #warning This version is no longer supported!
15 #warning Please use one of the new code examples from the library available at "File > Examples > Examples from Custom Libraries / IRremote".
16 #warning Or downgrade your library to version 2.6.0.
17 #warning Start with the SimpleReceiver or SimpleSender example.
18 #warning The examples are documented here: https://github.com/Arduino-IRremote/Arduino-IRremote#examples-for-this-library
19 #warning A guide how to convert your 2.0 program is here: https://github.com/Arduino-IRremote/Arduino-IRremote#converting-your-2x-program-to-the-4x-version
20 
21 /**********************************************************************************************************************
22  * The OLD and DEPRECATED decode function with parameter aResults, kept for backward compatibility to old 2.0 tutorials
23  * This function calls the old MSB first decoders and fills only the 3 variables:
24  * aResults->value
25  * aResults->bits
26  * aResults->decode_type
27  * It prints a message on the first call.
28  **********************************************************************************************************************/
29 bool IRrecv::decode(decode_results *aResults) {
30  static bool sMessageWasSent = false;
31  if (!sMessageWasSent) {
32  Serial.println(F("**************************************************************************************************"));
33  Serial.println(F("Thank you for using the IRremote library!"));
34  Serial.println(F("It seems, that you are using a old version 2.0 code / example."));
35  Serial.println(F("This version is no longer supported!"));
36  Serial.println(F("Please use one of the new code examples from the library,"));
37  Serial.println(F(" available at \"File > Examples > Examples from Custom Libraries / IRremote\"."));
38  Serial.println(F("Or downgrade your library to version 2.6.0."));
39  Serial.println();
40  Serial.println(F("Start with the SimpleReceiver or SimpleSender example."));
41  Serial.println();
42  Serial.println(F("The examples are documented here:"));
43  Serial.println(F(" https://github.com/Arduino-IRremote/Arduino-IRremote#examples-for-this-library"));
44  Serial.println(F("A guide how to convert your 2.0 program is here:"));
45  Serial.println(F(" https://github.com/Arduino-IRremote/Arduino-IRremote#converting-your-2x-program-to-the-4x-version"));
46  Serial.println();
47  Serial.println(F("Thanks"));
48  Serial.println(F("**************************************************************************************************"));
49  Serial.println();
50  Serial.println();
51  sMessageWasSent = true;
52  }
53  return decode_old(aResults);
54 }
55 
56 #endif // IRremote_h
57 #pragma once
58 
decode_results
Results returned from old decoders !!!deprecated!!!
Definition: IRremoteInt.h:159
IRremote.hpp
Public API to the library.
IRrecv::decode
bool decode()
The main decode function, attempts to decode the recently receive IR signal.
Definition: IRReceive.hpp:525
IRrecv::decode_old
bool decode_old(decode_results *aResults)
Definition: IRReceive.hpp:1713