Commit Graph

959 Commits

Author SHA1 Message Date
Gregg 8a24819955 Added Characteristic::ConfiguredNameStatic()
This "custom" Characteristic is identical to ConfiguredName() but only allows paired-read and notifications.  By excluding paired-write it prevents the user from editing the name of a TV input source from the Home App.  This is useful when some sources are fixed, such as "netflix" instead of generic, such as "hdmi 1".
2021-10-22 06:35:33 -05:00
Gregg 7c32f7a364 Fix bug in PushButton()
Ensure a pin value of -1 is retained so that any further calls to other methods are disabled if the pin is not defined.
2021-10-21 20:32:25 -05:00
Gregg d4603df58d Creating Television Example 2021-10-20 06:15:12 -05:00
Gregg 26c15c9ca2 Fixed strncpy() warnings
Changed strncpy() to strcpy() when copying new string values
2021-10-18 22:48:56 -05:00
Gregg f07fa4e9c7 Testing TV functions 2021-10-17 22:02:11 -05:00
HomeSpan 353749baea
Merge pull request #121 from unreality/master
add support for Televisions
2021-10-17 16:10:50 -05:00
HomeSpan 82d86001e2 Update extras.ino 2021-10-16 14:49:50 -05:00
HomeSpan 1566f93274 Update extras.ino 2021-10-16 11:33:49 -05:00
Gregg 760abae5ce Testing pronto codes 2021-10-16 08:16:22 -05:00
Gregg 5976fd3d0d Add enableCarrier(uint32_t frequency, float duty) and disableCarrier() to RFControl
Allows you to overlay a carrier wave on the RF Signal - in practice this is only used for IR signals (not RF).  Automatically scales frequency to account for 80x difference between APB Clock and Ref Tick Clock depending on which is used.   Checks to ensure resulting parameters (high period and low period) are all in bounds (0,65536) and reports an error if they are not.
2021-10-15 22:32:03 -05:00
Gregg 4ad607951f Add clock selection to RFControl (80 MHz or 1 MHz)
Added second argument to RFControl(uint8_t pin, boolean refClock=true) to allow choice of Ref Tick (1 MHz) clock or APB (80 MHz) clock.  Default is to use 1 MHz Ref Tick.

Also fixed bug in logic that divides clock for ESP32-C3.  Factor should be 79, not 80, since divider is apparently configured to divide by factor+1.
2021-10-15 18:16:18 -05:00
Gregg 5bced71345 Changed rf.add() and rf.phase() to allow for uint32_t durations
Instead of limiting number of ticks to 15-bits (32767), RFControl allows for tick size to be any 32-bit number.  If ticks > 32767, RFControl adds repeated LOW or HIGH phases as needed to match full duration.  This provides for much more flexibility in creating pulse trains that include very long-duration "spaces" between repeats.
2021-10-15 17:42:17 -05:00
HomeSpan 96ac572136
Update FAQ.md 2021-10-09 15:25:49 -05:00
HomeSpan 88c4bb5c9f
Merge pull request #172 from HomeSpan/release-1.4.0
Release 1.4.0
2021-10-09 15:14:09 -05:00
HomeSpan 4698b036cc
Update README.md 2021-10-09 15:02:29 -05:00
HomeSpan cd00235f6d
Update README.md 2021-10-09 09:38:43 -05:00
Gregg 7d6265d543 Upgrade version number from 1.3.0 to 1.4.0 2021-10-09 08:12:29 -05:00
HomeSpan cd08d75d1d
Update Reference.md 2021-10-08 06:23:03 -05:00
HomeSpan 597abfb097
Update GettingStarted.md 2021-10-08 06:18:54 -05:00
Gregg b3f0e9c7ed Merge branch 'dev' of https://github.com/HomeSpan/HomeSpan into dev 2021-10-08 05:47:54 -05:00
Gregg 7295803dde Remove LED_BUILTIN as default for statusPin
HomeSpan default is that there is NO control button and NO status LED.  Must use setStatusPin() or setControlPin() to enable.
2021-10-08 05:47:51 -05:00
HomeSpan 59b21e2f02
Update Extras.md 2021-10-07 05:50:34 -05:00
HomeSpan b9bf0e32f0
Update Extras.md 2021-10-06 06:43:17 -05:00
HomeSpan c4e6fb98c3
Merge pull request #170 from HomeSpan/master
Pull recent master branch documentation updates into dev branch
2021-10-06 05:50:58 -05:00
Gregg 8236b6fb9a Marked old SpanRange() class as [[deprecated]]
This will cause a Warning (not an Error) at compile time indicating the class has been deprecated and that the Characteristic::setRange() method should be used instead.  Sketch will still run and SpanRange will still function correctly if used.  Will delete from code base at some point in the future.
2021-10-05 21:27:41 -05:00
Gregg 6de645216c CHANGED default settings for StatusPin and ControlPin
Re-worked code to allow for NO Status LED Pin and NO Control Pin.  If Control Pin is not set explicitly with homeSpan.setControlPin(), there will be no Control Pin.  There is no longer a default since there are too many board variations with S2 and C3 chips now supported.  Same for Status Pin - it will not be defined unless set explicitly with homeSpan.setStatusPin(), with the exception that if LED_BUILTIN is defined (i.e. there is a built-in LED), then the Status LED Pin will default to LED_BUILTIN if not explicitly defined.  MUST UPDATE DOCUMENTATION - THIS CHANGES DEFAULT BEHAVIOR OF HOMESPAN AND MAY REQUIRE UPDATES TO EXISTING SKETCHES
2021-10-05 21:10:24 -05:00
Gregg b95ebcb4fa Added ARDUINO_ESP_VERSION Macro
Will be "1.0.6", "2.0.0", etc.  Can be used as anywhere as a c-string
2021-10-05 20:08:34 -05:00
Gregg 56c09c44aa Updated Blinker again to ensure C3 compatibility
moved gpio_set_direction to start() method so that it is called every time needed in case another part of the program (i.e. DEV_Identify) calls pinMode() and resets the pin to a strict OUTPUT.
2021-10-05 06:32:19 -05:00
Gregg 0fd9424d79 Added Arduino-ESP32 Version Number to initial output 2021-10-04 21:14:16 -05:00
Gregg d82566158a Disabled watchdog timeout messages when running on ESP32-C3 2021-10-04 20:39:32 -05:00
Gregg 641e2ca955 Added check in RFControl to allow for backwards compatibility with Arduino-ESP 1.0.6
To do: Disable watchdog timer in ESP32-C3
2021-10-03 22:01:37 -05:00
Gregg ae1037946a Update Blinker() to fix inherent problem with digitalRead() in ESP32-C3
Pin must be INPUT_OUTPUT for digitalRead to work with ESP32-C3 (the IDF uses a new protocol for the C3).
2021-10-03 21:39:23 -05:00
Gregg 7980273609 Completed update of RFControl for ESP32-S2 and -C3 compatability
Testing completed for RFControl and PWM on all three ESP32 chip types.

To Do: update RFControl documentation to include total number of usable channels per chip, as well as the alternate version of start();
2021-10-03 18:08:07 -05:00
Gregg dc5844b520 Updated RFControl for compatibility with ESP32-S2 and ESP32-C3
Complete re-write of code.
2021-10-03 12:08:33 -05:00
Gregg 82ad33c98f Updated error-check for out-of-range PWM frequency (an ESP32-S2 check)
PWM has now been fully tested and verified with an ESP32 device under Arduino-ESP32 versions 1.0.6 and 2.0.0, and with an ESP32-S2 device under Arduino-ESP32 version 2.0.0.  Tests confirmed using both high (5000 Hz) and low (1 Hz or 5Hz) frequencies to ensure timers are correctly configured.

Next Task:  Update RFControl routines for 2.0.0 and ESP32-S2 compatibility.
2021-09-25 15:58:23 -05:00
Gregg 50bdfd7d37 Added better display of IDF Version 2021-09-25 14:41:20 -05:00
Gregg e581dfbf8b Merge branch 'dev' of https://github.com/HomeSpan/HomeSpan into dev 2021-09-25 14:33:34 -05:00
Gregg 0ea762b4a8 Added backwards compatibility to PWM to operate in 2.0.0 and 1.0.6
Accounts for new *required* elements of the LEDC channel and timer structures to be set in later versions of the IDF.  These elements are not available in earlier versions of the IDF and the program can't be compiled unless ignored.
2021-09-25 14:33:32 -05:00
HomeSpan 5d9fc5ed58
Update Extras.md 2021-09-25 13:42:20 -05:00
HomeSpan d9bcb3426d
Update README.md 2021-09-24 06:20:29 -05:00
Gregg 07da5ac924 Updated SRP code for 2.0.0 compatibility
Arduino-ESP32 has modified the Mbed TLS library so that it uses ESP32 hardware acceleration.  However, there is a 512-byte limit to the size of the variables used in an exponential modulo calculation.  One of the steps in the SRP code used a 768-byte variable, which cannot be handled in version 2.0.0 though it works fine in version 1.0.6.  Solution was to simply reduce the 768-byte variable by modulo N prior to performing the exponential modulo calculation.
2021-09-23 21:12:37 -05:00
Gregg 0dd341faa9 Update HomeSpan.h
eliminates -Wpmf-conversion warnings generated by our checks for override of update(), loop(), and button() methods
2021-09-22 05:31:46 -05:00
Gregg 896418f179 Revert "added version numbers for sodium and mbedtls"
This reverts commit 53b6a7dfc3.
2021-09-21 05:48:12 -05:00
Gregg 5496503afd Added version info for sodium and mbedtls
Also, fixed "bug" in SRP route (did not impact function - just a generated less random numbers than expected).
2021-09-19 22:07:34 -05:00
Gregg 53b6a7dfc3 added version numbers for sodium and mbedtls 2021-09-19 18:23:06 -05:00
Gregg 4da033195a Removing .DS_Store files 2021-09-19 14:04:16 -05:00
Gregg 013622c263 Update .gitignore 2021-09-19 14:01:30 -05:00
Gregg 4d5a7754c7 Update .DS_Store 2021-09-19 13:55:36 -05:00
Gregg 09fec33f50 Update .DS_Store 2021-09-19 13:55:23 -05:00
Gregg 61a87ccc63 Clean up PWM - ready for testing
To do: Test RGB LED Examples with ESP32 and ESP32-S2 boards.

Next:  Re-work Remote Control routines to make compatible with S2 and C3
2021-09-19 13:53:20 -05:00