From 32c1c48b26621b290466b3a0a0d34846b921a557 Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Thu, 19 Jul 2018 08:38:38 -0400 Subject: [PATCH] Moved documentation and fixed version number --- Doxyfile | 2 +- docs/annotated_dup.js | 4 - docs/class_bounce.js | 22 - docs/deprecated.html | 81 --- docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js | 4 - docs/files.js | 4 - docs/{ => files}/_bounce2_8h_source.html | 0 docs/{ => files}/annotated.html | 0 docs/{ => files}/bc_s.png | Bin docs/{ => files}/bdwn.png | Bin .../bounce2buttons_8ino-example.html | 0 docs/{ => files}/bounce_8ino-example.html | 0 .../bounce_multiple_8ino-example.html | 0 docs/{ => files}/change_8ino-example.html | 0 docs/{ => files}/class_bounce-members.html | 0 docs/{ => files}/class_bounce.html | 0 docs/{ => files}/classes.html | 0 docs/{ => files}/closed.png | Bin .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 0 docs/{ => files}/doc.png | Bin docs/{ => files}/doxygen.css | 0 docs/{ => files}/doxygen.png | Bin docs/{ => files}/dynsections.js | 0 docs/{ => files}/examples.html | 0 docs/{ => files}/files.html | 0 docs/{ => files}/folderclosed.png | Bin docs/{ => files}/folderopen.png | Bin docs/{ => files}/functions.html | 0 docs/{ => files}/functions_func.html | 0 docs/files/index.html | 103 ++++ docs/{ => files}/jquery.js | 0 docs/{ => files}/menu.js | 0 docs/{ => files}/menudata.js | 0 docs/{ => files}/nav_f.png | Bin docs/{ => files}/nav_g.png | Bin docs/{ => files}/nav_h.png | Bin docs/{ => files}/open.png | Bin docs/{ => files}/search/all_0.html | 0 docs/{ => files}/search/all_0.js | 0 docs/{ => files}/search/all_1.html | 0 docs/{ => files}/search/all_1.js | 0 docs/{ => files}/search/all_2.html | 0 docs/{ => files}/search/all_2.js | 0 docs/{ => files}/search/all_3.html | 0 docs/{ => files}/search/all_3.js | 0 docs/{ => files}/search/all_4.html | 0 docs/{ => files}/search/all_4.js | 0 docs/{ => files}/search/all_5.html | 0 docs/{ => files}/search/all_5.js | 0 docs/{ => files}/search/all_6.html | 0 docs/{ => files}/search/all_6.js | 0 docs/{ => files}/search/classes_0.html | 0 docs/{ => files}/search/classes_0.js | 0 docs/{ => files}/search/close.png | Bin docs/{ => files}/search/functions_0.html | 0 docs/{ => files}/search/functions_0.js | 0 docs/{ => files}/search/functions_1.html | 0 docs/{ => files}/search/functions_1.js | 0 docs/{ => files}/search/functions_2.html | 0 docs/{ => files}/search/functions_2.js | 0 docs/{ => files}/search/functions_3.html | 0 docs/{ => files}/search/functions_3.js | 0 docs/{ => files}/search/functions_4.html | 0 docs/{ => files}/search/functions_4.js | 0 docs/{ => files}/search/functions_5.html | 0 docs/{ => files}/search/functions_5.js | 0 docs/{ => files}/search/functions_6.html | 0 docs/{ => files}/search/functions_6.js | 0 docs/{ => files}/search/mag_sel.png | Bin docs/{ => files}/search/nomatches.html | 0 docs/{ => files}/search/pages_0.html | 0 docs/{ => files}/search/pages_0.js | 0 docs/{ => files}/search/search.css | 0 docs/{ => files}/search/search.js | 0 docs/{ => files}/search/search_l.png | Bin docs/{ => files}/search/search_m.png | Bin docs/{ => files}/search/search_r.png | Bin docs/{ => files}/search/searchdata.js | 0 docs/{ => files}/splitbar.png | Bin docs/{ => files}/sync_off.png | Bin docs/{ => files}/sync_on.png | Bin docs/{ => files}/tab_a.png | Bin docs/{ => files}/tab_b.png | Bin docs/{ => files}/tab_h.png | Bin docs/{ => files}/tab_s.png | Bin docs/{ => files}/tabs.css | 0 docs/index.html | 104 +--- docs/navtree.css | 146 ----- docs/navtree.js | 517 ------------------ docs/navtreedata.js | 25 - docs/navtreeindex0.js | 33 -- docs/pages.html | 78 --- docs/resize.js | 114 ---- docs/search/all_7.html | 26 - docs/search/all_7.js | 4 - docs/search/functions_7.html | 26 - docs/search/functions_7.js | 4 - docs/search/pages_1.html | 26 - docs/search/pages_1.js | 4 - library.json | 2 +- library.properties | 2 +- 101 files changed, 107 insertions(+), 1224 deletions(-) delete mode 100644 docs/annotated_dup.js delete mode 100644 docs/class_bounce.js delete mode 100644 docs/deprecated.html delete mode 100644 docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js delete mode 100644 docs/files.js rename docs/{ => files}/_bounce2_8h_source.html (100%) rename docs/{ => files}/annotated.html (100%) rename docs/{ => files}/bc_s.png (100%) rename docs/{ => files}/bdwn.png (100%) rename docs/{ => files}/bounce2buttons_8ino-example.html (100%) rename docs/{ => files}/bounce_8ino-example.html (100%) rename docs/{ => files}/bounce_multiple_8ino-example.html (100%) rename docs/{ => files}/change_8ino-example.html (100%) rename docs/{ => files}/class_bounce-members.html (100%) rename docs/{ => files}/class_bounce.html (100%) rename docs/{ => files}/classes.html (100%) rename docs/{ => files}/closed.png (100%) rename docs/{ => files}/dir_68267d1309a1af8e8297ef4c3efbcdba.html (100%) rename docs/{ => files}/doc.png (100%) rename docs/{ => files}/doxygen.css (100%) rename docs/{ => files}/doxygen.png (100%) rename docs/{ => files}/dynsections.js (100%) rename docs/{ => files}/examples.html (100%) rename docs/{ => files}/files.html (100%) rename docs/{ => files}/folderclosed.png (100%) rename docs/{ => files}/folderopen.png (100%) rename docs/{ => files}/functions.html (100%) rename docs/{ => files}/functions_func.html (100%) create mode 100644 docs/files/index.html rename docs/{ => files}/jquery.js (100%) rename docs/{ => files}/menu.js (100%) rename docs/{ => files}/menudata.js (100%) rename docs/{ => files}/nav_f.png (100%) rename docs/{ => files}/nav_g.png (100%) rename docs/{ => files}/nav_h.png (100%) rename docs/{ => files}/open.png (100%) rename docs/{ => files}/search/all_0.html (100%) rename docs/{ => files}/search/all_0.js (100%) rename docs/{ => files}/search/all_1.html (100%) rename docs/{ => files}/search/all_1.js (100%) rename docs/{ => files}/search/all_2.html (100%) rename docs/{ => files}/search/all_2.js (100%) rename docs/{ => files}/search/all_3.html (100%) rename docs/{ => files}/search/all_3.js (100%) rename docs/{ => files}/search/all_4.html (100%) rename docs/{ => files}/search/all_4.js (100%) rename docs/{ => files}/search/all_5.html (100%) rename docs/{ => files}/search/all_5.js (100%) rename docs/{ => files}/search/all_6.html (100%) rename docs/{ => files}/search/all_6.js (100%) rename docs/{ => files}/search/classes_0.html (100%) rename docs/{ => files}/search/classes_0.js (100%) rename docs/{ => files}/search/close.png (100%) rename docs/{ => files}/search/functions_0.html (100%) rename docs/{ => files}/search/functions_0.js (100%) rename docs/{ => files}/search/functions_1.html (100%) rename docs/{ => files}/search/functions_1.js (100%) rename docs/{ => files}/search/functions_2.html (100%) rename docs/{ => files}/search/functions_2.js (100%) rename docs/{ => files}/search/functions_3.html (100%) rename docs/{ => files}/search/functions_3.js (100%) rename docs/{ => files}/search/functions_4.html (100%) rename docs/{ => files}/search/functions_4.js (100%) rename docs/{ => files}/search/functions_5.html (100%) rename docs/{ => files}/search/functions_5.js (100%) rename docs/{ => files}/search/functions_6.html (100%) rename docs/{ => files}/search/functions_6.js (100%) rename docs/{ => files}/search/mag_sel.png (100%) rename docs/{ => files}/search/nomatches.html (100%) rename docs/{ => files}/search/pages_0.html (100%) rename docs/{ => files}/search/pages_0.js (100%) rename docs/{ => files}/search/search.css (100%) rename docs/{ => files}/search/search.js (100%) rename docs/{ => files}/search/search_l.png (100%) rename docs/{ => files}/search/search_m.png (100%) rename docs/{ => files}/search/search_r.png (100%) rename docs/{ => files}/search/searchdata.js (100%) rename docs/{ => files}/splitbar.png (100%) rename docs/{ => files}/sync_off.png (100%) rename docs/{ => files}/sync_on.png (100%) rename docs/{ => files}/tab_a.png (100%) rename docs/{ => files}/tab_b.png (100%) rename docs/{ => files}/tab_h.png (100%) rename docs/{ => files}/tab_s.png (100%) rename docs/{ => files}/tabs.css (100%) delete mode 100644 docs/navtree.css delete mode 100644 docs/navtree.js delete mode 100644 docs/navtreedata.js delete mode 100644 docs/navtreeindex0.js delete mode 100644 docs/pages.html delete mode 100644 docs/resize.js delete mode 100644 docs/search/all_7.html delete mode 100644 docs/search/all_7.js delete mode 100644 docs/search/functions_7.html delete mode 100644 docs/search/functions_7.js delete mode 100644 docs/search/pages_1.html delete mode 100644 docs/search/pages_1.js diff --git a/Doxyfile b/Doxyfile index e2f3a50..14ed479 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1130,7 +1130,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = docs +HTML_OUTPUT = docs/files # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/docs/annotated_dup.js b/docs/annotated_dup.js deleted file mode 100644 index 1ed97aa..0000000 --- a/docs/annotated_dup.js +++ /dev/null @@ -1,4 +0,0 @@ -var annotated_dup = -[ - [ "Bounce", "class_bounce.html", "class_bounce" ] -]; \ No newline at end of file diff --git a/docs/class_bounce.js b/docs/class_bounce.js deleted file mode 100644 index 6ac219c..0000000 --- a/docs/class_bounce.js +++ /dev/null @@ -1,22 +0,0 @@ -var class_bounce = -[ - [ "Bounce", "class_bounce.html#aa62a2e2b5ad0ee6913a95f2f2a0e7606", null ], - [ "Bounce", "class_bounce.html#ab34517094faf21d4f38b36da2915132b", null ], - [ "attach", "class_bounce.html#aba08e592941465d033e3eba3dde66eaf", null ], - [ "attach", "class_bounce.html#a163477dbcbaf1a3dee6cb3b62eedf09e", null ], - [ "duration", "class_bounce.html#a62412d814d36102ab3d285e801d5d29a", null ], - [ "fallingEdge", "class_bounce.html#ac756559419bfa1c5060e5e4a4ad6406f", null ], - [ "fell", "class_bounce.html#abfbb0910f5b1ec4e25315cff26dd6289", null ], - [ "interval", "class_bounce.html#a2c6e68bf749497c597a9437b488b3d7c", null ], - [ "read", "class_bounce.html#ae1936fdf44501992707e6cbaee9bbc76", null ], - [ "readCurrentState", "class_bounce.html#ad6efc6dd65035de20f015cc44be37873", null ], - [ "risingEdge", "class_bounce.html#a3417beb80eb6593d768c2e9884c57aa0", null ], - [ "rose", "class_bounce.html#a9e4187934576e568cdfa8f94efeff6f2", null ], - [ "setPinMode", "class_bounce.html#a231a992bf2a1f4521043068e35eb50a6", null ], - [ "update", "class_bounce.html#ab36d7b83bf32e0935a0c2c6a05096441", null ], - [ "interval_millis", "class_bounce.html#a8c1991db9415ccc5acf9b24779b332c7", null ], - [ "pin", "class_bounce.html#a1cb79cb0ba2379cd12cc7c098d97053a", null ], - [ "previous_millis", "class_bounce.html#a223ab27b8094acd12d77a3a9145f56c9", null ], - [ "state", "class_bounce.html#af013db8b02e1e252eb60dd5b40d5480b", null ], - [ "stateChangeLastTime", "class_bounce.html#ad5aa630c50e7b783bac50aad0385262e", null ] -]; \ No newline at end of file diff --git a/docs/deprecated.html b/docs/deprecated.html deleted file mode 100644 index 88da2ac..0000000 --- a/docs/deprecated.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -Bounce2: Deprecated List - - - - - - - - - -
-
- - - - - - -
-
Bounce2 -
-
-
- - - - - - - - -
-
- - -
- -
- -
-
-
-
Deprecated List
-
-
-
-
Member Bounce::__attribute__ ((__deprecated__)) bool risingEdge()
-
Partial compatibility for programs written with Bounce version 1
-
Member Bounce::__attribute__ ((__deprecated__)) Bounce(uint8_t pin
-
Partial compatibility for programs written with Bounce version 1
-
Member Bounce::__attribute__ ((__deprecated__)) bool fallingEdge()
-
Partial compatibility for programs written with Bounce version 1
-
-
- - - - diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js deleted file mode 100644 index 26e47e2..0000000 --- a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js +++ /dev/null @@ -1,4 +0,0 @@ -var dir_68267d1309a1af8e8297ef4c3efbcdba = -[ - [ "Bounce2.h", "_bounce2_8h_source.html", null ] -]; \ No newline at end of file diff --git a/docs/files.js b/docs/files.js deleted file mode 100644 index 04b0a8e..0000000 --- a/docs/files.js +++ /dev/null @@ -1,4 +0,0 @@ -var files = -[ - [ "src", "dir_68267d1309a1af8e8297ef4c3efbcdba.html", "dir_68267d1309a1af8e8297ef4c3efbcdba" ] -]; \ No newline at end of file diff --git a/docs/_bounce2_8h_source.html b/docs/files/_bounce2_8h_source.html similarity index 100% rename from docs/_bounce2_8h_source.html rename to docs/files/_bounce2_8h_source.html diff --git a/docs/annotated.html b/docs/files/annotated.html similarity index 100% rename from docs/annotated.html rename to docs/files/annotated.html diff --git a/docs/bc_s.png b/docs/files/bc_s.png similarity index 100% rename from docs/bc_s.png rename to docs/files/bc_s.png diff --git a/docs/bdwn.png b/docs/files/bdwn.png similarity index 100% rename from docs/bdwn.png rename to docs/files/bdwn.png diff --git a/docs/bounce2buttons_8ino-example.html b/docs/files/bounce2buttons_8ino-example.html similarity index 100% rename from docs/bounce2buttons_8ino-example.html rename to docs/files/bounce2buttons_8ino-example.html diff --git a/docs/bounce_8ino-example.html b/docs/files/bounce_8ino-example.html similarity index 100% rename from docs/bounce_8ino-example.html rename to docs/files/bounce_8ino-example.html diff --git a/docs/bounce_multiple_8ino-example.html b/docs/files/bounce_multiple_8ino-example.html similarity index 100% rename from docs/bounce_multiple_8ino-example.html rename to docs/files/bounce_multiple_8ino-example.html diff --git a/docs/change_8ino-example.html b/docs/files/change_8ino-example.html similarity index 100% rename from docs/change_8ino-example.html rename to docs/files/change_8ino-example.html diff --git a/docs/class_bounce-members.html b/docs/files/class_bounce-members.html similarity index 100% rename from docs/class_bounce-members.html rename to docs/files/class_bounce-members.html diff --git a/docs/class_bounce.html b/docs/files/class_bounce.html similarity index 100% rename from docs/class_bounce.html rename to docs/files/class_bounce.html diff --git a/docs/classes.html b/docs/files/classes.html similarity index 100% rename from docs/classes.html rename to docs/files/classes.html diff --git a/docs/closed.png b/docs/files/closed.png similarity index 100% rename from docs/closed.png rename to docs/files/closed.png diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/files/dir_68267d1309a1af8e8297ef4c3efbcdba.html similarity index 100% rename from docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html rename to docs/files/dir_68267d1309a1af8e8297ef4c3efbcdba.html diff --git a/docs/doc.png b/docs/files/doc.png similarity index 100% rename from docs/doc.png rename to docs/files/doc.png diff --git a/docs/doxygen.css b/docs/files/doxygen.css similarity index 100% rename from docs/doxygen.css rename to docs/files/doxygen.css diff --git a/docs/doxygen.png b/docs/files/doxygen.png similarity index 100% rename from docs/doxygen.png rename to docs/files/doxygen.png diff --git a/docs/dynsections.js b/docs/files/dynsections.js similarity index 100% rename from docs/dynsections.js rename to docs/files/dynsections.js diff --git a/docs/examples.html b/docs/files/examples.html similarity index 100% rename from docs/examples.html rename to docs/files/examples.html diff --git a/docs/files.html b/docs/files/files.html similarity index 100% rename from docs/files.html rename to docs/files/files.html diff --git a/docs/folderclosed.png b/docs/files/folderclosed.png similarity index 100% rename from docs/folderclosed.png rename to docs/files/folderclosed.png diff --git a/docs/folderopen.png b/docs/files/folderopen.png similarity index 100% rename from docs/folderopen.png rename to docs/files/folderopen.png diff --git a/docs/functions.html b/docs/files/functions.html similarity index 100% rename from docs/functions.html rename to docs/files/functions.html diff --git a/docs/functions_func.html b/docs/files/functions_func.html similarity index 100% rename from docs/functions_func.html rename to docs/files/functions_func.html diff --git a/docs/files/index.html b/docs/files/index.html new file mode 100644 index 0000000..aab90bb --- /dev/null +++ b/docs/files/index.html @@ -0,0 +1,103 @@ + + + + + + + +Bounce2: BOUNCE 2 + + + + + + + + + +
+
+ + + + + + +
+
Bounce2 +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
BOUNCE 2
+
+
+

Debouncing library for Arduino and Wiring by Thomas Ouellet Fredericks with contributions from: Eric Lowry, Jim Schimpf, Tom Harkaway, Joachim Krüger and MrGradgrind.

+

More about debouncing: http://en.wikipedia.org/wiki/Debounce#Contact_bounce

+

See the bottom of this page for a basic usage example and the "examples" folder for more.

+

GITHUB PAGE

+

https://github.com/thomasfredericks/Bounce2

+

DOCUMENTATION

+

The complete class documentation can be found in the "docs" folder or online here.

+

HAVE A QUESTION?

+

Please post your questions here.

+

INSTALLATION & DOWNLOAD

+

Install through your software's Library Manager or download the latest version here and put the "Bounce2" folder in your "libraries" folder.

+

The original version of Bounce (Bounce 1) is included in the download but not supported anymore.

+

DEBOUNCE ALGORITHMS (FOR ADVANCED USERS)

+

STABLE INTERVAL

+

By default, the Bounce library uses a stable interval to process the debouncing. This is simpler to understand and can cancel unwanted noise.

+
+ +
+

LOCK-OUT INTERVAL

+

By defining "#define BOUNCE_LOCK_OUT" in "Bounce.h" (or in your code before including "Bounce.h") you can activate an alternative debouncing method. This method is a lot more responsive, but does not cancel noise.

+
#define BOUNCE_LOCK_OUT
+ +
+

WITH PROMPT DETECTION

+

By defining "#define BOUNCE_WITH_PROMPT_DETECTION" in "Bounce.h" (or in your code before including "Bounce.h") you can activate an alternative debouncing method. Button state changes are available immediately so long as the previous state has been stable for the timeout period. Otherwise the state will be updated as soon as the timeout period allows.

+
    +
  • Able to report acurate switch time normally with no delay.
  • +
  • Use when accurate switch transition timing is important.
  • +
+
#define BOUNCE_WITH_PROMPT_DETECTION

BASIC EXAMPLE

+
// This example toggles the debug LED (pin 13) on or off
// when a button on pin 2 is pressed.
// Include the Bounce2 library found here :
// https://github.com/thomasfredericks/Bounce2
#include <Bounce2.h>
#define BUTTON_PIN 2
#define LED_PIN 13
int ledState = LOW;
Bounce debouncer = Bounce(); // Instantiate a Bounce object
void setup() {
debouncer.attach(BUTTON_PIN,INPUT_PULLUP); // Attach the debouncer to a pin with INPUT_PULLUP mode
debouncer.interval(25); // Use a debounce interval of 25 milliseconds
pinMode(LED_PIN,OUTPUT); // Setup the LED
digitalWrite(LED_PIN,ledState);
}
void loop() {
debouncer.update(); // Update the Bounce instance
if ( debouncer.fell() ) { // Call code if button transitions from HIGH to LOW
ledState = !ledState; // Toggle LED state
digitalWrite(LED_PIN,ledState); // Apply new LED state
}
}
+ + + + diff --git a/docs/jquery.js b/docs/files/jquery.js similarity index 100% rename from docs/jquery.js rename to docs/files/jquery.js diff --git a/docs/menu.js b/docs/files/menu.js similarity index 100% rename from docs/menu.js rename to docs/files/menu.js diff --git a/docs/menudata.js b/docs/files/menudata.js similarity index 100% rename from docs/menudata.js rename to docs/files/menudata.js diff --git a/docs/nav_f.png b/docs/files/nav_f.png similarity index 100% rename from docs/nav_f.png rename to docs/files/nav_f.png diff --git a/docs/nav_g.png b/docs/files/nav_g.png similarity index 100% rename from docs/nav_g.png rename to docs/files/nav_g.png diff --git a/docs/nav_h.png b/docs/files/nav_h.png similarity index 100% rename from docs/nav_h.png rename to docs/files/nav_h.png diff --git a/docs/open.png b/docs/files/open.png similarity index 100% rename from docs/open.png rename to docs/files/open.png diff --git a/docs/search/all_0.html b/docs/files/search/all_0.html similarity index 100% rename from docs/search/all_0.html rename to docs/files/search/all_0.html diff --git a/docs/search/all_0.js b/docs/files/search/all_0.js similarity index 100% rename from docs/search/all_0.js rename to docs/files/search/all_0.js diff --git a/docs/search/all_1.html b/docs/files/search/all_1.html similarity index 100% rename from docs/search/all_1.html rename to docs/files/search/all_1.html diff --git a/docs/search/all_1.js b/docs/files/search/all_1.js similarity index 100% rename from docs/search/all_1.js rename to docs/files/search/all_1.js diff --git a/docs/search/all_2.html b/docs/files/search/all_2.html similarity index 100% rename from docs/search/all_2.html rename to docs/files/search/all_2.html diff --git a/docs/search/all_2.js b/docs/files/search/all_2.js similarity index 100% rename from docs/search/all_2.js rename to docs/files/search/all_2.js diff --git a/docs/search/all_3.html b/docs/files/search/all_3.html similarity index 100% rename from docs/search/all_3.html rename to docs/files/search/all_3.html diff --git a/docs/search/all_3.js b/docs/files/search/all_3.js similarity index 100% rename from docs/search/all_3.js rename to docs/files/search/all_3.js diff --git a/docs/search/all_4.html b/docs/files/search/all_4.html similarity index 100% rename from docs/search/all_4.html rename to docs/files/search/all_4.html diff --git a/docs/search/all_4.js b/docs/files/search/all_4.js similarity index 100% rename from docs/search/all_4.js rename to docs/files/search/all_4.js diff --git a/docs/search/all_5.html b/docs/files/search/all_5.html similarity index 100% rename from docs/search/all_5.html rename to docs/files/search/all_5.html diff --git a/docs/search/all_5.js b/docs/files/search/all_5.js similarity index 100% rename from docs/search/all_5.js rename to docs/files/search/all_5.js diff --git a/docs/search/all_6.html b/docs/files/search/all_6.html similarity index 100% rename from docs/search/all_6.html rename to docs/files/search/all_6.html diff --git a/docs/search/all_6.js b/docs/files/search/all_6.js similarity index 100% rename from docs/search/all_6.js rename to docs/files/search/all_6.js diff --git a/docs/search/classes_0.html b/docs/files/search/classes_0.html similarity index 100% rename from docs/search/classes_0.html rename to docs/files/search/classes_0.html diff --git a/docs/search/classes_0.js b/docs/files/search/classes_0.js similarity index 100% rename from docs/search/classes_0.js rename to docs/files/search/classes_0.js diff --git a/docs/search/close.png b/docs/files/search/close.png similarity index 100% rename from docs/search/close.png rename to docs/files/search/close.png diff --git a/docs/search/functions_0.html b/docs/files/search/functions_0.html similarity index 100% rename from docs/search/functions_0.html rename to docs/files/search/functions_0.html diff --git a/docs/search/functions_0.js b/docs/files/search/functions_0.js similarity index 100% rename from docs/search/functions_0.js rename to docs/files/search/functions_0.js diff --git a/docs/search/functions_1.html b/docs/files/search/functions_1.html similarity index 100% rename from docs/search/functions_1.html rename to docs/files/search/functions_1.html diff --git a/docs/search/functions_1.js b/docs/files/search/functions_1.js similarity index 100% rename from docs/search/functions_1.js rename to docs/files/search/functions_1.js diff --git a/docs/search/functions_2.html b/docs/files/search/functions_2.html similarity index 100% rename from docs/search/functions_2.html rename to docs/files/search/functions_2.html diff --git a/docs/search/functions_2.js b/docs/files/search/functions_2.js similarity index 100% rename from docs/search/functions_2.js rename to docs/files/search/functions_2.js diff --git a/docs/search/functions_3.html b/docs/files/search/functions_3.html similarity index 100% rename from docs/search/functions_3.html rename to docs/files/search/functions_3.html diff --git a/docs/search/functions_3.js b/docs/files/search/functions_3.js similarity index 100% rename from docs/search/functions_3.js rename to docs/files/search/functions_3.js diff --git a/docs/search/functions_4.html b/docs/files/search/functions_4.html similarity index 100% rename from docs/search/functions_4.html rename to docs/files/search/functions_4.html diff --git a/docs/search/functions_4.js b/docs/files/search/functions_4.js similarity index 100% rename from docs/search/functions_4.js rename to docs/files/search/functions_4.js diff --git a/docs/search/functions_5.html b/docs/files/search/functions_5.html similarity index 100% rename from docs/search/functions_5.html rename to docs/files/search/functions_5.html diff --git a/docs/search/functions_5.js b/docs/files/search/functions_5.js similarity index 100% rename from docs/search/functions_5.js rename to docs/files/search/functions_5.js diff --git a/docs/search/functions_6.html b/docs/files/search/functions_6.html similarity index 100% rename from docs/search/functions_6.html rename to docs/files/search/functions_6.html diff --git a/docs/search/functions_6.js b/docs/files/search/functions_6.js similarity index 100% rename from docs/search/functions_6.js rename to docs/files/search/functions_6.js diff --git a/docs/search/mag_sel.png b/docs/files/search/mag_sel.png similarity index 100% rename from docs/search/mag_sel.png rename to docs/files/search/mag_sel.png diff --git a/docs/search/nomatches.html b/docs/files/search/nomatches.html similarity index 100% rename from docs/search/nomatches.html rename to docs/files/search/nomatches.html diff --git a/docs/search/pages_0.html b/docs/files/search/pages_0.html similarity index 100% rename from docs/search/pages_0.html rename to docs/files/search/pages_0.html diff --git a/docs/search/pages_0.js b/docs/files/search/pages_0.js similarity index 100% rename from docs/search/pages_0.js rename to docs/files/search/pages_0.js diff --git a/docs/search/search.css b/docs/files/search/search.css similarity index 100% rename from docs/search/search.css rename to docs/files/search/search.css diff --git a/docs/search/search.js b/docs/files/search/search.js similarity index 100% rename from docs/search/search.js rename to docs/files/search/search.js diff --git a/docs/search/search_l.png b/docs/files/search/search_l.png similarity index 100% rename from docs/search/search_l.png rename to docs/files/search/search_l.png diff --git a/docs/search/search_m.png b/docs/files/search/search_m.png similarity index 100% rename from docs/search/search_m.png rename to docs/files/search/search_m.png diff --git a/docs/search/search_r.png b/docs/files/search/search_r.png similarity index 100% rename from docs/search/search_r.png rename to docs/files/search/search_r.png diff --git a/docs/search/searchdata.js b/docs/files/search/searchdata.js similarity index 100% rename from docs/search/searchdata.js rename to docs/files/search/searchdata.js diff --git a/docs/splitbar.png b/docs/files/splitbar.png similarity index 100% rename from docs/splitbar.png rename to docs/files/splitbar.png diff --git a/docs/sync_off.png b/docs/files/sync_off.png similarity index 100% rename from docs/sync_off.png rename to docs/files/sync_off.png diff --git a/docs/sync_on.png b/docs/files/sync_on.png similarity index 100% rename from docs/sync_on.png rename to docs/files/sync_on.png diff --git a/docs/tab_a.png b/docs/files/tab_a.png similarity index 100% rename from docs/tab_a.png rename to docs/files/tab_a.png diff --git a/docs/tab_b.png b/docs/files/tab_b.png similarity index 100% rename from docs/tab_b.png rename to docs/files/tab_b.png diff --git a/docs/tab_h.png b/docs/files/tab_h.png similarity index 100% rename from docs/tab_h.png rename to docs/files/tab_h.png diff --git a/docs/tab_s.png b/docs/files/tab_s.png similarity index 100% rename from docs/tab_s.png rename to docs/files/tab_s.png diff --git a/docs/tabs.css b/docs/files/tabs.css similarity index 100% rename from docs/tabs.css rename to docs/files/tabs.css diff --git a/docs/index.html b/docs/index.html index aab90bb..94308c2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,103 +1 @@ - - - - - - - -Bounce2: BOUNCE 2 - - - - - - - - - -
-
- - - - - - -
-
Bounce2 -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
BOUNCE 2
-
-
-

Debouncing library for Arduino and Wiring by Thomas Ouellet Fredericks with contributions from: Eric Lowry, Jim Schimpf, Tom Harkaway, Joachim Krüger and MrGradgrind.

-

More about debouncing: http://en.wikipedia.org/wiki/Debounce#Contact_bounce

-

See the bottom of this page for a basic usage example and the "examples" folder for more.

-

GITHUB PAGE

-

https://github.com/thomasfredericks/Bounce2

-

DOCUMENTATION

-

The complete class documentation can be found in the "docs" folder or online here.

-

HAVE A QUESTION?

-

Please post your questions here.

-

INSTALLATION & DOWNLOAD

-

Install through your software's Library Manager or download the latest version here and put the "Bounce2" folder in your "libraries" folder.

-

The original version of Bounce (Bounce 1) is included in the download but not supported anymore.

-

DEBOUNCE ALGORITHMS (FOR ADVANCED USERS)

-

STABLE INTERVAL

-

By default, the Bounce library uses a stable interval to process the debouncing. This is simpler to understand and can cancel unwanted noise.

-
- -
-

LOCK-OUT INTERVAL

-

By defining "#define BOUNCE_LOCK_OUT" in "Bounce.h" (or in your code before including "Bounce.h") you can activate an alternative debouncing method. This method is a lot more responsive, but does not cancel noise.

-
#define BOUNCE_LOCK_OUT
- -
-

WITH PROMPT DETECTION

-

By defining "#define BOUNCE_WITH_PROMPT_DETECTION" in "Bounce.h" (or in your code before including "Bounce.h") you can activate an alternative debouncing method. Button state changes are available immediately so long as the previous state has been stable for the timeout period. Otherwise the state will be updated as soon as the timeout period allows.

-
    -
  • Able to report acurate switch time normally with no delay.
  • -
  • Use when accurate switch transition timing is important.
  • -
-
#define BOUNCE_WITH_PROMPT_DETECTION

BASIC EXAMPLE

-
// This example toggles the debug LED (pin 13) on or off
// when a button on pin 2 is pressed.
// Include the Bounce2 library found here :
// https://github.com/thomasfredericks/Bounce2
#include <Bounce2.h>
#define BUTTON_PIN 2
#define LED_PIN 13
int ledState = LOW;
Bounce debouncer = Bounce(); // Instantiate a Bounce object
void setup() {
debouncer.attach(BUTTON_PIN,INPUT_PULLUP); // Attach the debouncer to a pin with INPUT_PULLUP mode
debouncer.interval(25); // Use a debounce interval of 25 milliseconds
pinMode(LED_PIN,OUTPUT); // Setup the LED
digitalWrite(LED_PIN,ledState);
}
void loop() {
debouncer.update(); // Update the Bounce instance
if ( debouncer.fell() ) { // Call code if button transitions from HIGH to LOW
ledState = !ledState; // Toggle LED state
digitalWrite(LED_PIN,ledState); // Apply new LED state
}
}
- - - - + \ No newline at end of file diff --git a/docs/navtree.css b/docs/navtree.css deleted file mode 100644 index 0cc7e77..0000000 --- a/docs/navtree.css +++ /dev/null @@ -1,146 +0,0 @@ -#nav-tree .children_ul { - margin:0; - padding:4px; -} - -#nav-tree ul { - list-style:none outside none; - margin:0px; - padding:0px; -} - -#nav-tree li { - white-space:nowrap; - margin:0px; - padding:0px; -} - -#nav-tree .plus { - margin:0px; -} - -#nav-tree .selected { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} - -#nav-tree img { - margin:0px; - padding:0px; - border:0px; - vertical-align: middle; -} - -#nav-tree a { - text-decoration:none; - padding:0px; - margin:0px; - outline:none; -} - -#nav-tree .label { - margin:0px; - padding:0px; - font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -} - -#nav-tree .label a { - padding:2px; -} - -#nav-tree .selected a { - text-decoration:none; - color:#fff; -} - -#nav-tree .children_ul { - margin:0px; - padding:0px; -} - -#nav-tree .item { - margin:0px; - padding:0px; -} - -#nav-tree { - padding: 0px 0px; - background-color: #FAFAFF; - font-size:14px; - overflow:auto; -} - -#doc-content { - overflow:auto; - display:block; - padding:0px; - margin:0px; - -webkit-overflow-scrolling : touch; /* iOS 5+ */ -} - -#side-nav { - padding:0 6px 0 0; - margin: 0px; - display:block; - position: absolute; - left: 0px; - width: 250px; -} - -.ui-resizable .ui-resizable-handle { - display:block; -} - -.ui-resizable-e { - background-image:url("splitbar.png"); - background-size:100%; - background-repeat:no-repeat; - background-attachment: scroll; - cursor:ew-resize; - height:100%; - right:0; - top:0; - width:6px; -} - -.ui-resizable-handle { - display:none; - font-size:0.1px; - position:absolute; - z-index:1; -} - -#nav-tree-contents { - margin: 6px 0px 0px 0px; -} - -#nav-tree { - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - -webkit-overflow-scrolling : touch; /* iOS 5+ */ -} - -#nav-sync { - position:absolute; - top:5px; - right:24px; - z-index:0; -} - -#nav-sync img { - opacity:0.3; -} - -#nav-sync img:hover { - opacity:0.9; -} - -@media print -{ - #nav-tree { display: none; } - div.ui-resizable-handle { display: none; position: relative; } -} - diff --git a/docs/navtree.js b/docs/navtree.js deleted file mode 100644 index e6d31b0..0000000 --- a/docs/navtree.js +++ /dev/null @@ -1,517 +0,0 @@ -var navTreeSubIndices = new Array(); -var arrowDown = '▼'; -var arrowRight = '►'; - -function getData(varName) -{ - var i = varName.lastIndexOf('/'); - var n = i>=0 ? varName.substring(i+1) : varName; - return eval(n.replace(/\-/g,'_')); -} - -function stripPath(uri) -{ - return uri.substring(uri.lastIndexOf('/')+1); -} - -function stripPath2(uri) -{ - var i = uri.lastIndexOf('/'); - var s = uri.substring(i+1); - var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); - return m ? uri.substring(i-6) : s; -} - -function hashValue() -{ - return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); -} - -function hashUrl() -{ - return '#'+hashValue(); -} - -function pathName() -{ - return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); -} - -function localStorageSupported() -{ - try { - return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; - } - catch(e) { - return false; - } -} - - -function storeLink(link) -{ - if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { - window.localStorage.setItem('navpath',link); - } -} - -function deleteLink() -{ - if (localStorageSupported()) { - window.localStorage.setItem('navpath',''); - } -} - -function cachedLink() -{ - if (localStorageSupported()) { - return window.localStorage.getItem('navpath'); - } else { - return ''; - } -} - -function getScript(scriptName,func,show) -{ - var head = document.getElementsByTagName("head")[0]; - var script = document.createElement('script'); - script.id = scriptName; - script.type = 'text/javascript'; - script.onload = func; - script.src = scriptName+'.js'; - if ($.browser.msie && $.browser.version<=8) { - // script.onload does not work with older versions of IE - script.onreadystatechange = function() { - if (script.readyState=='complete' || script.readyState=='loaded') { - func(); if (show) showRoot(); - } - } - } - head.appendChild(script); -} - -function createIndent(o,domNode,node,level) -{ - var level=-1; - var n = node; - while (n.parentNode) { level++; n=n.parentNode; } - if (node.childrenData) { - var imgNode = document.createElement("span"); - imgNode.className = 'arrow'; - imgNode.style.paddingLeft=(16*level).toString()+'px'; - imgNode.innerHTML=arrowRight; - node.plus_img = imgNode; - node.expandToggle = document.createElement("a"); - node.expandToggle.href = "javascript:void(0)"; - node.expandToggle.onclick = function() { - if (node.expanded) { - $(node.getChildrenUL()).slideUp("fast"); - node.plus_img.innerHTML=arrowRight; - node.expanded = false; - } else { - expandNode(o, node, false, false); - } - } - node.expandToggle.appendChild(imgNode); - domNode.appendChild(node.expandToggle); - } else { - var span = document.createElement("span"); - span.className = 'arrow'; - span.style.width = 16*(level+1)+'px'; - span.innerHTML = ' '; - domNode.appendChild(span); - } -} - -var animationInProgress = false; - -function gotoAnchor(anchor,aname,updateLocation) -{ - var pos, docContent = $('#doc-content'); - var ancParent = $(anchor.parent()); - if (ancParent.hasClass('memItemLeft') || - ancParent.hasClass('fieldname') || - ancParent.hasClass('fieldtype') || - ancParent.is(':header')) - { - pos = ancParent.position().top; - } else if (anchor.position()) { - pos = anchor.position().top; - } - if (pos) { - var dist = Math.abs(Math.min( - pos-docContent.offset().top, - docContent[0].scrollHeight- - docContent.height()-docContent.scrollTop())); - animationInProgress=true; - docContent.animate({ - scrollTop: pos + docContent.scrollTop() - docContent.offset().top - },Math.max(50,Math.min(500,dist)),function(){ - if (updateLocation) window.location.href=aname; - animationInProgress=false; - }); - } -} - -function newNode(o, po, text, link, childrenData, lastNode) -{ - var node = new Object(); - node.children = Array(); - node.childrenData = childrenData; - node.depth = po.depth + 1; - node.relpath = po.relpath; - node.isLast = lastNode; - - node.li = document.createElement("li"); - po.getChildrenUL().appendChild(node.li); - node.parentNode = po; - - node.itemDiv = document.createElement("div"); - node.itemDiv.className = "item"; - - node.labelSpan = document.createElement("span"); - node.labelSpan.className = "label"; - - createIndent(o,node.itemDiv,node,0); - node.itemDiv.appendChild(node.labelSpan); - node.li.appendChild(node.itemDiv); - - var a = document.createElement("a"); - node.labelSpan.appendChild(a); - node.label = document.createTextNode(text); - node.expanded = false; - a.appendChild(node.label); - if (link) { - var url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - link = url; - } else { - url = node.relpath+link; - } - a.className = stripPath(link.replace('#',':')); - if (link.indexOf('#')!=-1) { - var aname = '#'+link.split('#')[1]; - var srcPage = stripPath(pathName()); - var targetPage = stripPath(link.split('#')[0]); - a.href = srcPage!=targetPage ? url : "javascript:void(0)"; - a.onclick = function(){ - storeLink(link); - if (!$(a).parent().parent().hasClass('selected')) - { - $('.item').removeClass('selected'); - $('.item').removeAttr('id'); - $(a).parent().parent().addClass('selected'); - $(a).parent().parent().attr('id','selected'); - } - var anchor = $(aname); - gotoAnchor(anchor,aname,true); - }; - } else { - a.href = url; - a.onclick = function() { storeLink(link); } - } - } else { - if (childrenData != null) - { - a.className = "nolink"; - a.href = "javascript:void(0)"; - a.onclick = node.expandToggle.onclick; - } - } - - node.childrenUL = null; - node.getChildrenUL = function() { - if (!node.childrenUL) { - node.childrenUL = document.createElement("ul"); - node.childrenUL.className = "children_ul"; - node.childrenUL.style.display = "none"; - node.li.appendChild(node.childrenUL); - } - return node.childrenUL; - }; - - return node; -} - -function showRoot() -{ - var headerHeight = $("#top").height(); - var footerHeight = $("#nav-path").height(); - var windowHeight = $(window).height() - headerHeight - footerHeight; - (function (){ // retry until we can scroll to the selected item - try { - var navtree=$('#nav-tree'); - navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); - } catch (err) { - setTimeout(arguments.callee, 0); - } - })(); -} - -function expandNode(o, node, imm, showRoot) -{ - if (node.childrenData && !node.expanded) { - if (typeof(node.childrenData)==='string') { - var varName = node.childrenData; - getScript(node.relpath+varName,function(){ - node.childrenData = getData(varName); - expandNode(o, node, imm, showRoot); - }, showRoot); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } if (imm || ($.browser.msie && $.browser.version>8)) { - // somehow slideDown jumps to the start of tree for IE9 :-( - $(node.getChildrenUL()).show(); - } else { - $(node.getChildrenUL()).slideDown("fast"); - } - node.plus_img.innerHTML = arrowDown; - node.expanded = true; - } - } -} - -function glowEffect(n,duration) -{ - n.addClass('glow').delay(duration).queue(function(next){ - $(this).removeClass('glow');next(); - }); -} - -function highlightAnchor() -{ - var aname = hashUrl(); - var anchor = $(aname); - if (anchor.parent().attr('class')=='memItemLeft'){ - var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); - glowEffect(rows.children(),300); // member without details - } else if (anchor.parent().attr('class')=='fieldname'){ - glowEffect(anchor.parent().parent(),1000); // enum value - } else if (anchor.parent().attr('class')=='fieldtype'){ - glowEffect(anchor.parent().parent(),1000); // struct field - } else if (anchor.parent().is(":header")) { - glowEffect(anchor.parent(),1000); // section header - } else { - glowEffect(anchor.next(),1000); // normal member - } - gotoAnchor(anchor,aname,false); -} - -function selectAndHighlight(hash,n) -{ - var a; - if (hash) { - var link=stripPath(pathName())+':'+hash.substring(1); - a=$('.item a[class$="'+link+'"]'); - } - if (a && a.length) { - a.parent().parent().addClass('selected'); - a.parent().parent().attr('id','selected'); - highlightAnchor(); - } else if (n) { - $(n.itemDiv).addClass('selected'); - $(n.itemDiv).attr('id','selected'); - } - if ($('#nav-tree-contents .item:first').hasClass('selected')) { - $('#nav-sync').css('top','30px'); - } else { - $('#nav-sync').css('top','5px'); - } - showRoot(); -} - -function showNode(o, node, index, hash) -{ - if (node && node.childrenData) { - if (typeof(node.childrenData)==='string') { - var varName = node.childrenData; - getScript(node.relpath+varName,function(){ - node.childrenData = getData(varName); - showNode(o,node,index,hash); - },true); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } - $(node.getChildrenUL()).css({'display':'block'}); - node.plus_img.innerHTML = arrowDown; - node.expanded = true; - var n = node.children[o.breadcrumbs[index]]; - if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); - else hash=''; - } - if (hash.match(/^#l\d+$/)) { - var anchor=$('a[name='+hash.substring(1)+']'); - glowEffect(anchor.parent(),1000); // line number - hash=''; // strip line number anchors - } - var url=root+hash; - var i=-1; - while (NAVTREEINDEX[i+1]<=url) i++; - if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath) - } else { - getScript(relpath+'navtreeindex'+i,function(){ - navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath); - } - },true); - } -} - -function showSyncOff(n,relpath) -{ - n.html(''); -} - -function showSyncOn(n,relpath) -{ - n.html(''); -} - -function toggleSyncButton(relpath) -{ - var navSync = $('#nav-sync'); - if (navSync.hasClass('sync')) { - navSync.removeClass('sync'); - showSyncOff(navSync,relpath); - storeLink(stripPath2(pathName())+hashUrl()); - } else { - navSync.addClass('sync'); - showSyncOn(navSync,relpath); - deleteLink(); - } -} - -function initNavTree(toroot,relpath) -{ - var o = new Object(); - o.toroot = toroot; - o.node = new Object(); - o.node.li = document.getElementById("nav-tree-contents"); - o.node.childrenData = NAVTREE; - o.node.children = new Array(); - o.node.childrenUL = document.createElement("ul"); - o.node.getChildrenUL = function() { return o.node.childrenUL; }; - o.node.li.appendChild(o.node.childrenUL); - o.node.depth = 0; - o.node.relpath = relpath; - o.node.expanded = false; - o.node.isLast = true; - o.node.plus_img = document.createElement("span"); - o.node.plus_img.className = 'arrow'; - o.node.plus_img.innerHTML = arrowRight; - - if (localStorageSupported()) { - var navSync = $('#nav-sync'); - if (cachedLink()) { - showSyncOff(navSync,relpath); - navSync.removeClass('sync'); - } else { - showSyncOn(navSync,relpath); - } - navSync.click(function(){ toggleSyncButton(relpath); }); - } - - $(window).load(function(){ - navTo(o,toroot,hashUrl(),relpath); - showRoot(); - }); - - $(window).bind('hashchange', function(){ - if (window.location.hash && window.location.hash.length>1){ - var a; - if ($(location).attr('hash')){ - var clslink=stripPath(pathName())+':'+hashValue(); - a=$('.item a[class$="'+clslink.replace(/ - - - - - - -Bounce2: Related Pages - - - - - - - - - -
-
- - - - - - -
-
Bounce2 -
-
-
- - - - - - - -
- -
-
- - -
- -
- -
-
-
Related Pages
-
-
-
Here is a list of all related documentation pages:
- - -
 Deprecated List
-
-
- - - - diff --git a/docs/resize.js b/docs/resize.js deleted file mode 100644 index 56e4a02..0000000 --- a/docs/resize.js +++ /dev/null @@ -1,114 +0,0 @@ -function initResizable() -{ - var cookie_namespace = 'doxygen'; - var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; - - function readCookie(cookie) - { - var myCookie = cookie_namespace+"_"+cookie+"="; - if (document.cookie) { - var index = document.cookie.indexOf(myCookie); - if (index != -1) { - var valStart = index + myCookie.length; - var valEnd = document.cookie.indexOf(";", valStart); - if (valEnd == -1) { - valEnd = document.cookie.length; - } - var val = document.cookie.substring(valStart, valEnd); - return val; - } - } - return 0; - } - - function writeCookie(cookie, val, expiration) - { - if (val==undefined) return; - if (expiration == null) { - var date = new Date(); - date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week - expiration = date.toGMTString(); - } - document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; - } - - function resizeWidth() - { - var windowWidth = $(window).width() + "px"; - var sidenavWidth = $(sidenav).outerWidth(); - content.css({marginLeft:parseInt(sidenavWidth)+"px"}); - writeCookie('width',sidenavWidth-barWidth, null); - } - - function restoreWidth(navWidth) - { - var windowWidth = $(window).width() + "px"; - content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); - sidenav.css({width:navWidth + "px"}); - } - - function resizeHeight() - { - var headerHeight = header.outerHeight(); - var footerHeight = footer.outerHeight(); - var windowHeight = $(window).height() - headerHeight - footerHeight; - content.css({height:windowHeight + "px"}); - navtree.css({height:windowHeight + "px"}); - sidenav.css({height:windowHeight + "px"}); - var width=$(window).width(); - if (width!=collapsedWidth) { - if (width=desktop_vp) { - if (!collapsed) { - collapseExpand(); - } - } else if (width>desktop_vp && collapsedWidth0) { - restoreWidth(0); - collapsed=true; - } - else { - var width = readCookie('width'); - if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } - collapsed=false; - } - } - - header = $("#top"); - sidenav = $("#side-nav"); - content = $("#doc-content"); - navtree = $("#nav-tree"); - footer = $("#nav-path"); - $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); - $(sidenav).resizable({ minWidth: 0 }); - $(window).resize(function() { resizeHeight(); }); - var device = navigator.userAgent.toLowerCase(); - var touch_device = device.match(/(iphone|ipod|ipad|android)/); - if (touch_device) { /* wider split bar for touch only devices */ - $(sidenav).css({ paddingRight:'20px' }); - $('.ui-resizable-e').css({ width:'20px' }); - $('#nav-sync').css({ right:'34px' }); - barWidth=20; - } - var width = readCookie('width'); - if (width) { restoreWidth(width); } else { resizeWidth(); } - resizeHeight(); - var url = location.href; - var i=url.indexOf("#"); - if (i>=0) window.location.hash=url.substr(i); - var _preventDefault = function(evt) { evt.preventDefault(); }; - $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); - $(".ui-resizable-handle").dblclick(collapseExpand); - $(window).load(resizeHeight); -} - - diff --git a/docs/search/all_7.html b/docs/search/all_7.html deleted file mode 100644 index de19107..0000000 --- a/docs/search/all_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/search/all_7.js b/docs/search/all_7.js deleted file mode 100644 index 5223992..0000000 --- a/docs/search/all_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['update',['update',['../class_bounce.html#ab36d7b83bf32e0935a0c2c6a05096441',1,'Bounce']]] -]; diff --git a/docs/search/functions_7.html b/docs/search/functions_7.html deleted file mode 100644 index 83a7b84..0000000 --- a/docs/search/functions_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/search/functions_7.js b/docs/search/functions_7.js deleted file mode 100644 index 5223992..0000000 --- a/docs/search/functions_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['update',['update',['../class_bounce.html#ab36d7b83bf32e0935a0c2c6a05096441',1,'Bounce']]] -]; diff --git a/docs/search/pages_1.html b/docs/search/pages_1.html deleted file mode 100644 index aedb14e..0000000 --- a/docs/search/pages_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/docs/search/pages_1.js b/docs/search/pages_1.js deleted file mode 100644 index 038da54..0000000 --- a/docs/search/pages_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['deprecated_20list',['Deprecated List',['../deprecated.html',1,'']]] -]; diff --git a/library.json b/library.json index 09f3f09..09da92f 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "type": "git", "url": "https://github.com/thomasfredericks/Bounce2.git" }, - "version": "2.5", + "version": "2.51", "exclude": [ "*.png", "*.zip" diff --git a/library.properties b/library.properties index 20b8646..9e06b1c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Bounce2 -version=2.5 +version=2.51 author=Thomas O Fredericks with contributions from Eric Lowry, Jim Schimpf, Tom Harkaway, Joachim Krüger and MrGradgrind. maintainer=Thomas O Fredericks sentence=Debouncing library for Arduino and Wiring.