Update Reference.md

This commit is contained in:
HomeSpan 2020-11-26 09:51:42 -06:00 committed by GitHub
parent ac178ae7b8
commit 363a32b8e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -125,13 +125,13 @@ Creating an instance of this **class** overrides the default HAP range for a Cha
* instantiated Ranges are added to the HomeSpan HAP Database and associated with the last Characteristic instantiated * instantiated Ranges are added to the HomeSpan HAP Database and associated with the last Characteristic instantiated
* instantiating a Range without first instantiating a Characteristic throws an error during initialization * instantiating a Range without first instantiating a Characteristic throws an error during initialization
## SpanButton(int pin, uint16_t longTime=2000, uint16_t singleTime=5, uint16_t doubleTime=200)* ## *SpanButton(int pin, uint16_t longTime, uint16_t singleTime, uint16_t doubleTime)*
Creating an instance of this **class** attaches a pushbutton handler to the ESP32 *pin* specified. Creating an instance of this **class** attaches a pushbutton handler to the ESP32 *pin* specified.
* instantiated Buttons are associated with the last Service instantiated * instantiated Buttons are associated with the last Service instantiated
* instantiating a Button without first instantiating a Service throws an error during initialization * instantiating a Button without first instantiating a Service throws an error during initialization
* the first argument is required; the rest are optional
* *pin* - the ESP32 pin to which a one pole of a normally-open pushbutton will be connected; the other pole is connected to ground * *pin* - the ESP32 pin to which a one pole of a normally-open pushbutton will be connected; the other pole is connected to ground
* *longTime* - the minimum time (in millis) required for the button to be pressed and held to trigger a Long Press (default=2000 ms) * *longTime* - the minimum time (in millis) required for the button to be pressed and held to trigger a Long Press (default=2000 ms)
* *singleTime* - the minimum time (in millis) required for the button to be pressed to trigger a Single Press (default=5 ms) * *singleTime* - the minimum time (in millis) required for the button to be pressed to trigger a Single Press (default=5 ms)