Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an overview/intro for the Library API #1198

Merged
merged 3 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PROJECT_NAME = "IRremoteESP8266"
OUTPUT_DIRECTORY = docs/doxygen
INPUT = src
INPUT += docs/doxygen_index.md
RECURSIVE = YES
EXCLUDE = examples
MULTILINE_CPP_IS_BRIEF = YES
Expand Down
60 changes: 60 additions & 0 deletions docs/doxygen_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# IRremoteESP8266 Library API Documentation {#mainpage}

## Getting Started

### The basics
For sending messages, look at the IRsend class.

For receiving messages, look at the IRrecv & decode_results classes.

### Air Conditioners
For _generic_ Air Conditioner control, look at the IRac class & the
stdAc::state_t structure.

For _detailed_ Air Conditioner control, you need to determine what protocol the
library detects your remote/Air Conditioner to be, look into the appropriate
`src/ir_Protocol.[h|cpp]` files and use the appropriate class object.
e.g. if `IRrecvDumpV2` (or better) detects the protocol as `KELVINATOR`,
open the `src/ir_Kelvinator.*` files, and examine the IRKelvinatorAC class the
methods available to create/decode/send `KELVINATOR` messages with all the
abilities the library offers. You can also select it from the
[Classes](annotated.html) menu above.

Various native constants & options for a given Protocol's class object can be
found in the associated header file for that protocol.

## Examples
Most of the common uses of this library's APIs have demonstration code
available under the [examples](https://github.com/crankyoldgit/IRremoteESP8266/tree/master/examples)
directory. It ranges from trivial examples to complex real-world project code.

## Tuning
The most commonly used & needed knobs for controlling aspects of this library
are available via run-time class methods or at class-object instantiation.
Again, you are referred to the IRsend & IRrecv classes.

### Advanced
Certain addition constants and options are available as compile-time tweaks.
You should inspect [IRremoteESP8266.h](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/IRremoteESP8266.h),
[IRsend.h](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/IRsend.h),
& [IRrecv.h](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/IRrecv.h)
for General, Sending, & Receiving tweaks respectively.

#### Protocol timings
Generally you should never need to adjust the timing parameters for a given
protocol or device. However, occasionally some individual devices just want to
be special.
If you are having problems decoding/receiving a message, look into the
`tolerance`, `kTolerance`, or IRrecv::setTolerance constants/methods etc first.
However, if your problems is sending, or adjusting the tolerance doesn't work
you may need to tweak time per-protocol timing values. These are stored as
constants in the `ir_ProtocolName.cpp` file for the given protocol. This is
typically a path/action of last resort.

#### Reducing flash & code usage.
You can disable most protocols by either modifying the appropriate `#define`s
in [IRremoteESP8266.h](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/IRremoteESP8266.h)
or passing the appropriate compile-time flags, as documented in the same file.

Avoid using the A/C classes, especially the IRac class as they will force the
compiler to include large amounts of code you may not need.