diff --git a/docs/source/Plugin/P157.rst b/docs/source/Plugin/P157.rst new file mode 100644 index 0000000000..048eafb820 --- /dev/null +++ b/docs/source/Plugin/P157.rst @@ -0,0 +1,227 @@ +.. include:: ../Plugin/_plugin_substitutions_p15x.repl +.. _P157_page: + +|P157_typename| +================================================== + +|P157_shortinfo| + +Plugin details +-------------- + +Type: |P157_type| + +Name: |P157_name| + +Status ESP32: |P157_status| + +Status ESP8266: |P157_status_lb| + +GitHub: |P157_github|_ + +Maintainer: |P157_maintainer| + +Used libraries: |P157_usedlibraries| + +Description +----------- + +The 14-/7-segment display plugin allows to display date, time, temperatures, numbers, text and self-created shapes on 14 segment LED displays, also supporting 7-segment displays, using a HT16K33 I2C driver. + +Up to 8 displays can be combined, and as these displays are available with 4 and 8 digits, up to 64 characters can be shown from a single plugin instance. + +For 14-segment displays a single font is available, and for 7-segment displays the 3 fonts available in P073 (when also included in the build) can be selected for presenting text on the display, where the character shapes are somewhat different. + +When text to be displayed can't fit on the width of the display, scrolling text can be used so longer messages are shown like a ticker-tape display. Scrolling is always from right to left, and optionally starts with an empty display, so text can be read as it scrolls in. + +Periods, comma's, colons and semicolons in text are always shown on the dots of the display, when available (all 14-segment, and most 7-segment, HT16K33 displays have a dot per digit). + +For temperature display commands, ``7dt,`` and ``7ddt,,``, the degree symbol after the temperature can be turned off so there's room for 1 more digit of temperature on the display. + +Hardware +^^^^^^^^ + +Most available 14-segment display units have 4 digits: + +.. image:: P157_ht16k33-4-dgt-module.png + +When multiple modules are combined to form a single display, the adjacent modules must get consecutive addresses, and placed from left to right with low to high addresses. The address for each unit (0x70 .. 0x77) is adjusted by adding a connection on the A0/A1/A2 solder bridges at the backside of the module. All 3 bridges open is address 0x70: + +.. image:: P157_ht16k33-address.png + +To make the A0/A1/A2 addressing of the modules explicit: + ++---------+-------------------+ +| address | A0/A1/A2 | ++=========+===================+ +| 0x70 | all open | ++---------+-------------------+ +| 0x71 | A0 closed | ++---------+-------------------+ +| 0x72 | A1 closed | ++---------+-------------------+ +| 0x73 | A0, A1 closed | ++---------+-------------------+ +| 0x74 | A2 closed | ++---------+-------------------+ +| 0x75 | A0, A2 closed | ++---------+-------------------+ +| 0x76 | A1, A2 closed | ++---------+-------------------+ +| 0x77 | A0, A1, A2 closed | ++---------+-------------------+ + + +Wiring +~~~~~~ + +Wiring multiple modules is as simple as connecting the ``Vi2c``, ``VCC``, ``GND``, ``SDA`` and ``SCL`` of all modules in parallel, and connect ``Vi2c`` to ``3V3``, ``VCC`` to ``5V``, ``GND`` to ``GND`` at the ESP, and ``SDA`` and ``SCL`` to the configured I2C pins of the ESP. The modules using red LEDs will usually work at a VCC of 3V3, but connecting more than 1 module to the 3V3 of the ESP will overload the 3V3 regulator, installed on the ESP board. This split power pinout design makes it very easy to connect these modules, as no level-converter is needed to protect the GPIO pins of the ESP. + +.. image:: P157_ht16k33-pinout.png + +When connecting more than 4 modules to the same ESP, it's best to **not** connect ``Vi2c`` to more than 4 modules, as each module comes with its own pair of 10k pull-up resistors, and having too many of these in parallel will result in a too low value, causing possible display errors. + +Configuration +^^^^^^^^^^^^^^ + +.. image:: P157_DeviceConfiguration.png + +* **Name**: In the Name field a unique name should be entered. + +* **Enabled**: When unchecked the plugin is not enabled. + +I2C options +^^^^^^^^^^^ + +* **I2C Address**: Select the address the chip is set for, available options: + +.. image:: P157_I2CAddressOptions.png + +The available settings here depend on the build and hardware configuration used. At least the **Force Slow I2C speed** option is available, but selections for the I2C Multiplexer can also be shown. For details see the :ref:`i2c-bus` page + + + +Device Settings +~~~~~~~~~~~~~~~ + +* **Display Type**: Select the type of display that's connected: + +.. image:: P157_DisplayTypeOptions.png + +* **Nr. of digits**: Up to 8 displays can be connected on the same I2C bus, or when using a multiplexer on the multiplexer channel. + +If a longer than the default size display is needed, multiple displays of the same type can be combined. They must have incremental I2C addresses. + +When multiple displays are connected, but the content must be set independent, multiple tasks can be configured, using the I2C address of the display for the next task. + +* **Display Output**: Here the type of output can be selected: + +.. image:: P157_DisplayOutputOptions.png + +*Manual*: The content can be set from rules by using the commands available (see below) + +*Clock 24h - Blink*: Displays the current time in 24h format, with a blinking colon or dot. + +*Clock 24h - No Blink*: Displays the current time in 24h format. + +*Clock 12h - Blink*: Displays the current time in 12h format, with a blinking colon or dot. + +*Clock 12h - No Blink*: Displays the current time in 12h format. + +*Date*: Displays the current date. + +*NB: Clock and Date outputs assume a time-source is available, f.e. the via NTP or External Time Source settings in Tools/Advanced, by connecting a GPS module, or via the ESPEasy P2P network.* + +The Clock and Date outputs are updated every second, and the blinking selections are 1 second on then 1 second off. + +Clock formats are shown in HH.MM format on 4 digit displays, and in HH.MM.SS format on displays with 8 or more available digits. Date is shown in DD MM format on 4 digit displays, and DD MM YYYY format on 8 digit and wider displays. + +* **Brightness**: The brightness level of the display can be set here. 0 is 'Default' brightness, 1..15 from low to high brightness. + +* **Font set**: Select the font set from this list: (Only available for 7-segment displays, and when plugin :ref:`P073_page` is also included in the build) + +.. image:: P157_FontSetOptions.png + +*Default*: The standard font. Includes digits 0..9, special characters: space, dash, degree (when using a ``^``), equal sign, slash, underscore and letters A..Z. Uppercase and lowercase characters are shown exactly the same, but as the possible shapes are quite limited, some can be somewhat hard to recognize at first. + +*Siekoo*: The character set as documented here `Fakoo.de: Siekoo alphabet `_ (See below for the extra special characters supported) + +*Siekoo with uppercase 'CHNORUX'*: This font is the same as the normal Siekoo character set, but supports uppercase versions for characters 'CHNORUX', even though they duplicate other characters in the set, they are somewhat better recognizable. + +*dSEG7*: the character set as documented here `Keshikan.net: dSEG7 `_ special characters: space, dash, degree (when using a ``^``), equal sign, slash, underscore and letters A..Z. (Again single-case, like the default font) + +**Siekoo**: + +.. image:: P073_SiekooSet.png + +The four marked characters, Ä, Ö, Ü and ß, are *not* included, as they can not reliably be sent to the unit because of conversion issues from ASCII/UTF-8/ISO charactersets. And they are possibly not often used, except in German, and some closely related, languages. + +**dSEG7**: + +.. image:: P073_dSEG7Set.png + +The ``^`` character is used to display the degree symbol, and the degree symbol is not recognized! + +Options +^^^^^^^ + +* **Hide ° for Temperatures**: Will leave out the degree symbol from the display for temperature commands ``7dt,`` (and ``7ddt,,`` when available), allowing 1 more digit for actual temperature display. + +* **Suppress leading 0 on day/hour**: When enabled, will show the hours of the time and days of the date without a leading 0 when < 10. (Not available in all builds for size reasons) + +* **Use 0 with slash**: The default font has an open ``0`` symbol, like the uppercase ``O``. To have a zero with a slash through it on the display, this setting can be enabled, or disable if the user preferes an open ``0``. Only available for 14-segment displays. + +* **Scroll text > display width**: Normally the ``7dtext,`` and ``7dbin,...`` commands only show the left n characters the display can hold. This option enables the Scroll Text feature, that will scroll text sent using the ``7dtext`` command (or ``7dbin`` command when available) from right to left when the content is longer than the display can show at once. + +* **Scroll text also <= display width**: The default setting is to only use scrolling for text (``7dtext,...``) or binary (``7dbin,...``) content if that doesn't fit on the display. This option allows to scroll *any* content, also when it *does* fit on the display. + +* **Scroll text in from right**: Normally the Scroll Text feature starts with the display filled with the left part of the text to scroll, with this option enabled, the display starts empty and the text is scrolled in from the right side of the display to the left, until all text is scrolled off. Then the scrolling restarts. + +* **Scroll speed (0.1 sec/step)**: Determines the speed of scrolling the text. Default value is 10, so 1 character per second. + +* **Delay to next scroll-start**: Set a (non-blocking) delay after a scroll is completed (display is empty), before the next scroll is started. Range 0 to 10 minutes, in 0.1 second steps. + +(The Scroll options and feature are not included in some builds for size reasons) + + +Commands available +^^^^^^^^^^^^^^^^^^ + +.. include:: P157_commands.repl + +Bit to segment mapping for 7dbin command +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``7dbin`` command allows to show any combination of segments on the display according to a (sequence of) bit pattern(s). + +14-segment +~~~~~~~~~~ + +.. image:: P157_14-segment-dp-map.png + +The mapping from bits to segments is ``0B(dp)ponmlkhgfedcba`` where the decimal point only takes 1 bit, of course. + +7-segment +~~~~~~~~~ + +.. image:: P073_7Segments.png + +The mapping from bits to segments is: ``0Bhgfedcba`` + + +ESPEasy allows decimal, hexadecimal and binary notation for numbers. This makes creating the desired display pattern easy when using the binary notation (starting with ``0B`` or ``0b``). + +Switching on all horizontal segments for a 14-segment digit can be done by the command ``7dbin,0b11001001`` or ``7dbin,0b01001001`` for a 7-segment digit. This can also be entered in hexadecimal notation: ``7dbin,0xC9`` (14 segment) or ``7dbin,0x49`` (7-segment). + +Change log +---------- + +.. versionchanged:: 2.0 + ... + + |added| 2026-05-24: Initial release version. + + + + + diff --git a/docs/source/Plugin/P157_14-segment-dp-map.png b/docs/source/Plugin/P157_14-segment-dp-map.png new file mode 100644 index 0000000000..3f9822aca8 Binary files /dev/null and b/docs/source/Plugin/P157_14-segment-dp-map.png differ diff --git a/docs/source/Plugin/P157_DeviceConfiguration.png b/docs/source/Plugin/P157_DeviceConfiguration.png new file mode 100644 index 0000000000..240e217509 Binary files /dev/null and b/docs/source/Plugin/P157_DeviceConfiguration.png differ diff --git a/docs/source/Plugin/P157_DisplayOutputOptions.png b/docs/source/Plugin/P157_DisplayOutputOptions.png new file mode 100644 index 0000000000..2fef04578c Binary files /dev/null and b/docs/source/Plugin/P157_DisplayOutputOptions.png differ diff --git a/docs/source/Plugin/P157_DisplayTypeOptions.png b/docs/source/Plugin/P157_DisplayTypeOptions.png new file mode 100644 index 0000000000..24891d1c6e Binary files /dev/null and b/docs/source/Plugin/P157_DisplayTypeOptions.png differ diff --git a/docs/source/Plugin/P157_FontSetOptions.png b/docs/source/Plugin/P157_FontSetOptions.png new file mode 100644 index 0000000000..158645627e Binary files /dev/null and b/docs/source/Plugin/P157_FontSetOptions.png differ diff --git a/docs/source/Plugin/P157_I2CAddressOptions.png b/docs/source/Plugin/P157_I2CAddressOptions.png new file mode 100644 index 0000000000..059b2b2707 Binary files /dev/null and b/docs/source/Plugin/P157_I2CAddressOptions.png differ diff --git a/docs/source/Plugin/P157_commands.repl b/docs/source/Plugin/P157_commands.repl new file mode 100644 index 0000000000..e78b7ae37a --- /dev/null +++ b/docs/source/Plugin/P157_commands.repl @@ -0,0 +1,129 @@ +.. csv-table:: + :header: "Command", "Extra information" + :widths: 20, 30 + + " + ``7dn,`` + + Example: + + ``7dn,[BME280#Humidity]`` to display the humidity measured by a BME280 sensor. + + "," + Displays a numeric value on the display, with 1 decimal. + " + " + ``7dt,`` + + Example: + + ``7dt,[BME280#Temperature]`` + + "," + To display the temperature measured by a BME280 sensor. By default includes a ° symbol, unless option 'Hide ° for Temperatures' is enabled. + " + " + ``7ddt,,`` + + Example: + + ``7ddt,[BME280#Temperature],[DS18b20#Temperature]`` + + "," + To display two temperatures measured, f.e. by a BME280 sensor and a DS18b20 sensor. Applicable for 8 digit or wider displays. + " + " + ``7dst,,,`` + + Example: + + ``7dst,%syshour%+6,%sysmin%,%syssec%`` + + "," + To display the time, f.e. for a different time zone. + + Can also be used to set a next appointment time externally. + " + " + ``7dsd,
,,`` + + "," + To display a date. + " + " + ``7dtext,`` + + Examples: + + ``7dtext,OUT [BLK#Temperature#d2.1]^`` + + ``7dtext,HU. [BLK#Humidity#d2.1]^o`` Will result in 'HU. 57.2°o' being displayed (8 digit or wider display) + "," + To display a text on the display. Any variable can be used. Unsupported characters (like accented letters) will show as a space (empty digit). + + With the Scroll Text option disabled, the first n characters the display can show are displayed, if the Scroll Text option is enabled, longer texts will scroll from right to left across the display, at the set speed. + " + " + ``7dfont,`` + + "," + Select a different font, either by name: ``Default`` or ``7dgt`` for the original font (0), ``Siekoo`` for standard Siekoo font (1), ``Siekoo_Upper`` for the Siekoo font with uppercase 'CHNORUX' characters (2), and ``dSEG7`` for the dSEG7 font (3). Numbers can also be used, 0, 1, 2, or 3 as noted. Fontnames are not case-sensitive. + + Only applicable when a 7-segment **Display Type** is selected. + " + " + ``7dbin,[,|'']...`` + + Example: + + ``7dbin,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x80`` (7-segment Display Type) + + ``7dbin,'ESPEasy is fun! and costs 0.00 ',2441,'uro'`` (14-segment Display Type, using the € sign) + "," + To display any bit pattern on the display. + + The example shows each digit with a different segment on, including the dot/colon, and assuming Scroll Text enabled. + + See explanation on how the bits map to segments, below. + " + " + ``7don`` + + "," + Turn the display on. + " + " + ``7doff`` + + "," + Turn the display off. + " + " + ``7db,<0..15>`` + + "," + Set the brightness to the provided level. + " + " + ``7output,<0..5>`` + + "," + Change the Display Output setting, available options: + + * 0 - Manual + * 1 - Clock 24h - Blink + * 2 - Clock 24h - No Blink + * 3 - Clock 12h - Blink + * 4 - Clock 12h - No Blink + * 5 - Date + " + " + ``7digit,,`` + + "," + Write content to a specific digit, or range of digits up to the end of the display (no scrolling supported) + + ``7digit,8,C.`` : Write a C with a period attached to digit 8 of the display (assuming it has at least 8 digits available). + + ``7digit,-4,0b110110`` : Write a bitmap (``||`` used here), similar to ``7dbin`` command, to a digit (the ``abs(dgt)`` value is used). + " diff --git a/docs/source/Plugin/P157_ht16k33-4-dgt-module.png b/docs/source/Plugin/P157_ht16k33-4-dgt-module.png new file mode 100644 index 0000000000..c5cd49cc76 Binary files /dev/null and b/docs/source/Plugin/P157_ht16k33-4-dgt-module.png differ diff --git a/docs/source/Plugin/P157_ht16k33-address.png b/docs/source/Plugin/P157_ht16k33-address.png new file mode 100644 index 0000000000..7c3afed147 Binary files /dev/null and b/docs/source/Plugin/P157_ht16k33-address.png differ diff --git a/docs/source/Plugin/P157_ht16k33-pinout.png b/docs/source/Plugin/P157_ht16k33-pinout.png new file mode 100644 index 0000000000..41843596d5 Binary files /dev/null and b/docs/source/Plugin/P157_ht16k33-pinout.png differ diff --git a/docs/source/Plugin/_Plugin.rst b/docs/source/Plugin/_Plugin.rst index 87f3366f5e..c6dd151fc0 100644 --- a/docs/source/Plugin/_Plugin.rst +++ b/docs/source/Plugin/_Plugin.rst @@ -492,6 +492,7 @@ There are different released versions of ESP Easy: ":ref:`P152_page`","|P152_status|","|P152_status_lb|","P152" ":ref:`P153_page`","|P153_status|","|P153_status_lb|","P153" ":ref:`P154_page`","|P154_status|","|P154_status_lb|","P154" + ":ref:`P157_page`","|P157_status|","|P157_status_lb|","P157" ":ref:`P159_page`","|P159_status|","|P159_status_lb|","P159" ":ref:`P162_page`","|P162_status|","|P162_status_lb|","P162" ":ref:`P163_page`","|P163_status|","|P163_status_lb|","P163" diff --git a/docs/source/Plugin/_plugin_categories.repl b/docs/source/Plugin/_plugin_categories.repl index 0c4fe03df9..2dba2c33c5 100644 --- a/docs/source/Plugin/_plugin_categories.repl +++ b/docs/source/Plugin/_plugin_categories.repl @@ -2,7 +2,7 @@ .. |Plugin_Acceleration| replace:: :ref:`P120_page`, :ref:`P125_page` .. |Plugin_Color| replace:: :ref:`P112_page` .. |Plugin_Communication| replace:: :ref:`P016_page`, :ref:`P020_page`, :ref:`P035_page`, :ref:`P044_page`, :ref:`P054_page`, :ref:`P071_page`, :ref:`P087_page`, :ref:`P089_page`, :ref:`P094_page`, :ref:`P101_page`, :ref:`P118_page`, :ref:`P176_page` -.. |Plugin_Display| replace:: :ref:`P012_page`, :ref:`P023_page`, :ref:`P036_page`, :ref:`P057_page`, :ref:`P073_page`, :ref:`P075_page`, :ref:`P095_page`, :ref:`P104_page`, :ref:`P116_page`, :ref:`P131_page`, :ref:`P148_page` +.. |Plugin_Display| replace:: :ref:`P012_page`, :ref:`P023_page`, :ref:`P036_page`, :ref:`P057_page`, :ref:`P073_page`, :ref:`P075_page`, :ref:`P095_page`, :ref:`P104_page`, :ref:`P116_page`, :ref:`P131_page`, :ref:`P148_page`, :ref:`P157_page`, :ref:`P165_page` .. |Plugin_Distance| replace:: :ref:`P013_page`, :ref:`P110_page`, :ref:`P113_page`, :ref:`P134_page` .. |Plugin_Dust| replace:: :ref:`P018_page`, :ref:`P053_page`, :ref:`P056_page`, :ref:`P144_page`, :ref:`P175_page` .. |Plugin_Energy_AC| replace:: :ref:`P076_page`, :ref:`P077_page`, :ref:`P078_page`, :ref:`P092_page`, :ref:`P102_page`, :ref:`P108_page`, :ref:`P176_page` diff --git a/docs/source/Plugin/_plugin_substitutions_p05x.repl b/docs/source/Plugin/_plugin_substitutions_p05x.repl index 2355be524e..9fc98c1598 100644 --- a/docs/source/Plugin/_plugin_substitutions_p05x.repl +++ b/docs/source/Plugin/_plugin_substitutions_p05x.repl @@ -96,9 +96,9 @@ .. |P056_compileinfo| replace:: `.` .. |P056_usedlibraries| replace:: `.` -.. |P057_name| replace:: :cyan:`HT16K33` +.. |P057_name| replace:: :cyan:`HT16K33 4 digit clock/num` .. |P057_type| replace:: :cyan:`Display` -.. |P057_typename| replace:: :cyan:`Display - HT16K33` +.. |P057_typename| replace:: :cyan:`Display - HT16K33 4 digit clock/num` .. |P057_porttype| replace:: `.` .. |P057_status| replace:: :yellow:`DISPLAY` :yellow:`COLLECTION` .. |P057_status_lb| replace:: :yellow:`DISPLAY` :yellow:`COLLECTION` diff --git a/docs/source/Plugin/_plugin_substitutions_p15x.repl b/docs/source/Plugin/_plugin_substitutions_p15x.repl index f83592e642..cd1964efec 100644 --- a/docs/source/Plugin/_plugin_substitutions_p15x.repl +++ b/docs/source/Plugin/_plugin_substitutions_p15x.repl @@ -68,6 +68,20 @@ .. |P154_compileinfo| replace:: `.` .. |P154_usedlibraries| replace:: `Adafruit BMP3XX Library` +.. |P157_name| replace:: :cyan:`HT16K33 14-/7-segment` +.. |P157_type| replace:: :cyan:`Display` +.. |P157_typename| replace:: :cyan:`Display - HT16K33 14-/7-segment` +.. |P157_porttype| replace:: `.` +.. |P157_status| replace:: :green:`DISPLAY` :yellow:`COLLECTION` +.. |P157_status_lb| replace:: `.` +.. |P157_github| replace:: P157_14DGT.ino +.. _P157_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P157_14DGT.ino +.. |P157_usedby| replace:: `.` +.. |P157_shortinfo| replace:: `.` +.. |P157_maintainer| replace:: `tonhuisman` +.. |P157_compileinfo| replace:: `.` +.. |P157_usedlibraries| replace:: `Noiasca HT16K33 (with a few minor modifications)` + .. |P159_name| replace:: :cyan:`LD2410` .. |P159_type| replace:: :cyan:`Presence` .. |P159_typename| replace:: :cyan:`Presence - LD2410` diff --git a/lib/NoiascaHt16k33/LICENSE b/lib/NoiascaHt16k33/LICENSE new file mode 100644 index 0000000000..12ae4d540e --- /dev/null +++ b/lib/NoiascaHt16k33/LICENSE @@ -0,0 +1,24 @@ +NoiascaLedControl.h - A library for controling Leds with a MAX7219/MAX7221 + +The library is based on Eberhard Fahle LedControl + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +This permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/lib/NoiascaHt16k33/README.md b/lib/NoiascaHt16k33/README.md new file mode 100644 index 0000000000..620a7b00a4 --- /dev/null +++ b/lib/NoiascaHt16k33/README.md @@ -0,0 +1,17 @@ +Noiasca HT16K33 +========== +"Noiasca HT16K33" is an [Arduino](http://arduino.cc) library for HT16K33 I2C based LED display drivers. + +Documentation +------------- +The library is documented on this page: +https://werner.rothschopf.net/201909_arduino_ht16k33.htm + +Download +-------- +The lastest source files of the library is always available from +https://werner.rothschopf.net/201909_arduino_ht16k33.htm + +Install +------- +Unzip the content to your Arduino Library Folder \ No newline at end of file diff --git a/lib/NoiascaHt16k33/docs/changelog.txt b/lib/NoiascaHt16k33/docs/changelog.txt new file mode 100644 index 0000000000..895d7d7b96 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/changelog.txt @@ -0,0 +1,14 @@ +Changelog Noiasca HT16K33 + +1.1.1 Release Canditate 2021-11-27 + 2021-11-27 corrected TWCR to 328/2560 only + +1.1.0 Release Candidate 2021-03-14 + 2021-03-14 extract chartables in separate font files + fonts are not static any more (only const PROGMEM) + +1.0.2 Release Candidate 2020-06-07 + 2020-06-05 on(), off() + 2020-06-04 Wire.begin() must be called in the user sketch. + A simple hook to catch on AVR platform is implemented + 2020-09-19 fix for ESP8266 \ No newline at end of file diff --git a/lib/NoiascaHt16k33/docs/ht16k33_class_model.png b/lib/NoiascaHt16k33/docs/ht16k33_class_model.png new file mode 100644 index 0000000000..3992f21236 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/ht16k33_class_model.png differ diff --git a/lib/NoiascaHt16k33/docs/html/annotated.html b/lib/NoiascaHt16k33/docs/html/annotated.html new file mode 100644 index 0000000000..310f99b63e --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/annotated.html @@ -0,0 +1,62 @@ + + + + + + + +Noiasca HT16K33: Class List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + +
 CNoiasca_ht16k33Base class for all HT16K33 displays
 CNoiasca_ht16k33_hw_14Class for HT16K33 displays with 14 segment LEDs
 CNoiasca_ht16k33_hw_14_4Class for HT16K33 displays with 14 segment LEDs
 CNoiasca_ht16k33_hw_14_extClass for HT16K33 displays with 14 segment LEDs
 CNoiasca_ht16k33_hw_7Class for HT16K33 displays with 7 segment LEDs
 CNoiasca_ht16k33_hw_7_4_cClass for HT16K33 displays with 7 segment LEDs
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/bc_s.png b/lib/NoiascaHt16k33/docs/html/bc_s.png new file mode 100644 index 0000000000..224b29aa98 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/bc_s.png differ diff --git a/lib/NoiascaHt16k33/docs/html/bdwn.png b/lib/NoiascaHt16k33/docs/html/bdwn.png new file mode 100644 index 0000000000..940a0b9504 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/bdwn.png differ diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33-members.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33-members.html new file mode 100644 index 0000000000..090555300a --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33-members.html @@ -0,0 +1,65 @@ + + + + + + + +Noiasca HT16K33: Member List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca_ht16k33 Member List
+
+
+ +

This is the complete list of members for Noiasca_ht16k33, including all inherited members.

+ + + + + + + + + + + +
begin(uint8_t i2c_addr, uint8_t numDevices=1)Noiasca_ht16k33
blinkRate(uint8_t b)Noiasca_ht16k33
clear(void)Noiasca_ht16k33
isConnected(void)Noiasca_ht16k33
off(void)Noiasca_ht16k33
on(void)Noiasca_ht16k33
setBrightness(uint8_t b)Noiasca_ht16k33
setCursor(uint8_t newPosition)Noiasca_ht16k33
setDigits(uint8_t newDigits)Noiasca_ht16k33
writeLowLevel(uint8_t position, uint16_t bitmask)Noiasca_ht16k33
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33.html new file mode 100644 index 0000000000..885bef1cb2 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33.html @@ -0,0 +1,317 @@ + + + + + + + +Noiasca HT16K33: Noiasca_ht16k33 Class Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+ +
Noiasca_ht16k33 Class Reference
+
+
+ +

Base class for all HT16K33 displays. + More...

+ +

#include <NoiascaHt16k33.h>

+
+Inheritance diagram for Noiasca_ht16k33:
+
+
+ + +Noiasca_ht16k33_hw_14 +Noiasca_ht16k33_hw_7 +Noiasca_ht16k33_hw_14_4 +Noiasca_ht16k33_hw_14_ext +Noiasca_ht16k33_hw_7_4_c + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

uint8_t begin (uint8_t i2c_addr, uint8_t numDevices=1)
 initialise hardware More...
 
+void blinkRate (uint8_t b)
 set the blink rate of the display
 
void clear (void)
 Clear the display and place cursor to 0. More...
 
+void off (void)
 Turn the display off.
 
+void on (void)
 Turn the display on.
 
bool isConnected (void)
 check if all ICs are responding More...
 
void setBrightness (uint8_t b)
 set the brightness of the display More...
 
void setCursor (uint8_t newPosition)
 set the cursor for the next writing position More...
 
void setDigits (uint8_t newDigits)
 set the number of digits per device More...
 
void writeLowLevel (uint8_t position, uint16_t bitmask)
 write to I2C More...
 
+

Detailed Description

+

Base class for all HT16K33 displays.

+

This is an (abstract) class used as base for all implementations It holds all common variables and member functions. If you create your instance (your object), don't use this base class but one of implementations

See also
Noiasca_ht16k33_hw_7
+
+Noiasca_ht16k33_hw_7_4_c
+
+Noiasca_ht16k33_hw_14
+
+Noiasca_ht16k33_hw_14_4
+
+Noiasca_ht16k33_hw_14_ext
+

Member Function Documentation

+ +

◆ begin()

+ +
+
+ + + + + + + + + + + + + + + + + + +
uint8_t Noiasca_ht16k33::begin (uint8_t i2c_addr,
uint8_t numDevices = 1 
)
+
+ +

initialise hardware

+

Put this method in your setup

Parameters
+ + + +
i2c_addrthe I2C address of the display
numDevicesthe number of used devices
+
+
+
Returns
0 on success
+ +
+
+ +

◆ clear()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33::clear (void )
+
+ +

Clear the display and place cursor to 0.

+

Clears the display and sets the cursor to 0.

+ +
+
+ +

◆ isConnected()

+ +
+
+ + + + + + + + +
bool Noiasca_ht16k33::isConnected (void )
+
+ +

check if all ICs are responding

+
Returns
true if all ICs are responding
+ +
+
+ +

◆ setBrightness()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33::setBrightness (uint8_t b)
+
+ +

set the brightness of the display

+
Parameters
+ + +
bnew brightness from 0..15
+
+
+ +
+
+ +

◆ setCursor()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33::setCursor (uint8_t newPosition)
+
+ +

set the cursor for the next writing position

+
Parameters
+ + +
newPositionthe new position for the cursor
+
+
+ +
+
+ +

◆ setDigits()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33::setDigits (uint8_t newDigits)
+
+ +

set the number of digits per device

+
Parameters
+ + +
newDigitsmodify the used digits
+
+
+ +
+
+ +

◆ writeLowLevel()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Noiasca_ht16k33::writeLowLevel (uint8_t position,
uint16_t bitmask 
)
+
+ +

write to I2C

+

I2C lowLevel write of a bitmask to the IC to a specific position

Parameters
+ + + +
positiondigit to be written to
bitmaskthe bits/segments to be activated as bitmask
+
+
+ +
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33.png b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33.png new file mode 100644 index 0000000000..203a4c0a85 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33.png differ diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14-members.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14-members.html new file mode 100644 index 0000000000..7a934171c2 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14-members.html @@ -0,0 +1,65 @@ + + + + + + + +Noiasca HT16K33: Member List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca_ht16k33_hw_14 Member List
+
+
+ +

This is the complete list of members for Noiasca_ht16k33_hw_14, including all inherited members.

+ + + + + + + + + + + +
begin(uint8_t i2c_addr, uint8_t numDevices=1)Noiasca_ht16k33
blinkRate(uint8_t b)Noiasca_ht16k33
clear(void)Noiasca_ht16k33
isConnected(void)Noiasca_ht16k33
off(void)Noiasca_ht16k33
on(void)Noiasca_ht16k33
setBrightness(uint8_t b)Noiasca_ht16k33
setCursor(uint8_t newPosition)Noiasca_ht16k33
setDigits(uint8_t newDigits)Noiasca_ht16k33
writeLowLevel(uint8_t position, uint16_t bitmask)Noiasca_ht16k33
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14.html new file mode 100644 index 0000000000..e995e175cf --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14.html @@ -0,0 +1,111 @@ + + + + + + + +Noiasca HT16K33: Noiasca_ht16k33_hw_14 Class Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+ +
Noiasca_ht16k33_hw_14 Class Reference
+
+
+ +

class for HT16K33 displays with 14 segment LEDs + More...

+ +

#include <NoiascaHt16k33.h>

+
+Inheritance diagram for Noiasca_ht16k33_hw_14:
+
+
+ + +Noiasca_ht16k33 +Noiasca_ht16k33_hw_14_4 +Noiasca_ht16k33_hw_14_ext + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Member Functions inherited from Noiasca_ht16k33
uint8_t begin (uint8_t i2c_addr, uint8_t numDevices=1)
 initialise hardware More...
 
+void blinkRate (uint8_t b)
 set the blink rate of the display
 
void clear (void)
 Clear the display and place cursor to 0. More...
 
+void off (void)
 Turn the display off.
 
+void on (void)
 Turn the display on.
 
bool isConnected (void)
 check if all ICs are responding More...
 
void setBrightness (uint8_t b)
 set the brightness of the display More...
 
void setCursor (uint8_t newPosition)
 set the cursor for the next writing position More...
 
void setDigits (uint8_t newDigits)
 set the number of digits per device More...
 
void writeLowLevel (uint8_t position, uint16_t bitmask)
 write to I2C More...
 
+

Detailed Description

+

class for HT16K33 displays with 14 segment LEDs

+

This is for displays with up to eight 14 segment LEDs For example the "HT16K33 AlphaNumeric 0.54" 8-Digit 14 Segment LED I2C Interface" displays from WtihK

+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14.png b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14.png new file mode 100644 index 0000000000..6c4a4ca5a4 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14.png differ diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4-members.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4-members.html new file mode 100644 index 0000000000..ea6e8793fa --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4-members.html @@ -0,0 +1,65 @@ + + + + + + + +Noiasca HT16K33: Member List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca_ht16k33_hw_14_4 Member List
+
+
+ +

This is the complete list of members for Noiasca_ht16k33_hw_14_4, including all inherited members.

+ + + + + + + + + + + +
begin(uint8_t i2c_addr, uint8_t numDevices=1)Noiasca_ht16k33
blinkRate(uint8_t b)Noiasca_ht16k33
clear(void)Noiasca_ht16k33
isConnected(void)Noiasca_ht16k33
off(void)Noiasca_ht16k33
on(void)Noiasca_ht16k33
setBrightness(uint8_t b)Noiasca_ht16k33
setCursor(uint8_t newPosition)Noiasca_ht16k33
setDigits(uint8_t newDigits)Noiasca_ht16k33
writeLowLevel(uint8_t position, uint16_t bitmask)Noiasca_ht16k33
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4.html new file mode 100644 index 0000000000..d9fb292784 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4.html @@ -0,0 +1,110 @@ + + + + + + + +Noiasca HT16K33: Noiasca_ht16k33_hw_14_4 Class Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+ +
Noiasca_ht16k33_hw_14_4 Class Reference
+
+
+ +

class for HT16K33 displays with 14 segment LEDs + More...

+ +

#include <NoiascaHt16k33.h>

+
+Inheritance diagram for Noiasca_ht16k33_hw_14_4:
+
+
+ + +Noiasca_ht16k33_hw_14 +Noiasca_ht16k33 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Member Functions inherited from Noiasca_ht16k33
uint8_t begin (uint8_t i2c_addr, uint8_t numDevices=1)
 initialise hardware More...
 
+void blinkRate (uint8_t b)
 set the blink rate of the display
 
void clear (void)
 Clear the display and place cursor to 0. More...
 
+void off (void)
 Turn the display off.
 
+void on (void)
 Turn the display on.
 
bool isConnected (void)
 check if all ICs are responding More...
 
void setBrightness (uint8_t b)
 set the brightness of the display More...
 
void setCursor (uint8_t newPosition)
 set the cursor for the next writing position More...
 
void setDigits (uint8_t newDigits)
 set the number of digits per device More...
 
void writeLowLevel (uint8_t position, uint16_t bitmask)
 write to I2C More...
 
+

Detailed Description

+

class for HT16K33 displays with 14 segment LEDs

+

This is for displays with four 14 segment LEDs For example the Adafruit Quad Alphanumeric Display - 0.54" Digits w/ I2C Backpack

+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4.png b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4.png new file mode 100644 index 0000000000..7312921bb6 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__4.png differ diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext-members.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext-members.html new file mode 100644 index 0000000000..7271068eae --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext-members.html @@ -0,0 +1,69 @@ + + + + + + + +Noiasca HT16K33: Member List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca_ht16k33_hw_14_ext Member List
+
+
+ +

This is the complete list of members for Noiasca_ht16k33_hw_14_ext, including all inherited members.

+ + + + + + + + + + + + + + + +
begin(uint8_t i2c_addr, uint8_t numDevices=1)Noiasca_ht16k33
blinkRate(uint8_t b)Noiasca_ht16k33
clear(void)Noiasca_ht16k33
isConnected(void)Noiasca_ht16k33
off(void)Noiasca_ht16k33
on(void)Noiasca_ht16k33
scroll()Noiasca_ht16k33_hw_14_ext
setBrightness(uint8_t b)Noiasca_ht16k33
setCursor(uint8_t newPosition)Noiasca_ht16k33
setDigits(uint8_t newDigits)Noiasca_ht16k33
setScrollInterval(uint16_t newInterval)Noiasca_ht16k33_hw_14_ext
setScrolltext(const char *newText)Noiasca_ht16k33_hw_14_ext
setScrollWait(uint16_t newWait)Noiasca_ht16k33_hw_14_ext
writeLowLevel(uint8_t position, uint16_t bitmask)Noiasca_ht16k33
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext.html new file mode 100644 index 0000000000..cfb82bf09b --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext.html @@ -0,0 +1,224 @@ + + + + + + + +Noiasca HT16K33: Noiasca_ht16k33_hw_14_ext Class Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+ +
Noiasca_ht16k33_hw_14_ext Class Reference
+
+
+ +

class for HT16K33 displays with 14 segment LEDs + More...

+ +

#include <NoiascaHt16k33.h>

+
+Inheritance diagram for Noiasca_ht16k33_hw_14_ext:
+
+
+ + +Noiasca_ht16k33_hw_14 +Noiasca_ht16k33 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

uint32_t scroll ()
 scroll the text More...
 
void setScrollInterval (uint16_t newInterval)
 set scroll interval More...
 
void setScrollWait (uint16_t newWait)
 set wait time between scrolling More...
 
void setScrolltext (const char *newText)
 set a scrolltext
+ More...
 
- Public Member Functions inherited from Noiasca_ht16k33
uint8_t begin (uint8_t i2c_addr, uint8_t numDevices=1)
 initialise hardware More...
 
+void blinkRate (uint8_t b)
 set the blink rate of the display
 
void clear (void)
 Clear the display and place cursor to 0. More...
 
+void off (void)
 Turn the display off.
 
+void on (void)
 Turn the display on.
 
bool isConnected (void)
 check if all ICs are responding More...
 
void setBrightness (uint8_t b)
 set the brightness of the display More...
 
void setCursor (uint8_t newPosition)
 set the cursor for the next writing position More...
 
void setDigits (uint8_t newDigits)
 set the number of digits per device More...
 
void writeLowLevel (uint8_t position, uint16_t bitmask)
 write to I2C More...
 
+

Detailed Description

+

class for HT16K33 displays with 14 segment LEDs

+

This is for displays with up to eight 14 segment LEDs. This class can be used to scroll the text in the display.

+

Member Function Documentation

+ +

◆ scroll()

+ +
+
+ + + + + + + +
uint32_t Noiasca_ht16k33_hw_14_ext::scroll ()
+
+ +

scroll the text

+

The tick/run/do method for scrolling text. Call this function in your loop().

+ +
+
+ +

◆ setScrollInterval()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33_hw_14_ext::setScrollInterval (uint16_t newInterval)
+
+ +

set scroll interval

+

Set the speed of the scroll effect.

Parameters
+ + +
newIntervalspeed in milliseconds
+
+
+ +
+
+ +

◆ setScrollWait()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33_hw_14_ext::setScrollWait (uint16_t newWait)
+
+ +

set wait time between scrolling

+

sets the wait/timeout after all letters are scrolled to the display

Parameters
+ + +
newWaitthe new wait time in milliseconds
+
+
+ +
+
+ +

◆ setScrolltext()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33_hw_14_ext::setScrolltext (const char * newText)
+
+ +

set a scrolltext
+

+

sets the new scrolltext to be displayed and scrolled

Parameters
+ + +
*newTextthe new text (or number)
+
+
+ +
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext.png b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext.png new file mode 100644 index 0000000000..28ae403839 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__14__ext.png differ diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7-members.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7-members.html new file mode 100644 index 0000000000..a42eca95e2 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7-members.html @@ -0,0 +1,66 @@ + + + + + + + +Noiasca HT16K33: Member List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca_ht16k33_hw_7 Member List
+
+
+ +

This is the complete list of members for Noiasca_ht16k33_hw_7, including all inherited members.

+ + + + + + + + + + + + +
begin(uint8_t i2c_addr, uint8_t numDevices=1)Noiasca_ht16k33
blinkRate(uint8_t b)Noiasca_ht16k33
clear(void)Noiasca_ht16k33
isConnected(void)Noiasca_ht16k33
off(void)Noiasca_ht16k33
on(void)Noiasca_ht16k33
setBrightness(uint8_t b)Noiasca_ht16k33
setColonDigit(uint8_t activate=1)Noiasca_ht16k33_hw_7
setCursor(uint8_t newPosition)Noiasca_ht16k33
setDigits(uint8_t newDigits)Noiasca_ht16k33
writeLowLevel(uint8_t position, uint16_t bitmask)Noiasca_ht16k33
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7.html new file mode 100644 index 0000000000..d52eeb76f8 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7.html @@ -0,0 +1,138 @@ + + + + + + + +Noiasca HT16K33: Noiasca_ht16k33_hw_7 Class Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+ +
Noiasca_ht16k33_hw_7 Class Reference
+
+
+ +

class for HT16K33 displays with 7 segment LEDs + More...

+ +

#include <NoiascaHt16k33.h>

+
+Inheritance diagram for Noiasca_ht16k33_hw_7:
+
+
+ + +Noiasca_ht16k33 +Noiasca_ht16k33_hw_7_4_c + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void setColonDigit (uint8_t activate=1)
 
- Public Member Functions inherited from Noiasca_ht16k33
uint8_t begin (uint8_t i2c_addr, uint8_t numDevices=1)
 initialise hardware More...
 
+void blinkRate (uint8_t b)
 set the blink rate of the display
 
void clear (void)
 Clear the display and place cursor to 0. More...
 
+void off (void)
 Turn the display off.
 
+void on (void)
 Turn the display on.
 
bool isConnected (void)
 check if all ICs are responding More...
 
void setBrightness (uint8_t b)
 set the brightness of the display More...
 
void setCursor (uint8_t newPosition)
 set the cursor for the next writing position More...
 
void setDigits (uint8_t newDigits)
 set the number of digits per device More...
 
void writeLowLevel (uint8_t position, uint16_t bitmask)
 write to I2C More...
 
+

Detailed Description

+

class for HT16K33 displays with 7 segment LEDs

+

This is for displays with 7 segment LEDs

+

Member Function Documentation

+ +

◆ setColonDigit()

+ +
+
+ + + + + + + + +
void Noiasca_ht16k33_hw_7::setColonDigit (uint8_t activate = 1)
+
+

activates/deactivtes a separate colon digit

Parameters
+ + +
activateset to 1 if you want to display the colon
+
+
+ +
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7.png b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7.png new file mode 100644 index 0000000000..485fe9c1b3 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7.png differ diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c-members.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c-members.html new file mode 100644 index 0000000000..ed9ddc1ff9 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c-members.html @@ -0,0 +1,67 @@ + + + + + + + +Noiasca HT16K33: Member List + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca_ht16k33_hw_7_4_c Member List
+
+
+ +

This is the complete list of members for Noiasca_ht16k33_hw_7_4_c, including all inherited members.

+ + + + + + + + + + + + + +
begin(uint8_t i2c_addr, uint8_t numDevices=1)Noiasca_ht16k33
blinkRate(uint8_t b)Noiasca_ht16k33
clear(void)Noiasca_ht16k33
isConnected(void)Noiasca_ht16k33
off(void)Noiasca_ht16k33
on(void)Noiasca_ht16k33
setBrightness(uint8_t b)Noiasca_ht16k33
setColonDigit(uint8_t activate=1)Noiasca_ht16k33_hw_7
setCursor(uint8_t newPosition)Noiasca_ht16k33
setDigits(uint8_t newDigits)Noiasca_ht16k33
showColon(uint8_t device, bool colon)Noiasca_ht16k33_hw_7_4_c
writeLowLevel(uint8_t position, uint16_t bitmask)Noiasca_ht16k33
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c.html b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c.html new file mode 100644 index 0000000000..6fc65cf687 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c.html @@ -0,0 +1,152 @@ + + + + + + + +Noiasca HT16K33: Noiasca_ht16k33_hw_7_4_c Class Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+ +
Noiasca_ht16k33_hw_7_4_c Class Reference
+
+
+ +

class for HT16K33 displays with 7 segment LEDs + More...

+ +

#include <NoiascaHt16k33.h>

+
+Inheritance diagram for Noiasca_ht16k33_hw_7_4_c:
+
+
+ + +Noiasca_ht16k33_hw_7 +Noiasca_ht16k33 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void showColon (uint8_t device, bool colon)
 
- Public Member Functions inherited from Noiasca_ht16k33_hw_7
void setColonDigit (uint8_t activate=1)
 
- Public Member Functions inherited from Noiasca_ht16k33
uint8_t begin (uint8_t i2c_addr, uint8_t numDevices=1)
 initialise hardware More...
 
+void blinkRate (uint8_t b)
 set the blink rate of the display
 
void clear (void)
 Clear the display and place cursor to 0. More...
 
+void off (void)
 Turn the display off.
 
+void on (void)
 Turn the display on.
 
bool isConnected (void)
 check if all ICs are responding More...
 
void setBrightness (uint8_t b)
 set the brightness of the display More...
 
void setCursor (uint8_t newPosition)
 set the cursor for the next writing position More...
 
void setDigits (uint8_t newDigits)
 set the number of digits per device More...
 
void writeLowLevel (uint8_t position, uint16_t bitmask)
 write to I2C More...
 
+

Detailed Description

+

class for HT16K33 displays with 7 segment LEDs

+

This is for displays with 7 segment LEDs, 4 digits and a colon. For example Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack

+

Member Function Documentation

+ +

◆ showColon()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Noiasca_ht16k33_hw_7_4_c::showColon (uint8_t device,
bool colon 
)
+
+

activate the colon digit

Parameters
+ + + +
devicethe device you want to control the colon
colonTRUE will switch on, FALSE will switch off the colon
+
+
+ +
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c.png b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c.png new file mode 100644 index 0000000000..d18fb128e0 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/class_noiasca__ht16k33__hw__7__4__c.png differ diff --git a/lib/NoiascaHt16k33/docs/html/classes.html b/lib/NoiascaHt16k33/docs/html/classes.html new file mode 100644 index 0000000000..92ebc85acc --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/classes.html @@ -0,0 +1,58 @@ + + + + + + + +Noiasca HT16K33: Class Index + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Class Index
+
+ + + + + diff --git a/lib/NoiascaHt16k33/docs/html/closed.png b/lib/NoiascaHt16k33/docs/html/closed.png new file mode 100644 index 0000000000..98cc2c909d Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/closed.png differ diff --git a/lib/NoiascaHt16k33/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/lib/NoiascaHt16k33/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html new file mode 100644 index 0000000000..6866ee32a2 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -0,0 +1,62 @@ + + + + + + + +Noiasca HT16K33: C:/Daten/myrepository/Arduino/libraries/NoiascaHt16k33/src Directory Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + + +
+
+
src Directory Reference
+
+
+ + + + +

+Directories

directory  fonts
 
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/dir_bec663b67e4420d39ecb45ef100bdbac.html b/lib/NoiascaHt16k33/docs/html/dir_bec663b67e4420d39ecb45ef100bdbac.html new file mode 100644 index 0000000000..d94092a5f5 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/dir_bec663b67e4420d39ecb45ef100bdbac.html @@ -0,0 +1,56 @@ + + + + + + + +Noiasca HT16K33: C:/Daten/myrepository/Arduino/libraries/NoiascaHt16k33/src/fonts Directory Reference + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + + +
+
+
fonts Directory Reference
+
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/doc.png b/lib/NoiascaHt16k33/docs/html/doc.png new file mode 100644 index 0000000000..17edabff95 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/doc.png differ diff --git a/lib/NoiascaHt16k33/docs/html/doxygen.css b/lib/NoiascaHt16k33/docs/html/doxygen.css new file mode 100644 index 0000000000..9036737224 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/doxygen.css @@ -0,0 +1,1841 @@ +/* The standard CSS for doxygen 1.9.3 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +.compoundTemplParams { + color: #4665A2; + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font: 200% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 90% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +code.JavaDocCode + direction:ltr; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/lib/NoiascaHt16k33/docs/html/doxygen.svg b/lib/NoiascaHt16k33/docs/html/doxygen.svg new file mode 100644 index 0000000000..d42dad52d5 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/NoiascaHt16k33/docs/html/dynsections.js b/lib/NoiascaHt16k33/docs/html/dynsections.js new file mode 100644 index 0000000000..3174bd7beb --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/dynsections.js @@ -0,0 +1,121 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +Noiasca HT16K33: Class Members + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Here is a list of all documented class members with links to the class documentation for each member:
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/functions_func.html b/lib/NoiascaHt16k33/docs/html/functions_func.html new file mode 100644 index 0000000000..d7522dfc4e --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/functions_func.html @@ -0,0 +1,67 @@ + + + + + + + +Noiasca HT16K33: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/hierarchy.html b/lib/NoiascaHt16k33/docs/html/hierarchy.html new file mode 100644 index 0000000000..1d6a59dafa --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/hierarchy.html @@ -0,0 +1,62 @@ + + + + + + + +Noiasca HT16K33: Class Hierarchy + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 123]
+ + + + + + +
 CNoiasca_ht16k33Base class for all HT16K33 displays
 CNoiasca_ht16k33_hw_14Class for HT16K33 displays with 14 segment LEDs
 CNoiasca_ht16k33_hw_14_4Class for HT16K33 displays with 14 segment LEDs
 CNoiasca_ht16k33_hw_14_extClass for HT16K33 displays with 14 segment LEDs
 CNoiasca_ht16k33_hw_7Class for HT16K33 displays with 7 segment LEDs
 CNoiasca_ht16k33_hw_7_4_cClass for HT16K33 displays with 7 segment LEDs
+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/index.html b/lib/NoiascaHt16k33/docs/html/index.html new file mode 100644 index 0000000000..167db671f9 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/index.html @@ -0,0 +1,66 @@ + + + + + + + +Noiasca HT16K33: Some words to the Noiasca HT16K33 Library + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Some words to the Noiasca HT16K33 Library
+
+
+

+Introduction

+

The "Noiasca HT16K33 Library" is an Arduino Library to control HT16K33 based seven segment and 14 segment LED displays.

+

The library inherits from Print.h and therefore supports the very common interface you know from other display libraries. Additionally the interface is very close to the so called LCD API 1.0

+

+Examples

+

There are several examples please use the hello world for the beginning.

+

+Install the library

+

Download the library from http://werner.rothschopf.net/201909_arduino_ht16k33.htm

+

In the Arduino IDE use the Menu
+ Sketch / Include Library / Add .ZIP Library
+ to install the library.

+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/jquery.js b/lib/NoiascaHt16k33/docs/html/jquery.js new file mode 100644 index 0000000000..c9ed3d99cb --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/lib/NoiascaHt16k33/docs/html/md__c___daten_myrepository__arduino_libraries__noiasca_ht16k33__r_e_a_d_m_e.html b/lib/NoiascaHt16k33/docs/html/md__c___daten_myrepository__arduino_libraries__noiasca_ht16k33__r_e_a_d_m_e.html new file mode 100644 index 0000000000..165fe95268 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/md__c___daten_myrepository__arduino_libraries__noiasca_ht16k33__r_e_a_d_m_e.html @@ -0,0 +1,63 @@ + + + + + + + +Noiasca HT16K33: Noiasca HT16K33 + + + + + + +
+
+ + + + + + +
+
Noiasca HT16K33 +
+
A library for HT16K33 LED displays - 7 segment and 14 segment
+
+
+ + + + + + +
+
+
Noiasca HT16K33
+
+
+

"Noiasca HT16K33" is an Arduino library for HT16K33 I2C based LED display drivers.

+

+Documentation

+

The library is documented on this page: https://werner.rothschopf.net/201909_arduino_ht16k33.htm

+

+Download

+

The lastest source files of the library is always available from https://werner.rothschopf.net/201909_arduino_ht16k33.htm

+

+Install

+

Unzip the content to your Arduino Library Folder

+
+
+ + + + diff --git a/lib/NoiascaHt16k33/docs/html/menu.js b/lib/NoiascaHt16k33/docs/html/menu.js new file mode 100644 index 0000000000..54e81cf15c --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/menu.js @@ -0,0 +1,127 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + var searchBox; + if (searchEnabled) { + if (serverSide) { + searchBox='
'+ + '
'+ + '
'+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBox='
'+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' + '' + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBox) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBox); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBox); + $('#searchBoxPos2').show(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/lib/NoiascaHt16k33/docs/html/menudata.js b/lib/NoiascaHt16k33/docs/html/menudata.js new file mode 100644 index 0000000000..43826ee278 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/menudata.js @@ -0,0 +1,34 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Hierarchy",url:"hierarchy.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html"}, +{text:"Functions",url:"functions_func.html"}]}]}]} diff --git a/lib/NoiascaHt16k33/docs/html/nav_f.png b/lib/NoiascaHt16k33/docs/html/nav_f.png new file mode 100644 index 0000000000..72a58a529e Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/nav_f.png differ diff --git a/lib/NoiascaHt16k33/docs/html/nav_g.png b/lib/NoiascaHt16k33/docs/html/nav_g.png new file mode 100644 index 0000000000..2093a237a9 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/nav_g.png differ diff --git a/lib/NoiascaHt16k33/docs/html/nav_h.png b/lib/NoiascaHt16k33/docs/html/nav_h.png new file mode 100644 index 0000000000..33389b101d Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/nav_h.png differ diff --git a/lib/NoiascaHt16k33/docs/html/open.png b/lib/NoiascaHt16k33/docs/html/open.png new file mode 100644 index 0000000000..30f75c7efe Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/open.png differ diff --git a/lib/NoiascaHt16k33/docs/html/pages.html b/lib/NoiascaHt16k33/docs/html/pages.html new file mode 100644 index 0000000000..b67cfddfef --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/pages.html @@ -0,0 +1,57 @@ + + + + + + + +Noiasca HT16K33: Related Pages + + + + + + +
    +
    + + + + + + +
    +
    Noiasca HT16K33 +
    +
    A library for HT16K33 LED displays - 7 segment and 14 segment
    +
    +
    + + + + + + +
    +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    + + +
     Noiasca HT16K33
    +
    +
    + + + + diff --git a/lib/NoiascaHt16k33/docs/html/splitbar.png b/lib/NoiascaHt16k33/docs/html/splitbar.png new file mode 100644 index 0000000000..fe895f2c58 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/splitbar.png differ diff --git a/lib/NoiascaHt16k33/docs/html/sync_off.png b/lib/NoiascaHt16k33/docs/html/sync_off.png new file mode 100644 index 0000000000..3b443fc628 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/sync_off.png differ diff --git a/lib/NoiascaHt16k33/docs/html/sync_on.png b/lib/NoiascaHt16k33/docs/html/sync_on.png new file mode 100644 index 0000000000..e08320fb64 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/sync_on.png differ diff --git a/lib/NoiascaHt16k33/docs/html/tab_a.png b/lib/NoiascaHt16k33/docs/html/tab_a.png new file mode 100644 index 0000000000..3b725c41c5 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/tab_a.png differ diff --git a/lib/NoiascaHt16k33/docs/html/tab_b.png b/lib/NoiascaHt16k33/docs/html/tab_b.png new file mode 100644 index 0000000000..e2b4a8638c Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/tab_b.png differ diff --git a/lib/NoiascaHt16k33/docs/html/tab_h.png b/lib/NoiascaHt16k33/docs/html/tab_h.png new file mode 100644 index 0000000000..fd5cb70548 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/tab_h.png differ diff --git a/lib/NoiascaHt16k33/docs/html/tab_s.png b/lib/NoiascaHt16k33/docs/html/tab_s.png new file mode 100644 index 0000000000..ab478c95b6 Binary files /dev/null and b/lib/NoiascaHt16k33/docs/html/tab_s.png differ diff --git a/lib/NoiascaHt16k33/docs/html/tabs.css b/lib/NoiascaHt16k33/docs/html/tabs.css new file mode 100644 index 0000000000..00d1c60249 --- /dev/null +++ b/lib/NoiascaHt16k33/docs/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:#666;-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/lib/NoiascaHt16k33/docs/more.html b/lib/NoiascaHt16k33/docs/more.html new file mode 100644 index 0000000000..2db553c5cb --- /dev/null +++ b/lib/NoiascaHt16k33/docs/more.html @@ -0,0 +1,11 @@ + + + +Noiasca HT16K33 Library + + +

    Noiasca HT16K33 Library

    +

    Full library documentation (local)

    +

    Download latest Version

    + + diff --git a/lib/NoiascaHt16k33/examples/01_Strandtest_7segment/01_Strandtest_7segment.ino b/lib/NoiascaHt16k33/examples/01_Strandtest_7segment/01_Strandtest_7segment.ino new file mode 100644 index 0000000000..5b93edce4b --- /dev/null +++ b/lib/NoiascaHt16k33/examples/01_Strandtest_7segment/01_Strandtest_7segment.ino @@ -0,0 +1,51 @@ +/******************************************************************************* + Strandtest 7 Segment + Noiasca HT16K33 + + This is a strandtest to show if wiring of your HT16K33 display is correct + + by noiasca + Sketch Version 2020-06-05 + + On startup you should see some text on your display + In the loop all printable characters will be shown. + + *******************************************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from //http://werner.rothschopf.net/ + +//Noiasca_ht16k33_hw_7 display = Noiasca_ht16k33_hw_7(); // object for 7 segments, 8 digits +Noiasca_ht16k33_hw_7_4_c display = Noiasca_ht16k33_hw_7_4_c(); // object for 7 segments, 4 visbible digits, colon digit. E.g. Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack +//Noiasca_ht16k33_hw_14 display = Noiasca_ht16k33_hw_14(); // object for 14 segments - 8 digits +//Noiasca_ht16k33_hw_14_4 display = Noiasca_ht16k33_hw_14_4(); // object for 14 segments - 4 digits + +const uint8_t i2cAddress = 0x70; // the I2C address of the first module +const uint8_t numOfDevices = 1; // how many modules have you installed on the I2C Bus +const uint16_t wait = 500; // wait milliseconds between demos + + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\n01 strandtest 7segment")); + Wire.begin(); // start the I2C interface + display.begin(i2cAddress, numOfDevices); // I2C address of first display, total number of devices + + // display.setColonDigit(); // activates a separate digit for a colon manually. But better to use the Noiasca_ht16k33_hw_7_4_c class if necessary. + Serial.println(F("ON Test")); + display.clear(); // clear display + display.print(F("ALFABETADELT")); // if the text is to long or your display (chain) you will only see the last letters + delay(wait); +} + + +void loop() { + // put your main code here, to run repeatedly: + Serial.println(F("Printable characters")); + for (uint8_t counter = 32; counter < 128; counter++) { + display.clear(); + display.print(counter); // print the numerical ANSI code of the character + display.write(counter); // print the character for the ANSI code + delay(wait); + } +} \ No newline at end of file diff --git a/lib/NoiascaHt16k33/examples/02_Strandtest_14segment/02_Strandtest_14segment.ino b/lib/NoiascaHt16k33/examples/02_Strandtest_14segment/02_Strandtest_14segment.ino new file mode 100644 index 0000000000..8e5755154a --- /dev/null +++ b/lib/NoiascaHt16k33/examples/02_Strandtest_14segment/02_Strandtest_14segment.ino @@ -0,0 +1,50 @@ +/******************************************************************************* + Strandtest 14 Segment + Noiasca HT16K33 + + This is a strandtest to show if wiring of your HT16K33 display is correct + + by noiasca + Sketch Version 2020-06-05 + + On startup you should see some text on your display + In the loop all printable Characters will be shown. + + *******************************************************************************/ + +#include // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +//Noiasca_ht16k33_hw_7 display7 = Noiasca_ht16k33_hw_7(); // object for 7 segments, 8 digits +//Noiasca_ht16k33_hw_7_4_c display7 = Noiasca_ht16k33_hw_7_4_c(); // object for 7 segments, 4 visbible digits, colon digit. E.g. Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack +Noiasca_ht16k33_hw_14 display = Noiasca_ht16k33_hw_14(); // object for 14 segments - 8 digits +//Noiasca_ht16k33_hw_14_4 display = Noiasca_ht16k33_hw_14_4(); // object for 14 segments - 4 digits + +const uint8_t i2cAddress = 0x70; // the I2C address of the first module +const uint8_t numOfDevices = 1; // how many modules have you installed on the I2C Bus +const uint16_t wait = 500; // wait milliseconds between demos + + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\nstrandtest 14 segment ")); + Wire.begin(); // start the I2C interface + display.begin(i2cAddress, numOfDevices); // I2C adress of first display, total number of devices + + Serial.println(F("ON Test")); + display.clear(); // clear display + display.print(F("ALFABETADELT")); // if the text is to long or your display (chain) you will only see the last letters + delay(wait); +} + + +void loop() { + // put your main code here, to run repeatedly: + Serial.println(F("Printable characters")); + for (uint8_t counter = 32; counter < 128; counter++) { + display.clear(); + display.print(counter); // print the numerical ANSI code of the character + display.write(counter); // print the character for the ANSI code + delay(wait); + } +} diff --git a/lib/NoiascaHt16k33/examples/03_Strandtest_diagnostics/03_Strandtest_diagnostics.ino b/lib/NoiascaHt16k33/examples/03_Strandtest_diagnostics/03_Strandtest_diagnostics.ino new file mode 100644 index 0000000000..7f703523bc --- /dev/null +++ b/lib/NoiascaHt16k33/examples/03_Strandtest_diagnostics/03_Strandtest_diagnostics.ino @@ -0,0 +1,74 @@ +/******************************************************************************* + 03_Strandtest_diagnostics + Noiasca HT16K33 + + If you have problems to get your LED modules working try this sketch. + It will activate (most) of the connected LEDs. + + The example will handle: + - test all available adresses + - write the hex adress on each found module + - switch on all remaining segments/LEDs + - loop through a simple animation (set brightness) + + by noiasca + Sketch Version 2020-06-08 + + *******************************************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +const byte startAddr = 0x70; // lowest addresss of the HT16K33 is 0x70 +const byte noOfModules = 8; // test all 8 modules +const char allSegments = 127; // character 127 will activate "all segments" +Noiasca_ht16k33_hw_14 display[noOfModules]; // let's assume 8 separate HT16K33 + + +// just a simple animation +void tick_animation() +{ + const uint16_t intervall = 500; // intervall of updates + static uint32_t previousMillis; // is static, because we need the value the next time when we call the function again, WITHOUT the need of a global variable + static uint16_t brightness; // static, as we want to keep the value from to call without a global variable + if (millis() - previousMillis > intervall) // check, if it is time to do something + { + for (auto ¤tDisplay : display) + currentDisplay.setBrightness(brightness); + brightness++; + if (brightness > 15) brightness = 0; + previousMillis = millis(); + } +} + + +void setup() { + Serial.begin(115200); + Serial.println(F("\n03 Strandtest diagnostics")); + Wire.begin(); // start the I2C interface + //Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices. deactivate this row. + byte foundModules = 0; + Serial.println(F("I: search for available HT16K33")); + for (byte i = 0; i < noOfModules; i++) + { + if (display[i].begin(startAddr + i) == false) // no error + { + Serial.print(F("I: display found 0x")); Serial.println((startAddr + i), HEX); + display[i].clear(); + display[i].print((startAddr + i), HEX); // print the hex address of the modul on the first two digits + for (byte j = 0; j < 6; j++) + display[i].write(allSegments); // activate all segments of the remaining 6 digits + foundModules++; + } + else + { + Serial.print(F("E: no display at 0x")); Serial.println((0x70 + i), HEX); + } + } + Serial.print(F("I: found ")); Serial.print(foundModules); Serial.println(F(" modules on I2C bus")); + Serial.println(F("start loop")); +} + + +void loop() { + tick_animation(); +} diff --git a/lib/NoiascaHt16k33/examples/11_HelloWorld_14segment/11_HelloWorld_14segment.ino b/lib/NoiascaHt16k33/examples/11_HelloWorld_14segment/11_HelloWorld_14segment.ino new file mode 100644 index 0000000000..a2b819adff --- /dev/null +++ b/lib/NoiascaHt16k33/examples/11_HelloWorld_14segment/11_HelloWorld_14segment.ino @@ -0,0 +1,137 @@ +/******************************************************************************* + HelloWorld + Noiasca HT16K33 + + This is a demo Sketch to show up the print methods of the HT16K33 Library + + by noiasca + Sketch Version 2020-06-05 + + *******************************************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +//Noiasca_ht16k33_hw_7_4 display7 = Noiasca_ht16k33_hw_7_4(); // 7 segments, 8 digits +//Noiasca_ht16k33_hw_7_4_c display7 = Noiasca_ht16k33_hw_7_4_c(); // 7 Segment, 4 visbible digits, colon digit +//Noiasca_ht16k33_hw_14 display = Noiasca_ht16k33_hw_14(); // object for 14 segments - 8 digits +Noiasca_ht16k33_hw_14_4 display = Noiasca_ht16k33_hw_14_4(); // object for 14 segments - 4 digits + +const uint16_t wait = 500; // wait milliseconds between demos + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\n11 Hello World 14 segment")); + Wire.begin(); // start the I2C interface + Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices. deactivate this row. + +/* + display7.begin(0x70); + display7.clear(); + display7.print(F("1.234")); + //display7.showColon(1); // show colon on 7 segment display + //display7.blinkRate(HT16K33_BLINK_HALFHZ); + delay(wait); + display7.clear(); + display7.print(F("8888")); +*/ + + display.begin(0x70); // I2C address of first display, optional total number of devices + + Serial.println(F("ON Test")); + display.clear(); + display.print(F("ALFABETADELT")); // if the text is to long or your display (chain) you will only see the last letters + delay(wait); delay(wait); + + Serial.println(F("Set brightness")); + display.setBrightness(5); // set brightness from 0 to 15 + + Serial.println(F("all Segments of first 4 digits on first device")); + display.clear(); + display.write(127); + display.write(127); + display.write(127); + display.write(127); + delay(wait); + + Serial.println(F("Print a number")); + display.clear(); + display.print(1234); + delay(wait); + + Serial.println(F("Blink display")); + display.clear(); + display.blinkRate(HT16K33_BLINK_2HZ); + display.print(F("BLIN")); + delay(wait); delay(wait); delay(wait); + display.blinkRate(HT16K33_BLINK_OFF); + + Serial.println(F("Print a float")); + display.clear(); + display.print(5.67); + delay(wait); + + Serial.println(F("Print text with dots")); + display.clear(); + display.print(F("5.6.7.8.")); + delay(wait); + + //display7.showColon(0); +} + + +void loop() { + // put your main code here, to run repeatedly: + char data[10]; // we need a small buffer to store a temp result + + Serial.println(F("display fixtext F and a float right aligned")); + display.clear(); + for (float counter = -9; counter < 10; counter = counter + 1.3) + { + int16_t myint = counter * 10; + sprintf(data, "F%2d.%d", myint / 10, abs(myint) % 10); // we split the output into two separte integers + display.print(data); + Serial.println(data); + delay(wait); + } + + /* + Serial.println(F("display fixtext F and a float right aligned on systems like ESP8266 or ESP32 - will NOT work on Arduino UNO/MEGA/NANO ...")); + display.clear(); + for (float counter = -9; counter < 10; counter = counter + 1.3) + { + sprintf(data, "F%3.1f", counter); // 3 total digits (including dot!) + 1 after dot + display.print(data); + Serial.println(data); + delay(wait); + } + */ + + Serial.println(F("display the Fixtext A and an integeger right aligned")); + for (int8_t counter = 123; counter > -12; counter--) { + sprintf(data, "A%3d", counter); + display.print(data); + delay(wait); + } + + Serial.println(F("Printable characters")); + for (uint8_t counter = 32; counter < 128; counter++) { + display.clear(); + display.print(counter); + display.write(counter); + delay(wait); + } + + Serial.println(F("display numbers on display")); + display.clear(); + for (uint16_t counter = 0; counter < 1000; counter++) { + float myvalue = counter; + myvalue = myvalue / 10; + Serial.print(F("\ncounter=")); Serial.println(counter); + Serial.print(F("myvalue=")); Serial.println(myvalue); + //display.clear(); + display.setCursor(0); + display.print(myvalue, 1); + delay(500); + } +} diff --git a/lib/NoiascaHt16k33/examples/12_sevenseg/12_sevenseg.ino b/lib/NoiascaHt16k33/examples/12_sevenseg/12_sevenseg.ino new file mode 100644 index 0000000000..d789f9d2fb --- /dev/null +++ b/lib/NoiascaHt16k33/examples/12_sevenseg/12_sevenseg.ino @@ -0,0 +1,77 @@ +/*************************************************** + + 12 Sevenseg + + This example is a variant of Adafruit Backpack "sevenseg" example to compare the two libraries + + original sketch + Written by Limor Fried/Ladyada for Adafruit Industries. + BSD license, all text above must be included in any redistribution + + this adopted Sketch + written by noiasca + + Sktech Version 2020-06-06 + + ****************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ +Noiasca_ht16k33_hw_7_4_c matrix = Noiasca_ht16k33_hw_7_4_c(); // object for 7 segments, 4 visbible digits, colon digit. e.g. Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack + + +void setup() { +#ifndef __AVR_ATtiny85__ + Serial.begin(115200); + Serial.println("7 Segment Backpack Test"); +#endif + Wire.begin(); // start the I2C interface + matrix.begin(0x70); +} + + +void loop() { + // try to print a number thats too long + matrix.print(10000, DEC); + delay(500); + matrix.clear(); + + // print a hex number + matrix.print(0xBEEF, HEX); + delay(500); + matrix.clear(); + + // print a floating point + matrix.print(12.34); + delay(500); + matrix.clear(); + + // print with print/println + for (uint16_t counter = 0; counter < 9999; counter++) { + matrix.println(counter); + delay(10); + matrix.setCursor(0); // as we are counting upwards, no need for matrix.clear() + } + + // method #2 - draw each digit + uint16_t blinkcounter = 0; + boolean drawDots = false; + + for (uint16_t counter = 0; counter < 9999; counter ++) { + matrix.print(counter / 1000); + matrix.print((counter / 100) % 10); + matrix.showColon(drawDots); + matrix.print((counter / 10) % 10); + matrix.print(counter % 10); + + blinkcounter += 50; + if (blinkcounter < 500) { + drawDots = false; + } else if (blinkcounter < 1000) { + drawDots = true; + } else { + blinkcounter = 0; + } + delay(10); + matrix.setCursor(0); + } +} diff --git a/lib/NoiascaHt16k33/examples/12_sevenseg/info.ino b/lib/NoiascaHt16k33/examples/12_sevenseg/info.ino new file mode 100644 index 0000000000..aee8726d48 --- /dev/null +++ b/lib/NoiascaHt16k33/examples/12_sevenseg/info.ino @@ -0,0 +1,11 @@ +/* + +The original sketch from adafruit compiles: +Der Sketch verwendet 5934 Bytes (18%) des Programmspeicherplatzes. Das Maximum sind 32256 Bytes. +Globale Variablen verwenden 456 Bytes (22%) des dynamischen Speichers, 1592 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes. + +Using NoiascaHt16K33 +Der Sketch verwendet 4540 Bytes (14%) des Programmspeicherplatzes. Das Maximum sind 32256 Bytes. +Globale Variablen verwenden 445 Bytes (21%) des dynamischen Speichers, 1603 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes. + +*/ diff --git a/lib/NoiascaHt16k33/examples/13_format_number_7segment/13_format_number_7segment.ino b/lib/NoiascaHt16k33/examples/13_format_number_7segment/13_format_number_7segment.ino new file mode 100644 index 0000000000..ff7853be50 --- /dev/null +++ b/lib/NoiascaHt16k33/examples/13_format_number_7segment/13_format_number_7segment.ino @@ -0,0 +1,133 @@ +/*************************************************** + + Print Numbers aligned (without sprintf) + + This example shows how to print numbers right aligned without the RAM hungry sprintf + + The first function is a short introduction how to print with leading zeroes. + The second function uses a similar concept but with trailing blanks. + + written by + noiasca + + Sktech Version 2020-06-06 + + ****************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +Noiasca_ht16k33_hw_7_4_c display = Noiasca_ht16k33_hw_7_4_c(); // object for 7 segments, 4 visbible digits, Colon digit. E.g. Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack +//Noiasca_ht16k33_hw_7 display = Noiasca_ht16k33_hw_7(); // object for 7 segments, 8 digits +//Noiasca_ht16k33_hw_14_4 display = Noiasca_ht16k33_hw_14_4(); // object for 14 segments - 4 digits + +const uint16_t wait = 1000; // wait milliseconds between demos + +// Print a number Right aligned, position defines lowest digit. Pre-Zero +void printRightZeroedFrom0to3(int32_t value) +{ + display.print((value / 1000) % 10); + display.print((value / 100) % 10); + display.print((value / 10) % 10); + display.print(value % 10); +} + + +// Print a number Right aligned +// unused digits will be blanked +// if the number doesn't fit into the given space (from startposition to endposition) display a filler +// Parameters: +// value = the number you want to print +// startposition = first digit to be used +// endposition = last digit to be used + +void printRightBlank(int32_t value, uint8_t startposition, uint8_t endposition) +{ + uint8_t needed = neededDigits(value); + uint8_t available = endposition - startposition + 1; + display.setCursor(startposition); + if (available - needed < 0) + { + Serial.print (value); Serial.println(F(" is to large to display on defined digits")); + for (uint8_t i = 0; i < (available); i++) + { + display.print(F("o")); // blank out the display + } + } + else + { + display.setCursor(startposition); + for (uint8_t i = 0; i < (available - needed); i++) + { + display.print(F(" ")); // print fillers on unused digits, deletes rests of old number + } + if (value < 0) // care about signed values + { + display.print(F("-")); + value = value * -1; + } + display.print(value); + } +} + + +// return the needed digits for a number +// Parameters: +// value = the number you want to analyze +// Return: +// the digits of the given value +uint8_t neededDigits(int32_t value) { + byte digit = 1; + if (value >= 0) { + value = -value; + digit--; + } + switch (value) { + case -2147483648 ... -1000000000: digit++; + case -999999999 ... -100000000: digit++; + case -99999999 ... -10000000: digit++; + case -9999999 ... -1000000: digit++; + case -999999 ... -100000: digit++; + case -99999 ... -10000: digit++; + case -9999 ... -1000: digit++; + case -999 ... -100: digit++; + case -99 ... -10: digit++; + case -9 ... 0: digit++; + default: break; + } + return digit; +} + + +void setup() { +#ifndef __AVR_ATtiny85__ + Serial.begin(115200); + Serial.println("Format Number Printing"); +#endif + Wire.begin(); // start the I2C interface + Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices. deactivate this row. + display.begin(0x70); + if (display.isConnected()) // check if all HT16K33 are connected + Serial.println(F("I: display connected")); + else + Serial.println(F("E: display error")); + display.clear(); + printRightZeroedFrom0to3(123); // print a number right aligned using all digits from 0 to 3 + delay(wait); + + display.clear(); + printRightBlank(45, 1, 2); + delay(wait); + + display.clear(); + printRightBlank(67, 0, 3); + delay(wait); +} + + +void loop() { + display.clear(); + for (int16_t counter = -110; counter < 1010; counter++) { + printRightBlank(counter, 1, 3); // print a number right aligned from digit 1 to 3 + delay(10); + } +} diff --git a/lib/NoiascaHt16k33/examples/20_Multidisplay/20_Multidisplay.ino b/lib/NoiascaHt16k33/examples/20_Multidisplay/20_Multidisplay.ino new file mode 100644 index 0000000000..0400819068 --- /dev/null +++ b/lib/NoiascaHt16k33/examples/20_Multidisplay/20_Multidisplay.ino @@ -0,0 +1,123 @@ +/******************************************************************************* + Multidisplay + Noiasca HT16K33 + + You can easily handle more than one display in different configuration with one Library + + The example will handle: + - One Adafruit 4 Digit Display + - A chain of two alphanumerical displays with 4 digts each for a total of 8 digits. + - One single 4 digit alphanumeric display + + Based on "Blink Without Delay" this sketch uses NO DELAYS in the loop(). The loop() runs non blocking code! + + by noiasca + Sketch Version 2020-09-19 + + *******************************************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +Noiasca_ht16k33_hw_7_4_c display7 = Noiasca_ht16k33_hw_7_4_c(); // 7 Segment, 4 visbible digits, colon digit +Noiasca_ht16k33_hw_14_4 displayA = Noiasca_ht16k33_hw_14_4(); // 14 segments, 4 digits +Noiasca_ht16k33_hw_14_4 displayB = Noiasca_ht16k33_hw_14_4(); // 14 segments, 4 digits + +// just a simple counter +void tick_animation7() +{ + const uint16_t intervall = 100; // intervall of updates + static uint32_t previousMillis; // is static, because we need the value the next time when we call the function again, WITHOUT the need of a global variable + static uint16_t counter; // static, as we want to keep the counter from to call without a global variable + if (millis() - previousMillis > intervall) // check, if it is time to do something + { + display7.setCursor(0); // goto position 0 + display7.print(counter); // print the counter + counter++; // increase coutner for the next call + if (counter > 9999) + { counter = 0; // care about the rollover + display7.clear(); // clear display + } + previousMillis = millis(); // remember the current time + } +} + +// show messages on display +void tick_animationA() +{ + const uint16_t intervall = 1500; + static uint32_t previousMillis; + static uint16_t counter; + // 12345678 12345678 12345678 12345678 12345678 + const char *myText[] = {"Lets see", "what is ", "new to ", " this ", "Example.", + "You can ", "add more", "Messages", "in the ", "Sketch. ", + "Just see", "how many", " Bytes ", "RAM are ", "Free. ", + "Update ", " Modify ", " or ", " Delete ", "Messages", + "Have fun", "REGARDS ", " noiasca" // no comma after last message + }; + if (millis() - previousMillis > intervall) + { + const uint8_t messages = sizeof(myText) / sizeof(myText[0]); // this will count the definied messages, so we don't have to define the number of messages manually ;-) + // Serial.print (counter); Serial.print(F(" ")); Serial.println(myText[counter]); + displayA.clear(); + displayA.print(myText[counter]); + displayA.write(counter); + counter++; + if (counter >= messages) counter = 0; + previousMillis = millis(); + } +} + +// show all printable characters +void tick_animationB() +{ + const uint16_t intervall = 700; + static uint32_t previousMillis; + static uint16_t counter = 32; + if (millis() - previousMillis > intervall) + { + displayB.clear(); + displayB.print(counter); + displayB.write(counter); + counter++; + if (counter > 127) counter = 32; + previousMillis = millis(); + } +} + + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\nMultidisplay: 3 independent Display consisting of 4 HT16K33")); + Wire.begin(); // start the I2C interface + Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices. deactivate this row. + display7.begin(0x70); // I2C adress of first display, total number of devices + displayA.begin(0x71, 2); // I2C adress of first display, two devices, means, we are using 0x71 and 0x72 as "one" display + displayB.begin(0x73); // I2C adress of first display, total number of devices + + if (display7.isConnected() == false) // check if all HT16K33 are connected + Serial.println(F("E: display7 error")); + if (displayA.isConnected() == false) // check if all HT16K33 are connected + Serial.println(F("E: displayA error")); + if (display7.isConnected() == false) // check if all HT16K33 are connected + Serial.println(F("E: displayB error")); + + Serial.println(F("ON Test")); + display7.print(F("1.234")); + displayA.print(F("2 Module")); + displayB.print(F("ABCD")); + delay(2000); + + display7.clear(); + displayA.clear(); + displayB.clear(); + Serial.println(F("now, each Display shows it's own animation...")); +} + + +void loop() { + // put your main code here, to run repeatedly: + tick_animation7(); + tick_animationA(); + tick_animationB(); +} diff --git a/lib/NoiascaHt16k33/examples/21_scrolltext/21_scrolltext.ino b/lib/NoiascaHt16k33/examples/21_scrolltext/21_scrolltext.ino new file mode 100644 index 0000000000..20462b2991 --- /dev/null +++ b/lib/NoiascaHt16k33/examples/21_scrolltext/21_scrolltext.ino @@ -0,0 +1,52 @@ +/******************************************************************************* + Scrolltext + Noiasca HT16K33 + + The extended class can scroll text (from left to right) + + The example will handle: + - A chain of three alphanumerical displays with 4 digts each for a total of 12 digits. + + The loop() mut run without blocking code, otherwise the scrolling text will be blcoked also + + by noiasca + Sketch Version 2022-02-28 + + *******************************************************************************/ + +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +Noiasca_ht16k33_hw_14_ext display = Noiasca_ht16k33_hw_14_ext(); // 14 segment, extended class with scroll support + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\nScroll a text")); + Wire.begin(); // start the I2C interface + //Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices deactivate this row. + display.begin(0x70, 3); // I2C adress of first display, in total we use 3 displays + if (display.isConnected() == false) // check if all HT16K33 are connected + Serial.println(F("E: display error")); + display.setDigits(4); // if your modules are not using all 8 digits, reduce the used digits + Serial.println(F("ON Test")); + display.print(F("3 Modules on")); // just some "on" test + delay(2000); + + Serial.println(F("now, each display shows it's own animation...")); + display.setScrolltext("THIS IS OUR FIRST SCROLLTEXT. LOOKS NICE. noiasca"); // this text will be scrolled + + // more examples how to scroll content: + // display.setScrolltext("SHORTY"); // scroll text can be very short also + // display.setScrolltext(1234567890); // scroll a (long) number + // display.setScrolltext(123.456); // floats will be fixed to 2 decimals. + + // display.setScrollInterval(300); // sets the scroll speed + // display.setScrollWait(5000); // sets the wait/timeout after all letters are scrolled to the display +} + + +void loop() { + // put your main code here, to run repeatedly: + display.scroll(); //needs to be called for updating the scroll text +} diff --git a/lib/NoiascaHt16k33/examples/23_clock_14segment_ds3231/23_clock_14segment_ds3231.ino b/lib/NoiascaHt16k33/examples/23_clock_14segment_ds3231/23_clock_14segment_ds3231.ino new file mode 100644 index 0000000000..d8d6ae7023 --- /dev/null +++ b/lib/NoiascaHt16k33/examples/23_clock_14segment_ds3231/23_clock_14segment_ds3231.ino @@ -0,0 +1,135 @@ +/******************************************************************************* + Clock example using 14 segment displays & DS3231 real-time clock. + + Needed hardware + - one chains of two alphanumerical displays with 8 digts total of 16 digits. + - a realtime clock DS3231 + + The software: + - the sketch uses only basic I2C communication to read the DS3231 time + - no dedicated RTClib needed + - the loop() must run without blocking code, otherwise blinking of seconds will not work + - it simulates one row of the "Time Circuit Display" from Back to the Future. + + by noiasca + Sketch Version 2020-06-06 + + *******************************************************************************/ +#include // needed for the DS3231 and HT16K33 +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + + +const uint8_t DS3231_I2C_ADDRESS = 0x68; // I2C address of the DS3231 +Noiasca_ht16k33_hw_14 display = Noiasca_ht16k33_hw_14(); // 14 segment - Present time + +// Define the clock style: +// 0 European continantial style DD. MMM YYYY HH.MM +// 1 anglo-american style MMM DD YYYY HH.MM +#define CLOCK_STYLE 0 + +void updatePresentTime() +{ + static uint16_t intervall = 60000; // we only check each n milliseconds the rtc + static uint32_t previousMillis = -intervall; // this initial value will force an update of the display on the first call + const uint16_t intervallBlink = 1000; // blink frequency of time dot + static uint32_t previousMillisBlink = 0; + static byte previousMinute; // needed for check if new print is necessary + static byte previousHour; // needed for blinking the time dot + if (millis() - previousMillis > intervall) + { + //Serial.println(F("D46 check time")); + byte second = 0, minute = 0, hour = 0, dayOfWeek, dayOfMonth = 1, month = 1, year = 0; + readDS3231time(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year); // retrieve data from DS3231 + Serial.print(hour); Serial.print(F(":")); Serial.print (minute); Serial.print(F(":")); Serial.println(second); + if (minute != previousMinute) + { + //Serial.println(F("D52 new minute")); +#if CLOCK_STYLE == 0 + // 0 Clock in European continantial style DD. MMM YYYY HH.MM + const char *monthName[] = {"JAN", "FEB", "MAR", "APR", "MAI", "JUN", "JUL", "AUG", "SEP", "OKT", "NOV", "DEZ"}; // German month names + display.clear(); + if (dayOfMonth < 10) display.print(F("0")); + display.print(dayOfMonth); + display.print(F(". ")); + display.print(monthName[month - 1]); + display.print(F(" ")); + display.print(2000 + year); + display.print(F(" ")); + if (hour < 10) display.print(F("0")); + display.print(hour); + display.print(F(".")); + if (minute < 10) display.print(F("0")); + display.print(minute); +#else + // 1 Clock in anglo-american style MMM DD YYYY HH.MM + const char *monthName[] = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}; // English month names + display.clear(); + display.print(monthName[month - 1]); + if (dayOfMonth < 10) display.print(F(" ")); + display.print(dayOfMonth); + display.print(F(" ")); + display.print(2000 + year); + display.print(F(" ")); + byte hourDisplay = hour; + if (hour > 12) hourDisplay = hour - 12; + if (hourDisplay < 10) display.print(F("0")); + display.print(hourDisplay); + display.setCursor(14); + if (minute < 10) display.print(F("0")); + display.print(minute); +#endif + previousHour = hour; + previousMinute = minute; + //Serial.print(F("Temp ")); Serial.println(getDS3231temp()); // The DS3231 has a temperature compensation. You can retrive the temperature from the DS3231. + } + intervall = (60 - second) * 1000; // adopt intervall depending on the time to next minute + previousMillis = millis(); + } +#if CLOCK_STYLE == 0 + if (millis() - previousMillisBlink > intervallBlink) + { + // blink the dot between HH and MM + display.setCursor(13); + display.print(previousHour % 10); // we need to reprint the Hour with or without a dot + if ((millis() / intervallBlink ) % 2) + display.print(F(".")); + previousMillisBlink = millis(); + } +#else + if (millis() - previousMillisBlink > intervallBlink) + { + // blink a - between HH and MM + display.setCursor(13); + if ((millis() / intervallBlink ) % 2) + display.print(F("-")); + else + display.print(F(" ")); + previousMillisBlink = millis(); + } +#endif +} + + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\nTime Circuits Display")); + Wire.begin(); // start the I2C interface + Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices. deactivate this row. + display.begin(0x70, 2); // I2C adress of the first green display, 2 modules needed for 16 characters + if (display.isConnected() == false) // check if all HT16K33 are connected + Serial.println(F("E: display error")); + display.clear(); + // ss mm hh w dd mm yy + //setDS3231datetime(00, 56, 9, 7, 12, 10, 19); // set the time once + Serial.println(F("ON Test")); + display.print(F(" PRESENT TIME ")); + delay(2000); + Serial.println(F("now, display shows it's own animation...")); +} + + +void loop() { + // put your main code here, to run repeatedly: + updatePresentTime(); +} diff --git a/lib/NoiascaHt16k33/examples/23_clock_14segment_ds3231/rtc.ino b/lib/NoiascaHt16k33/examples/23_clock_14segment_ds3231/rtc.ino new file mode 100644 index 0000000000..ca1fc90c9d --- /dev/null +++ b/lib/NoiascaHt16k33/examples/23_clock_14segment_ds3231/rtc.ino @@ -0,0 +1,99 @@ +/* ******************************************************************* + Real Time Clock + Datasheet: https://datasheets.maximintegrated.com/en/ds/DS3231.pdf + ***************************************************************** */ + +byte decToBcd(byte val) +{ + // Convert normal decimal numbers to binary coded decimal + return ( (val / 10 * 16) + (val % 10) ); +} + + +byte bcdToDec(byte val) +{ + // Convert binary coded decimal to normal decimal numbers + return ( (val / 16 * 10) + (val % 16) ); +} + + +void setDS3231time(byte second, byte minute, byte hour) +{ + // sets time to DS3231 + Wire.beginTransmission(DS3231_I2C_ADDRESS); + Wire.write(0); // set next input to start at the seconds register + Wire.write(decToBcd(second)); // set seconds + Wire.write(decToBcd(minute)); // set minutes + Wire.write(decToBcd(hour)); // set hours + Wire.endTransmission(); +} + + +void setDS3231datetime(byte second, byte minute, byte hour, byte dayOfWeek, byte dayOfMonth, byte month, byte year) +{ + // sets time and date data to DS3231 + Wire.beginTransmission(DS3231_I2C_ADDRESS); + Wire.write(0); // set next input to start at the seconds register + Wire.write(decToBcd(second)); // set seconds + Wire.write(decToBcd(minute)); // set minutes + Wire.write(decToBcd(hour)); // set hours + Wire.write(decToBcd(dayOfWeek)); // set day of week (1=Sunday, 7=Saturday) + Wire.write(decToBcd(dayOfMonth)); // set date (1 to 31) + Wire.write(decToBcd(month)); // set month + Wire.write(decToBcd(year)); // set year (0 to 99) + Wire.endTransmission(); +} + + +void readDS3231time(byte *second, byte *minute, byte *hour, byte *dayOfWeek, byte *dayOfMonth, byte *month, byte *year) +{ + Wire.beginTransmission(DS3231_I2C_ADDRESS); + Wire.write(0); // set DS3231 register pointer to 00h + Wire.endTransmission(); + byte datalen = 7; + Wire.requestFrom(DS3231_I2C_ADDRESS, datalen); // request seven bytes of data from DS3231 starting from register 00h + if (Wire.available()) { + *second = bcdToDec(Wire.read() & 0b01111111); // 0x00 seconds + *minute = bcdToDec(Wire.read() & 0b01111111); // 0x01 minutes + *hour = bcdToDec(Wire.read() & 0b00111111); // 0x02 hours + *dayOfWeek = bcdToDec(Wire.read() & 0b00000111); // 0x03 "day" in the datasheet + *dayOfMonth = bcdToDec(Wire.read() & 0b00111111); // 0x04 "date" in the datasheet + *month = bcdToDec(Wire.read() & 0b00011111); // 0x05 month + *year = bcdToDec(Wire.read()); // 0x06 year + } + else + { + Serial.println(F("\nE071 no data from DS3231")); + } +} + + +// set the initial time here: +// DS3231 seconds, minutes, hours, day, date, month, year +// ss mm hh w dd mm yy +// setDS3231datetime(00,32,20,3,24,11,15); // set once time and date +// setDS3231time(0,51,19); // if necessaray set the time + +float getDS3231temp() +{ + float temp3231 = 0; + int8_t tMSB; // according datasheet MSB has sign, therefore we are using signed variable + byte tLSB; + Wire.beginTransmission(DS3231_I2C_ADDRESS); + Wire.write(0x11); //temp registers (11h-12h) get updated automatically every 64s + Wire.endTransmission(); + byte datalen = 2; + Wire.requestFrom(DS3231_I2C_ADDRESS, datalen); + if (Wire.available()) + { + tMSB = Wire.read(); // 2's complement int portion + tLSB = Wire.read(); // fraction portion + temp3231 = tMSB; // includes sign, therefore NO bitmask + temp3231 += ((tLSB >> 6) * 0.25 ); // only care about bits 7 & 8 + } + else + { + Serial.println(F("\nE102 no data from DS3231")); + } + return temp3231; +} diff --git a/lib/NoiascaHt16k33/examples/90_development_tests/90_development_tests.ino b/lib/NoiascaHt16k33/examples/90_development_tests/90_development_tests.ino new file mode 100644 index 0000000000..e4ee355da8 --- /dev/null +++ b/lib/NoiascaHt16k33/examples/90_development_tests/90_development_tests.ino @@ -0,0 +1,182 @@ +/******************************************************************************* + Development tests + Noiasca HT16K33 + + This is a sketch I'm using during development and regression testing + + by noiasca + Sketch Version 2020-06-05 + + *******************************************************************************/ +#include // HT16K33 uses I2C, include the Wire Library +#include "NoiascaHt16k33.h" // include the noiasca HT16K33 library - download from http://werner.rothschopf.net/ + +Noiasca_ht16k33_hw_7 display = Noiasca_ht16k33_hw_7(); // 7 segments, 8 digits +//Noiasca_ht16k33_hw_7_4_c display = Noiasca_ht16k33_hw_7_4_c(); // 7 Segment, 4 visbible digits, colon digit +//Noiasca_ht16k33_hw_14 display = Noiasca_ht16k33_hw_14(); // object for 14 segments - 8 digits +//Noiasca_ht16k33_hw_14_4 display = Noiasca_ht16k33_hw_14_4(); // object for 14 segments - 4 digits +//Noiasca_ht16k33_hw_14_ext display = Noiasca_ht16k33_hw_14_ext(); // object for 14 segments - 4 digits + +const uint16_t wait = 500; // wait milliseconds between demos + +void setup() { + // put your setup code here, to run once: + Serial.begin(115200); + Serial.println(F("\n90 development tests")); + Wire.begin(); // start the I2C interface + Wire.setClock(400000); // optional: activate I2C fast mode. If it is to fast for other I2C devices. deactivate this row. + + /* + display7.begin(0x70); + display7.clear(); + display7.print(F("1.234")); + //display7.showColon(1); // show colon on 7 segment display + //display7.blinkRate(HT16K33_BLINK_HALFHZ); + delay(wait); + display7.clear(); + display7.print(F("8888")); + */ + + display.begin(0x71); // I2C address of first display, optional total number of devices + display.isConnected() ? Serial.println(F("I: display connected")) : Serial.println(F("E: display error")); + + Serial.println(F("ON Test")); + display.clear(); + display.print(F("ALFABETADELT")); // if the text is to long or your display (chain) you will only see the last letters + delay(wait); delay(wait); + + Serial.println(F("Set brightness")); + display.setBrightness(5); // set brightness from 0 to 15 + + Serial.println(F("all segments of first 4 digits on first device")); + display.clear(); + display.write(127); + display.write(127); + display.write(127); + display.write(127); + delay(wait); + + /* + Serial.println(F("Print a number")); + display.clear(); + display.print(1234); + delay(wait); + + Serial.println(F("Blink display")); + display.clear(); + display.blinkRate(HT16K33_BLINK_2HZ); + display.print(F("BLIN")); + delay(wait); delay(wait); delay(wait); + display.blinkRate(HT16K33_BLINK_OFF); + + Serial.println(F("Print a float")); + display.clear(); + display.print(5.67); + delay(wait); + + Serial.println(F("Print text with dots")); + display.clear(); + display.print(F("5.6.7.8.")); + delay(wait); + + //display7.showColon(0); + + */ +} + + +void loop() { + // put your main code here, to run repeatedly: + testOnOff(); +} + + +void testOnOff() +{ + //display.home(); //4438 422 + display.clear(); // 4438 422 + Serial.println(F("test On Off")); + Serial.println(F("off")); + display.off(); + display.print(F("off ")); // will not be shown on the display + delay(wait); + + Serial.println(F("new")); + display.println(F("new ")); // will not be shown on the display + delay(wait); + + Serial.println(F("On")); + display.on(); // this will show the last text new + //display.print(F("On ")); + delay(wait * 2); +} + + + +void testBrightness() +{ + Serial.println(F("test brightness")); + for (byte i = 0; i < 16; i++) + { + Serial.println(i); + display.setBrightness(i); // set brightness from 0 to 15 + delay(wait); + } +} + +void testSet() +{ + // just a set of several tests + char data[10]; // we need a small buffer to store a temp result + + Serial.println(F("display fixtext F and a float right aligned")); + display.clear(); + for (float counter = -9; counter < 10; counter = counter + 1.3) + { + int16_t myint = counter * 10; + sprintf(data, "F%2d.%d", myint / 10, abs(myint) % 10); // we split the output into two separte integers + display.print(data); + Serial.println(data); + delay(wait); + } + + /* + Serial.println(F("display fixtext F and a float right aligned on systems like ESP8266 or ESP32 - will NOT work on Arduino UNO/MEGA/NANO ...")); + display.clear(); + for (float counter = -9; counter < 10; counter = counter + 1.3) + { + sprintf(data, "F%3.1f", counter); // 3 total digits (including dot!) + 1 after dot + display.print(data); + Serial.println(data); + delay(wait); + } + */ + + Serial.println(F("display the Fixtext A and an integeger right aligned")); + for (int8_t counter = 123; counter > -12; counter--) { + sprintf(data, "A%3d", counter); + display.print(data); + delay(wait); + } + + Serial.println(F("Printable characters")); + for (uint8_t counter = 32; counter < 128; counter++) { + display.clear(); + display.print(counter); + display.write(counter); + delay(wait); + } + + Serial.println(F("display numbers on display")); + display.clear(); + for (uint16_t counter = 0; counter < 1000; counter++) { + float myvalue = counter; + myvalue = myvalue / 10; + Serial.print(F("\ncounter=")); Serial.println(counter); + Serial.print(F("myvalue=")); Serial.println(myvalue); + //display.clear(); + display.setCursor(0); + display.print(myvalue, 1); + delay(500); + } +} diff --git a/lib/NoiascaHt16k33/keywords.txt b/lib/NoiascaHt16k33/keywords.txt new file mode 100644 index 0000000000..f79a61ebc5 --- /dev/null +++ b/lib/NoiascaHt16k33/keywords.txt @@ -0,0 +1,41 @@ +####################################### +# Syntax Coloring Map For NoiascaHt16K33 +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +Noiasca_ht16k33_hw_14 KEYWORD1 +Noiasca_ht16k33_hw_14_4 KEYWORD1 +Noiasca_ht16k33_hw_14_ext KEYWORD1 +Noiasca_ht16k33_hw_7 KEYWORD1 +Noiasca_ht16k33_hw_7_4_c KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +begin KEYWORD2 +blinkRate KEYWORD2 +clear KEYWORD2 +off KEYWORD2 +on KEYWORD2 +isConnected KEYWORD2 +scroll KEYWORD2 +setBrightness KEYWORD2 +setCursor KEYWORD2 +setDigits KEYWORD2 +setScrolltext KEYWORD2 +setScrollIntervall KEYWORD2 +setScrollWait KEYWORD2 +#writeLowLevel KEYWORD2 + +####################################### +# Constants (LITERAL1) +####################################### + +HT16K33_BLINK_OFF LITERAL1 +HT16K33_BLINK_2HZ LITERAL1 +HT16K33_BLINK_1HZ LITERAL1 +HT16K33_BLINK_HALFHZ LITERAL1 \ No newline at end of file diff --git a/lib/NoiascaHt16k33/library.properties b/lib/NoiascaHt16k33/library.properties new file mode 100644 index 0000000000..d35f6f713c --- /dev/null +++ b/lib/NoiascaHt16k33/library.properties @@ -0,0 +1,9 @@ +name=NoiascaHt16k33 +version=1.2.0 +author=Werner Rothschopf +maintainer=Werner Rothschopf +sentence=A library for the HT16K33 LED display drivers. +paragraph=The library supports multiple daisychained drivers with 7-segment as well 14-segment displays. This version is optimized to print numbers and long text with easy print and println method. Its interface is very similar to the LCD API 1.0 specification. +category=Display +url=http://werner.rothschopf.net/201909_arduino_ht16k33.htm +architectures=* \ No newline at end of file diff --git a/lib/NoiascaHt16k33/src/NoiascaHt16k33.cpp b/lib/NoiascaHt16k33/src/NoiascaHt16k33.cpp new file mode 100644 index 0000000000..881ce45d05 --- /dev/null +++ b/lib/NoiascaHt16k33/src/NoiascaHt16k33.cpp @@ -0,0 +1,457 @@ +/* ******************************************************************* + HT16K33 Library + + by (c) noiasca + + 2024-09-13 fixed decimal point for 7 segment variants + 2022-02-28 fixed typo interval + 2021-11-27 corrected TWCR to 328/2560 only + * ******************************************************************/ +#include "NoiascaHt16k33.h" + +Noiasca_ht16k33::Noiasca_ht16k33() +{} + + +uint8_t Noiasca_ht16k33::begin(uint8_t i2c_addr, uint8_t numDevices /* = 1 */) { + uint8_t result = 0; // 0 = success + _i2c_addr = i2c_addr; + _numDevices = numDevices; + if (_numDevices > 8) _numDevices = 1; +#if HT16K33_DEBUG > 2 + Serial.println(F("D012 begin base")); + //Serial.print(F("D013 numDevices=")); Serial.println(numDevices); +#endif +#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega2560__) + if (TWCR == 0) { + Wire.begin(); // only call when not started before +#if HT16K33_DEBUG >= 2 + Serial.println(F("W019 add Wire.begin() to your setup")); +#endif + } +#endif + for (uint8_t i = _i2c_addr; i < _i2c_addr + _numDevices; i++) + { + Wire.beginTransmission(i); + Wire.write(HT16K33_OSCILATOR_ON); // turn on oscillator + if (Wire.endTransmission()) + { + result = HT16K33_ERR_ADDR; +#if HT16K33_DEBUG > 0 + Serial.print(F("E039 I2C error for adress 0x")); + Serial.println(i, HEX); +#endif + } + blinkRate(HT16K33_BLINK_OFF); + setBrightness(15); // max brightness + } + return result; +} + + +void Noiasca_ht16k33::blinkRate(uint8_t b) { + for (uint8_t i = 0; i < _numDevices; i++) + { + Wire.beginTransmission(_i2c_addr + i); + if (b > 3) b = 0; // turn blink off if not sure + Wire.write(HT16K33_BLINK_CMD | HT16K33_BLINK_DISPLAYON | (b << 1)); + Wire.endTransmission(); + } +} + + +void Noiasca_ht16k33::clear(void) { // Clears displaybuffer and Display (I2C) +#ifdef HT16K33_BUFFERSIZE + for (uint8_t i = 0; i < HT16K33_BUFFERSIZE; i++) { + displaybuffer[i] = 0; + } +#endif + for (uint8_t i = 0; i < _numDevices; i++) + { + Wire.beginTransmission(_i2c_addr + i); + for (uint8_t j = 0; j < 16; j++) { // for all 8 positions per device (16 adresses) + Wire.write(0); + } + Wire.endTransmission(); + } + _currentPosition = 0; +} + + +/* + check if all ICs are responding + return true on success +*/ +bool Noiasca_ht16k33::isConnected() +{ + for (uint8_t i = _i2c_addr; i < _i2c_addr + _numDevices; i++) { + Wire.beginTransmission(i); + if (Wire.endTransmission() != 0) // 0 if something ack's at this address + { +#if HT16K33_DEBUG >= 1 + Serial.print(F("E090 not responding IC 0x")); + Serial.println(i, HEX); +#endif + return false; // exit on first not responding display + } + } + return true; +} + + +/* + turn the display off +*/ +void Noiasca_ht16k33::off(void) +{ + for (uint8_t i = 0; i < _numDevices; i++) + { + Wire.beginTransmission(_i2c_addr + i); + Wire.write(HT16K33_BLINK_CMD); + Wire.endTransmission(); + } +} + + +/* + turn the display on +*/ +void Noiasca_ht16k33::on(void) +{ + blinkRate(HT16K33_BLINK_OFF); +} + + +/* + set the brightness of the display +*/ +void Noiasca_ht16k33::setBrightness(uint8_t b) { + if (b > 15) b = 15; + for (uint8_t i = 0; i < _numDevices; i++) { + Wire.beginTransmission(_i2c_addr + i); + Wire.write(HT16K33_CMD_BRIGHTNESS | b); + Wire.endTransmission(); + } +} + + +/* + set the cursor for the next writing position +*/ +void Noiasca_ht16k33::setCursor(uint8_t newPosition) { // Set the cursor for the next writing position + _currentPosition = newPosition; +} + + +/* + get the cursor for the next writing position +*/ +uint8_t Noiasca_ht16k33::getCursor() { // Get the cursor for the next writing position + return _currentPosition; +} + + +/* + set the number of digits per device +*/ +void Noiasca_ht16k33::setDigits(uint8_t newDigits) +{ + _numDigits = newDigits; +} + + +#ifdef HT16K33_BUFFERSIZE +void Noiasca_ht16k33::writeChar(uint8_t device, uint16_t digit) { // I2C Ausgabe eines Zeichen aus Displaybuffer + device = digit / _numDigits; + uint8_t reg = (digit % _numDigits) * 2; + uint8_t i2c_addr = _i2c_addr + device; + Wire.beginTransmission(i2c_addr); + Wire.write(reg); // Register (uint8_t)digit * 2 + Wire.write(displaybuffer[digit] & 0xFF); // nibble + Wire.write(displaybuffer[digit] >> 8); // nibble + Wire.endTransmission(); +#if HT16K33_DEBUG > 2 + Serial.print(F(" digit=")); Serial.println(digit); + Serial.print(F(" device=")); Serial.println(device); + Serial.print(F("i2c_addr=")); Serial.println(i2c_addr, HEX); + Serial.print(F(" reg=")); Serial.println(reg); + Serial.print(F(" char=")); Serial.println(displaybuffer[digit], BIN); +#endif +} +#endif + + +/* + I2C lowLevel write of a bitmask to the IC to a specific position +*/ +void Noiasca_ht16k33::writeLowLevel(uint8_t position, uint16_t bitmask) { + uint8_t device = position / _numDigits; + uint8_t reg = (position % _numDigits) * 2; + uint8_t i2c_addr = _i2c_addr + device; + Wire.beginTransmission(i2c_addr); + Wire.write(reg); // Register (uint8_t)digit * 2 + Wire.write(bitmask & 0xFF); // nibble + Wire.write(bitmask >> 8); // nibble + Wire.endTransmission(); +#if HT16K33_DEBUG > 2 + Serial.print(F("position=")); Serial.println(position); + Serial.print(F(" device=")); Serial.println(device); + Serial.print(F("i2c_addr=")); Serial.println(i2c_addr, HEX); + Serial.print(F(" reg=")); Serial.println(reg); + Serial.print(F(" bitmask=")); Serial.println(bitmask, BIN); +#endif +} + + +/* ******************************************************************* + generic module 7 SEGMENT OBJECT + * ******************************************************************/ +Noiasca_ht16k33_hw_7::Noiasca_ht16k33_hw_7 () +{ + //public: +} + +uint16_t Noiasca_ht16k33_hw_7::getCharacterBitmap(uint8_t value) { + + if (value > 31 && value < FONTFILE7_MAX_CHAR) // write printable ASCII characters to display + { + return pgm_read_byte_near(charTable + value - 32); // the table starts with the first printable character at 32 + } + return 0u; +} + + +void Noiasca_ht16k33_hw_7::setZeroSlash(bool state) { + return; // _zeroSlash = state; // Ignored for 7-segment +} + + +// general write method for 7 segment +size_t Noiasca_ht16k33_hw_7::write(uint8_t value) { + if (value == '.' || value == ',' || value == ':' || value == ';') // dots need a special handling + { +#ifdef HT16K33_BUFFERSIZE + displaybuffer[_lastPosition] = displaybuffer[_lastPosition] | SEG_DP; +#endif + _lastBitmap = _lastBitmap | SEG_DP; + writeLowLevel(_lastPosition, _lastBitmap); + } + else if (value > 31 && value < FONTFILE7_MAX_CHAR) // write printable ASCII characters to display + { + _lastBitmap = pgm_read_byte_near(charTable + value - 32); // the table starts with the first printable character at 32 +#ifdef HT16K33_BUFFERSIZE + displaybuffer[_currentPosition] = _lastBitmap; +#endif + _lastPosition = _currentPosition; + writeLowLevel(_currentPosition, _lastBitmap); + _currentPosition++; + if (_hasColonDigit && _currentPosition == 2) _currentPosition = 3; // colon MISSING: auch für die vielfachen Positionen!!! + if (_currentPosition >= _numDigits * _numDevices) _currentPosition = 0; + } + return 1; // assume sucess +} + + +// activates/deactivtes a separate colon digit +void Noiasca_ht16k33_hw_7::setColonDigit(uint8_t activate) +{ + _hasColonDigit = activate; +} + + +/* ******************************************************************* + 7 SEGMENT 4 Digits no digitalpoint, and colon digit + * ******************************************************************/ + +Noiasca_ht16k33_hw_7_4_c::Noiasca_ht16k33_hw_7_4_c() +{ + _numDigits = 5; // In fact the display has 5 digits but only 0 1 3 4 are visible. 2 is used for the colon Digit + _hasColonDigit = 1; +} + + +void Noiasca_ht16k33_hw_7_4_c::showColon(bool colon) +{ + for (uint8_t i = 0; i < _numDevices; i++) { + showColon(i, colon); + } +} + + +void Noiasca_ht16k33_hw_7_4_c::showColon(uint8_t device, bool colon) +{ + Wire.beginTransmission(_i2c_addr + device); + Wire.write((uint8_t)0x04); // start at address $02 + if (colon) + Wire.write((uint8_t)0x2); + else + Wire.write((uint8_t)0); + Wire.write((uint8_t)0); + Wire.endTransmission(); +} + + +/* ******************************************************************* + 14 SEGMENT generic + * ******************************************************************/ +Noiasca_ht16k33_hw_14::Noiasca_ht16k33_hw_14() +{} + +uint16_t Noiasca_ht16k33_hw_14::getCharacterBitmap(uint8_t value) { + + if (value > 31 && value < FONTFILE14_MAX_CHAR) // write printable ASCII characters to display + { + return pgm_read_word_near(charTable14 + value - 32); // the table starts with the first printable character at 32 + } + return 0u; +} + + +void Noiasca_ht16k33_hw_14::setZeroSlash(bool state) { + _zeroSlash = state; +} + + +size_t Noiasca_ht16k33_hw_14::write(uint8_t value) { + if (value == 35) value = 127; // MISSING: I don't remember why this is of any sence. This mapping costs 6 byte. DEPRECATED + //if (value==167 || value == 248) value = 42; // degree + //if (value==219) value = 127 // all segements + + if (value == '.' || value == ',' || value == ':' || value == ';') // dots need a special handling + { +#ifdef HT16K33_BUFFERSIZE + displaybuffer[_lastPosition] = displaybuffer[_lastPosition] | SEG14_DP; +#endif + _lastBitmap = _lastBitmap | SEG14_DP; + writeLowLevel(_lastPosition, _lastBitmap); + } + else if (value > 31 && value < FONTFILE14_MAX_CHAR) // write printable ASCII characters to display + { + _lastBitmap = pgm_read_word_near(charTable14 + value - 32); // the table starts with the first printable character at 32 + if (_zeroSlash && ('0' == value)) { + _lastBitmap |= (SEG14_M | SEG14_N); + } +#ifdef HT16K33_BUFFERSIZE + displaybuffer[_currentPosition] = _lastBitmap; +#endif + _lastPosition = _currentPosition; + writeLowLevel(_currentPosition, _lastBitmap); + _currentPosition++; + if (_currentPosition >= _numDigits * _numDevices) _currentPosition = 0; + } + // Serial.write(value); + // Serial.print(F("Noiasca write: ")); + // Serial.println(value); + return 1; // assume sucess +} + + +/* ******************************************************************* + 14 segment 4 digits, digitalpoint + * ******************************************************************/ +Noiasca_ht16k33_hw_14_4::Noiasca_ht16k33_hw_14_4() +{ + _numDigits = 4; +} + + +/* ******************************************************************* + 14 segment extend class with scroll support + * ******************************************************************/ +Noiasca_ht16k33_hw_14_ext::Noiasca_ht16k33_hw_14_ext() +{} + + +uint32_t Noiasca_ht16k33_hw_14_ext::scroll() // the "tick" method for scrolling text +{ + if (millis() - previousMillis > interval) + { + const uint8_t textLength = strlen(myText); + //Serial.print(F("textLength=")); Serial.println(textLength); + const uint8_t displayLength = _numDigits * _numDevices; // das soll woanders her... ein getter??? + if (millis() - previousMillis > interval) + { + char buffer[displayLength + 2]; + if (counter < displayLength && counter < textLength + 1) // Step 1: print text at right end of display - scroll from right to left + { + clear(); + setCursor(displayLength - counter); + strlcpy(buffer, myText, counter + 1); + print(buffer); +#if HT16K33_DEBUG > 2 + Serial.print(counter); Serial.print(" "); Serial.println(buffer); +#endif + } + else if (counter < textLength + 1) // Step 3: print text on full display + { + strlcpy(buffer, myText + (counter - displayLength), displayLength + 1); + clear(); + print(buffer); +#if HT16K33_DEBUG > 2 + Serial.print(counter); Serial.print(" "); Serial.println(buffer); +#endif + } + if (counter > textLength) //Step 3: A extra delay at the end of the text + { + if (millis() - previousMillis > wait) + { + counter = 1; + rounds++; + previousMillis = millis(); + } + } + else + { + counter++; + previousMillis = millis(); + } + } + } + return rounds; +} + + +void Noiasca_ht16k33_hw_14_ext::setScrollInterval(uint16_t newInterval) +{ + if (newInterval < 100) interval = 100; else interval = newInterval; +} + + +void Noiasca_ht16k33_hw_14_ext::setScrollWait(uint16_t newWait) +{ + if (newWait >= interval) wait = newWait; +} + + +void Noiasca_ht16k33_hw_14_ext::setScrolltext(const char *newText) +{ + strlcpy(myText, newText, scrollBufferSize); + rounds = 0; +#if HT16K33_DEBUG > 2 + Serial.println(myText); +#endif +} + + +void Noiasca_ht16k33_hw_14_ext::setScrolltext(int32_t myNumber) +{ + char newText[12]; + ltoa(myNumber, newText, 10); + strlcpy(myText, newText, scrollBufferSize); + rounds = 0; +#if HT16K33_DEBUG > 2 + Serial.println(myText); +#endif +} + + +void Noiasca_ht16k33_hw_14_ext::setScrolltext(double myNumber) // this will scroll a float +{ + char newText[8]; // Buffer big enough for 7-character float + dtostrf(myNumber, 6, 2, newText); // Leave room for too large numbers! + strlcpy(myText, newText, scrollBufferSize - 1); + rounds = 0; // resets enables to keep external track of how often the text was scrolled already +#if HT16K33_DEBUG > 2 + Serial.println(myText); +#endif +} diff --git a/lib/NoiascaHt16k33/src/NoiascaHt16k33.h b/lib/NoiascaHt16k33/src/NoiascaHt16k33.h new file mode 100644 index 0000000000..ad5ac42d37 --- /dev/null +++ b/lib/NoiascaHt16k33/src/NoiascaHt16k33.h @@ -0,0 +1,372 @@ +/* ******************************************************************* + HT16K33 Library + + copyright (c) noiasca + + Version 1.2.0 2024-09-13 + + History: + 2021-03-14 extract fonts in separate file + 2020-06-05 on(), off() + 2020-06-04 Wire.begin() must be called in the user sketch. A simple hook to catch on AVR platform is implemented + 2020-09-19 fix for ESP8266 + * ******************************************************************/ + + /*! + + \mainpage Some words to the Noiasca HT16K33 Library + + \section intro_sec Introduction + The "Noiasca HT16K33 Library" is an Arduino Library to control + HT16K33 based seven segment and 14 segment LED displays. + + The library inherits from Print.h and therefore supports the very common interface you know from other display libraries. + Additionally the interface is very close to the so called LCD API 1.0 + + \section example_sec Examples + There are several examples please use the hello world for the beginning. + + \section install_sec Install the library + Download the library from http://werner.rothschopf.net/201909_arduino_ht16k33.htm + + In the Arduino IDE use the Menu
    + Sketch / Include Library / Add .ZIP Library
    + to install the library. + */ + +#pragma once +#include +#include +#include + +#if defined(__AVR__) +#include +#elif defined(ESP8266) +#include +#endif + +/* ******************************************************************* + Settings + * ******************************************************************/ + +#define HT16K33_DEBUG 0 // Library debug messages: 0 off 1 important/error 2 warning 3 info/debug (mode 1 costs about 230 byte) +//#define HT16K33_BUFFERSIZE 8 * 8 // currently the bitmap Buffer is not needed. Could be used for scrolling text. + +/* ******************************************************************* + HW Definitions of a bitmask for each LED segment: + * ******************************************************************/ +// 7 Segment +// This is the most common segment definition +// match LED segment of display to hardware +// .GFEDCBA +const uint8_t SEG_A = 0b00000001; +const uint8_t SEG_B = 0b00000010; +const uint8_t SEG_C = 0b00000100; +const uint8_t SEG_D = 0b00001000; +const uint8_t SEG_E = 0b00010000; +const uint8_t SEG_F = 0b00100000; +const uint8_t SEG_G = 0b01000000; +const uint8_t SEG_DP = 0b10000000; + +// 14 segment +// .PONMLKHGFEDCBA +const uint16_t SEG14_A = (1<<0); +const uint16_t SEG14_B = (1<<1); +const uint16_t SEG14_C = (1<<2); +const uint16_t SEG14_D = (1<<3); +const uint16_t SEG14_E = (1<<4); +const uint16_t SEG14_F = (1<<5); +const uint16_t SEG14_G = (1<<6); +const uint16_t SEG14_H = (1<<7); +const uint16_t SEG14_K = (1<<8); +const uint16_t SEG14_L = (1<<9); +const uint16_t SEG14_M = (1<<10); +const uint16_t SEG14_N = (1<<11); +const uint16_t SEG14_O = (1<<12); +const uint16_t SEG14_P = (1<<13); +const uint16_t SEG14_DP = (1<<14); + +/* ******************************************************************* + Fonts + Beginning with Version 1.0.3 the fonts are extracted to separate files + if you don't like the existing characters duplicate the file, rename it and + include your modified file instead. + The concept how to include separte files might change in a newer version + * ******************************************************************/ + +//extern const uint8_t charTable7[]; // tbc https://forum.arduino.cc/index.php?topic=659107.0 +//extern const uint16_t charTable14[]; + +#ifndef FONTFILE7 +#include "fonts/font7legacy.h" +#endif + +#ifndef FONTFILE14 // include exact ONE 14 segment font +//#include "fonts/font14legacy.h" +#include "fonts/font14default.h" +//#include "fonts/font14netherlands.h" +#endif + +/* ******************************************************************* + no need to change something below here + * ******************************************************************/ +#define HT16K33_OSCILATOR_ON 0x21 // System Setup Register 0x20 + 0x01 +#define HT16K33_CMD_BRIGHTNESS 0xE0 // Dimming set (Datasheet says EF, but this is just with the set bits D12-D8 for full brightness +#define HT16K33_BLINK_CMD 0x80 // Display Setup - blink and on/off +#define HT16K33_BLINK_DISPLAYON 0x01 +#define HT16K33_BLINK_OFF 0 +#define HT16K33_BLINK_2HZ 1 +#define HT16K33_BLINK_1HZ 2 +#define HT16K33_BLINK_HALFHZ 3 +//#define HT16K33_KEYDATA 0x40 // Key data Adress pointer - unused +//#define HT16K33_INTFLAG 0x60 // INT flag Adress pointer - unused +//#define HT16K33_ROWINT 0xA0 // ROW/INT set - unused +//#define HT16K33_TESTMODE 0xD9 // Testmode - unused + +// Error Codes +#define HT16K33_ERR_ADDR _BV(2) // chip not responding at adress 0b00000100 = 4 +//#define HT16K33_ERR_CHIP _BV(3) // chip signature or a specific register doesn't fit + +/* ******************************************************************* + Classes + * ******************************************************************/ + +/** \brief Base class for all HT16K33 displays + + This is an (abstract) class used as base for all implementations + It holds all common variables and member functions. + If you create your instance (your object), don't use this base class but one of implementations + \see Noiasca_ht16k33_hw_7 + \see Noiasca_ht16k33_hw_7_4_c + \see Noiasca_ht16k33_hw_14 + \see Noiasca_ht16k33_hw_14_4 + \see Noiasca_ht16k33_hw_14_ext +*/ + class Noiasca_ht16k33 : public Print{ // Base class for all HT16K33 displays + public: + Noiasca_ht16k33(void); + /** + \brief initialise hardware + + Put this method in your setup + \param i2c_addr the I2C address of the display + \param numDevices the number of used devices + \returns 0 on success + */ + uint8_t begin(uint8_t i2c_addr, uint8_t numDevices = 1); + + /** + \brief set the blink rate of the display + */ + void blinkRate(uint8_t b); + + /** + \brief Clear the display and place cursor to 0 + + Clears the display and sets the cursor to 0. + */ + void clear(void); + + /** + \brief Turn the display off + */ + void off(void); + + /** + \brief Turn the display on + */ + void on(void); + + /** + \brief check if all ICs are responding + \return true if all ICs are responding + */ + bool isConnected(void); + + /** + \brief set the brightness of the display + \param b new brightness from 0..15 + */ + void setBrightness(uint8_t b); + + /** + \brief set the cursor for the next writing position + \param newPosition the new position for the cursor + */ + void setCursor(uint8_t newPosition); + + /** + \brief get the cursor for the next writing position + */ + uint8_t getCursor(); + + /** + \brief set the number of digits per device + \param newDigits modify the used digits + */ + void setDigits(uint8_t newDigits); + + /** + \brief write to I2C + + I2C lowLevel write of a bitmask to the IC to a specific position + \param position digit to be written to + \param bitmask the bits/segments to be activated as bitmask + */ + void writeLowLevel(uint8_t position, uint16_t bitmask); + //size_t write(uint8_t); // write method is depending on the HW and therefore in the first HW child classes + //using Print::write; +#ifdef HT16K33_BUFFERSIZE + void writeChar(uint8_t device, uint16_t digit); // I2C Ausgabe eines Zeichen aus Displaybuffer +#endif + + virtual uint16_t getCharacterBitmap(uint8_t value); + + virtual void setZeroSlash(bool state); + + // not supported LCD API 1.0 functions + // =================================== + // these function are defined in the LCD API 1.0 API, + // but as this is not a LCD library, these functions are marked as deprecated + // note: only very new versions of gcc support setting warning message + // it breaks on on older versions that shipped with older 1.x IDEs + // so test for gcc 4.5 or greater for better deprecated messages + +#if ( __GNUC__ >= 4) && (__GNUC_MINOR__ >= 5) + inline void __attribute__((deprecated("Use clear() instead"))) + home() {clear();} + inline void __attribute__((deprecated("Use begin() instead"))) + init(uint8_t i2c_addr, uint8_t numDevices = 1) {begin(i2c_addr, numDevices);} +#else + inline void __attribute__((deprecated)) + home() {clear();} + inline void __attribute__((deprecated)) + init(uint8_t i2c_addr, uint8_t numDevices = 1) {begin(i2c_addr, numDevices);} +#endif + + protected: + uint8_t _numDigits = 8; // digits per device + uint8_t _i2c_addr; // base adress of first device (0) + uint8_t _numDevices; // total number of devices +#ifdef HT16K33_BUFFERSIZE + uint16_t displaybuffer[HT16K33_BUFFERSIZE]; // stores printed bitmaps + uint8_t _currentBufferPosition; // current read position in buffer +#endif + uint8_t _currentPosition; // current position of cursor + uint8_t _lastPosition; // last position of cursor + bool _zeroSlash = false; // Apply / to the 0 for readability +}; + +/** \brief class for HT16K33 displays with 7 segment LEDs + + This is for displays with 7 segment LEDs +*/ +class Noiasca_ht16k33_hw_7 : public Noiasca_ht16k33 { // 7 segment display + public: + Noiasca_ht16k33_hw_7(); + /** + activates/deactivtes a separate colon digit + \param activate set to 1 if you want to display the colon + */ + void setColonDigit(uint8_t activate = 1); + size_t write(uint8_t); // write using a byte char table + using Print::write; + uint16_t getCharacterBitmap(uint8_t value); + // using Noiasca_ht16k33::getCharacterBitmap; + void setZeroSlash(bool state); + protected: + uint8_t _hasColonDigit; // is set to 1 if display has a separate colon digit at digit 2 (the third column). Is on this level to have one common .write() method + uint8_t _lastBitmap; // last written bitmap (if we have to reprint for the decimal point) +}; + +/** \brief class for HT16K33 displays with 7 segment LEDs + + This is for displays with 7 segment LEDs, 4 digits and a colon. + For example Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack +*/ +class Noiasca_ht16k33_hw_7_4_c : public Noiasca_ht16k33_hw_7 { // 7 Segment Display with 4 visible Digits and Colon Sign. In fact this display has 5 colons + public: + Noiasca_ht16k33_hw_7_4_c(); + /** + activate the colon digit + \param device the device you want to control the colon + \param colon TRUE will switch on, FALSE will switch off the colon + */ + void showColon(uint8_t device, bool colon); // switch on / off colon for one specific device + void showColon(bool colon); // switch on / off colon for all devices +}; + +/** \brief class for HT16K33 displays with 14 segment LEDs + + This is for displays with up to eight 14 segment LEDs + For example the "HT16K33 AlphaNumeric 0.54" 8-Digit 14 Segment LED I2C Interface" displays from WtihK +*/ +class Noiasca_ht16k33_hw_14 : public Noiasca_ht16k33 { // 14 Segment Display + public: + Noiasca_ht16k33_hw_14(); + size_t write(uint8_t); // write using a word char table (14bit char table) + using Print::write; + uint16_t getCharacterBitmap(uint8_t value); + // using Noiasca_ht16k33::getCharacterBitmap; + void setZeroSlash(bool state); + protected: + uint16_t _lastBitmap; // last written bitmap (if we have to reprint for the decimal point) +}; + +/** \brief class for HT16K33 displays with 14 segment LEDs + + This is for displays with four 14 segment LEDs + For example the Adafruit Quad Alphanumeric Display - 0.54" Digits w/ I2C Backpack +*/ +class Noiasca_ht16k33_hw_14_4 : public Noiasca_ht16k33_hw_14 { // 14 Segment Display with 4 digits only + public: + Noiasca_ht16k33_hw_14_4(); +}; + +/** \brief class for HT16K33 displays with 14 segment LEDs + + This is for displays with up to eight 14 segment LEDs. + This class can be used to scroll the text in the display. +*/ +class Noiasca_ht16k33_hw_14_ext : public Noiasca_ht16k33_hw_14 { + public: + Noiasca_ht16k33_hw_14_ext(); +/** \brief scroll the text + + The tick/run/do method for scrolling text. + Call this function in your loop(). +*/ + uint32_t scroll(); + +/** \brief set scroll interval + + Set the speed of the scroll effect. + \param newInterval speed in milliseconds +*/ + void setScrollInterval(uint16_t newInterval); + +/** \brief set wait time between scrolling + + sets the wait/timeout after all letters are scrolled to the display + \param newWait the new wait time in milliseconds +*/ + void setScrollWait(uint16_t newWait); + +/** \brief set a scrolltext + + sets the new scrolltext to be displayed and scrolled + \param *newText the new text (or number) +*/ + void setScrolltext(const char *newText); + void setScrolltext(int32_t myNumber); + void setScrolltext(double myNumber); // sets a new scrolltext - a float + + private: + uint16_t interval = 400; // shift interval + uint16_t wait = 3000; // wait time after last letter + uint32_t previousMillis = 0; // stores last print out + uint8_t counter = 1; // used as start position + static const uint8_t scrollBufferSize = 65; // maximum size of scroll text + char myText[scrollBufferSize] = {'\0'}; // buffer for the scroll text + uint32_t rounds = 0; // how many scroll overs where already performed with the current scroll text +}; diff --git a/lib/NoiascaHt16k33/src/fonts/font14default.h b/lib/NoiascaHt16k33/src/fonts/font14default.h new file mode 100644 index 0000000000..b70141a6f1 --- /dev/null +++ b/lib/NoiascaHt16k33/src/fonts/font14default.h @@ -0,0 +1,121 @@ +/* ******************************************************************* + HT16K33 Library - Fontfile + copyright (c) noiasca + + Version 2021-03-14 + + This is the default 14 segment font for library Version 1.1.0 from 2021-03-14 + + * ******************************************************************/ + +#pragma once +#define FONTFILE14 default // include that to each fontfile as additional identifier +#ifndef FONTFILE_WAS_INCLUDED +#define FONTFILE_WAS_INCLUDED +#endif +#define FONTFILE14_MAX_CHAR 130 // 129 + 1 + +/* ******************************************************************* + Characterset for 14 segment + * ******************************************************************/ + +const uint16_t charTable14 [] PROGMEM = { + 0, // 32 space + SEG14_B | SEG14_C | SEG14_DP, // ! 33 + SEG14_B | SEG14_L, // " 34 + SEG14_B | SEG14_C | SEG14_D | SEG14_G | SEG14_H | SEG14_L | SEG14_O, // # 35 + SEG14_A | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H | SEG14_L | SEG14_O, // $ 36 + SEG14_A | SEG14_B | SEG14_F | SEG14_G | SEG14_H, // % 37 + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_G | SEG14_K| SEG14_L | SEG14_N, // & 38 still needs improvement + SEG14_L, // ' 39 + SEG14_M | SEG14_P, // ( 40 + SEG14_K | SEG14_N, // ) 41 + SEG14_G | SEG14_H | SEG14_K | SEG14_L | SEG14_M | SEG14_N | SEG14_O | SEG14_P, // * 42 updated + SEG14_G | SEG14_H | SEG14_O | SEG14_L, // + 43 + 0, // , 44 will be handled in the write methode + SEG14_G | SEG14_H, // - 45 updated + 0, // . 46 will be handled in the write methode + SEG14_M | SEG14_N, // / 47 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // 0 48 + SEG14_B | SEG14_C | SEG14_M, // 1 49 + SEG14_A | SEG14_B | SEG14_D | SEG14_E | SEG14_G | SEG14_H, // 2 50 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H, // 3 51 + SEG14_B | SEG14_C | SEG14_F | SEG14_G | SEG14_H, // 4 52 + SEG14_A | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H, // 5 53 + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // 6 54 + SEG14_A | SEG14_M | SEG14_N, // 7 55 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // 8 56 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H, // 9 57 + 0, // : 58 will be handled in the write methode + 0, // ; 59 will be handled in the write methode + SEG14_M | SEG14_P, // < 60 + SEG14_D | SEG14_G | SEG14_H, // = 61 updated + SEG14_K | SEG14_N, // > 62 + SEG14_A | SEG14_B | SEG14_H | SEG14_O | SEG14_DP, // ? 63 + SEG14_D | SEG14_E | SEG14_G | SEG14_O | SEG14_N, // @ 64 + SEG14_A | SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // A 65 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_L | SEG14_O, // B 66 + SEG14_A | SEG14_D | SEG14_E | SEG14_F, // C 67 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_L | SEG14_O, // D 68 + SEG14_A | SEG14_D | SEG14_E | SEG14_F | SEG14_G, // E 69 + SEG14_A | SEG14_E | SEG14_F | SEG14_G, // F 70 + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_H, // G 71 + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // H 72 + SEG14_A | SEG14_D | SEG14_L | SEG14_O, // I 73 + SEG14_B | SEG14_C | SEG14_D | SEG14_E, // J 74 + SEG14_E | SEG14_F | SEG14_G | SEG14_M | SEG14_P, // K 75 + SEG14_D | SEG14_E | SEG14_F, // L 76 + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_K | SEG14_M, // M 77 + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_K | SEG14_P, // N 78 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // O 79 + SEG14_A | SEG14_B | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // P 80 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_P, // Q 81 + SEG14_A | SEG14_B | SEG14_E | SEG14_F | SEG14_G | SEG14_H | SEG14_P, // R 82 + SEG14_A | SEG14_C | SEG14_D | SEG14_H | SEG14_K, // S 83 + SEG14_A | SEG14_L | SEG14_O, // T 84 + SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // U 85 + SEG14_E | SEG14_F | SEG14_M | SEG14_N, // V 86 + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_N | SEG14_P, // W 87 + SEG14_K | SEG14_M | SEG14_N | SEG14_P, // X 88 + SEG14_B | SEG14_F | SEG14_G | SEG14_H | SEG14_O, // Y 89 + SEG14_A | SEG14_D | SEG14_M | SEG14_N, // Z 90 + SEG14_A | SEG14_D | SEG14_E | SEG14_F, // [ 91 + SEG14_K | SEG14_P, /* \ 92 backslash*/ + SEG14_A | SEG14_B | SEG14_C | SEG14_D, // ] 93 + SEG14_A | SEG14_B | SEG14_H | SEG14_G | SEG14_F, // ^ 94 ESPEasy change: ° degree symbol, like P073 7-digit fonts + SEG14_D, // _ 95 underscore + SEG14_K, // ` 96 + SEG14_D | SEG14_E | SEG14_G | SEG14_O, // a 97 + SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_P, // b + SEG14_D | SEG14_E | SEG14_G | SEG14_H, // c + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_N, // d + SEG14_D | SEG14_E | SEG14_G | SEG14_N, // e + SEG14_G | SEG14_H | SEG14_M | SEG14_O, // f updated + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_M, // g + SEG14_E | SEG14_F | SEG14_G | SEG14_O, // h + SEG14_O, // i + SEG14_B | SEG14_C | SEG14_D, // j + SEG14_L | SEG14_M | SEG14_O | SEG14_P, // k + SEG14_L | SEG14_O, // l + SEG14_C | SEG14_E | SEG14_G | SEG14_H | SEG14_O, // m + SEG14_E | SEG14_G | SEG14_O, // n + SEG14_C | SEG14_D | SEG14_E | SEG14_G | SEG14_H, // o + SEG14_A | SEG14_E | SEG14_F | SEG14_G | SEG14_M, // p + SEG14_A | SEG14_B | SEG14_C | SEG14_H | SEG14_K, // q + SEG14_E | SEG14_G, // r + SEG14_D | SEG14_H | SEG14_P, // s + SEG14_D | SEG14_E | SEG14_F | SEG14_G, // t + SEG14_C | SEG14_D | SEG14_E, // u + SEG14_E | SEG14_N, // v + SEG14_C | SEG14_E | SEG14_N | SEG14_P, // w + SEG14_K | SEG14_M | SEG14_N | SEG14_P, // x + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_L, // y updated + SEG14_D | SEG14_G | SEG14_N, // z 122 + SEG14_A | SEG14_D | SEG14_G | SEG14_N | SEG14_K, // { 123 + SEG14_B | SEG14_C, // | 124 + SEG14_A | SEG14_D | SEG14_H | SEG14_P | SEG14_M, // } 125 + SEG14_G, // ~ 126 + SEG14_P | SEG14_O | SEG14_N | SEG14_M | SEG14_L | SEG14_K | SEG14_H | SEG14_G | SEG14_F | SEG14_E | SEG14_D | SEG14_C | SEG14_B | SEG14_A | SEG14_DP, // 127 all Segments (32767) + SEG14_A | SEG14_D | SEG14_N | SEG14_H | SEG14_K, // € 128 Euro (2441) added for ESPEasy + SEG14_A | SEG14_B | SEG14_H | SEG14_G | SEG14_F // ° 129 degree added (227) for ESPEasy () +}; diff --git a/lib/NoiascaHt16k33/src/fonts/font14legacy.h b/lib/NoiascaHt16k33/src/fonts/font14legacy.h new file mode 100644 index 0000000000..d2504a555f --- /dev/null +++ b/lib/NoiascaHt16k33/src/fonts/font14legacy.h @@ -0,0 +1,121 @@ +/* ******************************************************************* + HT16K33 Library - Fontfile + copyright (c) noiasca + + Version 2021-03-14 + + This is the original 14 segment font as of library Version 1.0.2 from 2020-06-07 + + * ******************************************************************/ + +#pragma once +#define FONTFILE14 legacy // include that to each fontfile as additional identifier +#ifndef FONTFILE_WAS_INCLUDED +#define FONTFILE_WAS_INCLUDED +#endif + +/* ******************************************************************* + Characterset for 14 segment + * ******************************************************************/ + +const uint16_t charTable14 [] PROGMEM = { + 0, // 32 space + SEG14_B | SEG14_C | SEG14_DP, // ! 33 + SEG14_B | SEG14_L, // " 34 + 0, // # 35 + SEG14_A | SEG14_C | SEG14_D | SEG14_F | SEG14_G, // $ 36 + SEG14_A | SEG14_B | SEG14_F | SEG14_G | SEG14_H, // % 37 + 0, // & 38 + SEG14_L, // ' 39 + SEG14_M | SEG14_P, // ( 40 + SEG14_K | SEG14_N, // ) 41 + SEG14_G | SEG14_H | SEG14_M | SEG14_P | SEG14_N | SEG14_K, // * 42 + SEG14_G | SEG14_H | SEG14_O | SEG14_L, // + 43 + 0, // , 44 will be handled in the write methode + SEG14_H, // - 45 + 0, // . 46 will be handled in the write methode + SEG14_M | SEG14_N, // / 47 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // 0 48 + SEG14_B | SEG14_C | SEG14_M, // 1 49 + SEG14_A | SEG14_B | SEG14_D | SEG14_E | SEG14_G | SEG14_H, // 2 50 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H, // 3 51 + SEG14_B | SEG14_C | SEG14_F | SEG14_G | SEG14_H, // 4 52 + SEG14_A | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H, // 5 53 + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // 6 54 + SEG14_A | SEG14_M | SEG14_N, // 7 55 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // 8 56 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H, // 9 57 + 0, // : 58 will be handled in the write methode + 0, // ; 59 will be handled in the write methode + SEG14_M | SEG14_P, // < 60 + SEG14_G | SEG14_H, // = 61 + SEG14_K | SEG14_N, // > 62 + SEG14_A | SEG14_B | SEG14_H | SEG14_O | SEG14_DP, // ? 63 + SEG14_D | SEG14_E | SEG14_G | SEG14_O | SEG14_N, // @ 64 + SEG14_A | SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // A 65 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_L | SEG14_O, // B + SEG14_A | SEG14_D | SEG14_E | SEG14_F, // C + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_L | SEG14_O, // D + SEG14_A | SEG14_D | SEG14_E | SEG14_F | SEG14_G, // E + SEG14_A | SEG14_E | SEG14_F | SEG14_G, // F + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_H, // G + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // H + SEG14_A | SEG14_D | SEG14_L | SEG14_O, // I + SEG14_B | SEG14_C | SEG14_D | SEG14_E, // J + SEG14_E | SEG14_F | SEG14_G | SEG14_M | SEG14_P, // K + SEG14_D | SEG14_E | SEG14_F, // L + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_K | SEG14_M, // M + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_K | SEG14_P, // N + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // O + SEG14_A | SEG14_B | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // P + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_P, // Q + SEG14_A | SEG14_B | SEG14_E | SEG14_F | SEG14_G | SEG14_H | SEG14_P, // R + SEG14_A | SEG14_C | SEG14_D | SEG14_H | SEG14_K, // S + SEG14_A | SEG14_L | SEG14_O, // T + SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // U + SEG14_E | SEG14_F | SEG14_M | SEG14_N, // V + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_N | SEG14_P, // W + SEG14_K | SEG14_M | SEG14_N | SEG14_P, // X + SEG14_B | SEG14_F | SEG14_G | SEG14_H | SEG14_O, // Y + SEG14_A | SEG14_D | SEG14_M | SEG14_N, // Z 90 + SEG14_A | SEG14_D | SEG14_E | SEG14_F, // [ 91 + SEG14_K | SEG14_P, /* \ 92 backslash*/ + SEG14_A | SEG14_B | SEG14_C | SEG14_D, // ] 93 + SEG14_F | SEG14_K, // ^ 94 + SEG14_D, // _ 95 underscore + SEG14_K, // ` 96 + SEG14_D | SEG14_E | SEG14_G | SEG14_O, // a 97 + SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_P, // b + SEG14_D | SEG14_E | SEG14_G | SEG14_H, // c + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_N, // d + SEG14_D | SEG14_E | SEG14_G | SEG14_N, // e + SEG14_A | SEG14_E | SEG14_F | SEG14_G, // f + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_M, // g + SEG14_E | SEG14_F | SEG14_G | SEG14_O, // h + SEG14_O, // i + SEG14_B | SEG14_C | SEG14_D, // j + SEG14_L | SEG14_M | SEG14_O | SEG14_P, // k + SEG14_L | SEG14_O, // l + SEG14_C | SEG14_E | SEG14_G | SEG14_H | SEG14_O, // m + SEG14_E | SEG14_G | SEG14_O, // n + SEG14_C | SEG14_D | SEG14_E | SEG14_G | SEG14_H, // o + SEG14_A | SEG14_E | SEG14_F | SEG14_G | SEG14_M, // p + SEG14_A | SEG14_B | SEG14_C | SEG14_H | SEG14_K, // q + SEG14_E | SEG14_G, // r + SEG14_D | SEG14_H | SEG14_P, // s + SEG14_D | SEG14_E | SEG14_F | SEG14_G, // t + SEG14_C | SEG14_D | SEG14_E, // u + SEG14_E | SEG14_N, // v + SEG14_C | SEG14_E | SEG14_N | SEG14_P, // w + SEG14_K | SEG14_M | SEG14_N | SEG14_P, // x + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_L, // y Y + SEG14_D | SEG14_G | SEG14_N, // z 122 + SEG14_A | SEG14_D | SEG14_G | SEG14_N | SEG14_K, // { 123 + SEG14_B | SEG14_C, // | 124 + SEG14_A | SEG14_D | SEG14_H | SEG14_P | SEG14_M, // } 125 + SEG14_G, // ~ 126 + SEG14_P | SEG14_O | SEG14_N | SEG14_M | SEG14_L | SEG14_K | SEG14_H | SEG14_G | SEG14_F | SEG14_E | SEG14_D | SEG14_C | SEG14_B | SEG14_A | SEG14_DP// 127 all Segments +}; + + + \ No newline at end of file diff --git a/lib/NoiascaHt16k33/src/fonts/font14netherlands.h b/lib/NoiascaHt16k33/src/fonts/font14netherlands.h new file mode 100644 index 0000000000..bb8270e30f --- /dev/null +++ b/lib/NoiascaHt16k33/src/fonts/font14netherlands.h @@ -0,0 +1,118 @@ +/* ******************************************************************* + HT16K33 Library - Fontfile + copyright (c) noiasca + + Version 2021-03-14 + + This 14 segment font is based on ideas of Jereone/Netherlands + + * ******************************************************************/ + +#pragma once +#define FONTFILE14 netherlands // include that to each fontfile as additional identifier +#ifndef FONTFILE_WAS_INCLUDED +#define FONTFILE_WAS_INCLUDED +#endif + +/* ******************************************************************* + Characterset for 14 segment + * ******************************************************************/ + +const uint16_t charTable14 [] PROGMEM = { + 0, // 32 space + SEG14_B | SEG14_C | SEG14_DP, // ! 33 + SEG14_B | SEG14_L, // " 34 + SEG14_B | SEG14_C | SEG14_D | SEG14_G | SEG14_H | SEG14_L | SEG14_O, // # 35 + SEG14_A | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H | SEG14_L | SEG14_O, // $ 36 + SEG14_C | SEG14_F | SEG14_G | SEG14_H | SEG14_H | SEG14_K | SEG14_M | SEG14_N | SEG14_P, // % 37 + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_G | SEG14_K| SEG14_L | SEG14_N, // & 38 + SEG14_L, // ' 39 + SEG14_M | SEG14_P, // ( 40 + SEG14_K | SEG14_N, // ) 41 + SEG14_G | SEG14_H | SEG14_K | SEG14_L | SEG14_M | SEG14_N | SEG14_O | SEG14_P, // * 42 + SEG14_G | SEG14_H | SEG14_O | SEG14_L, // + 43 + 0, // , 44 will be handled in the write methode + SEG14_G | SEG14_H, // - 45 + 0, // . 46 will be handled in the write methode + SEG14_M | SEG14_N, // / 47 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_M | SEG14_N, // 0 48 + SEG14_B | SEG14_C | SEG14_M, // 1 49 + SEG14_A | SEG14_B | SEG14_D | SEG14_E | SEG14_G | SEG14_H, // 2 50 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H, // 3 51 + SEG14_B | SEG14_C | SEG14_F | SEG14_G | SEG14_H, // 4 52 + SEG14_A | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H, // 5 53 + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // 6 54 + SEG14_A | SEG14_M | SEG14_N, // 7 55 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // 8 56 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_F | SEG14_G | SEG14_H, // 9 57 + 0, // : 58 will be handled in the write methode + 0, // ; 59 will be handled in the write methode + SEG14_M | SEG14_P, // < 60 + SEG14_D | SEG14_G | SEG14_H, // = 61 + SEG14_K | SEG14_N, // > 62 + SEG14_A | SEG14_B | SEG14_H | SEG14_O | SEG14_DP, // ? 63 + SEG14_A | SEG14_B | SEG14_D | SEG14_E | SEG14_F| SEG14_H | SEG14_L, // @ 64 + SEG14_A | SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // A 65 + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_L | SEG14_O, // B + SEG14_A | SEG14_D | SEG14_E | SEG14_F, // C + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_L | SEG14_O, // D + SEG14_A | SEG14_D | SEG14_E | SEG14_F | SEG14_G, // E + SEG14_A | SEG14_E | SEG14_F | SEG14_G, // F + SEG14_A | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_H, // G + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // H + SEG14_A | SEG14_D | SEG14_L | SEG14_O, // I + SEG14_B | SEG14_C | SEG14_D | SEG14_E, // J + SEG14_E | SEG14_F | SEG14_G | SEG14_M | SEG14_P, // K + SEG14_D | SEG14_E | SEG14_F, // L + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_K | SEG14_M, // M + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_K | SEG14_P, // N + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // O + SEG14_A | SEG14_B | SEG14_E | SEG14_F | SEG14_G | SEG14_H, // P + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F | SEG14_P, // Q + SEG14_A | SEG14_B | SEG14_E | SEG14_F | SEG14_G | SEG14_H | SEG14_P, // R + SEG14_A | SEG14_C | SEG14_D | SEG14_H | SEG14_K, // S + SEG14_A | SEG14_L | SEG14_O, // T + SEG14_B | SEG14_C | SEG14_D | SEG14_E | SEG14_F, // U + SEG14_E | SEG14_F | SEG14_M | SEG14_N, // V + SEG14_B | SEG14_C | SEG14_E | SEG14_F | SEG14_N | SEG14_P, // W + SEG14_K | SEG14_M | SEG14_N | SEG14_P, // X + SEG14_B | SEG14_F | SEG14_G | SEG14_H | SEG14_O, // Y + SEG14_A | SEG14_D | SEG14_M | SEG14_N, // Z 90 + SEG14_A | SEG14_D | SEG14_E | SEG14_F, // [ 91 + SEG14_K | SEG14_P, /* \ 92 backslash*/ + SEG14_A | SEG14_B | SEG14_C | SEG14_D, // ] 93 + SEG14_F | SEG14_K, // ^ 94 + SEG14_D, // _ 95 underscore + SEG14_K, // ` 96 + SEG14_D | SEG14_E | SEG14_G | SEG14_O, // a 97 + SEG14_D | SEG14_E | SEG14_F | SEG14_G | SEG14_P, // b + SEG14_D | SEG14_E | SEG14_G | SEG14_H, // c + SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_N, // d + SEG14_D | SEG14_E | SEG14_G | SEG14_N, // e + SEG14_G | SEG14_H | SEG14_M | SEG14_O, // f + SEG14_A | SEG14_B | SEG14_C | SEG14_D | SEG14_H | SEG14_K, // g + SEG14_E | SEG14_F | SEG14_G | SEG14_O, // h + SEG14_O, // i + SEG14_B | SEG14_C | SEG14_D, // j + SEG14_L | SEG14_M | SEG14_O | SEG14_P, // k + SEG14_L | SEG14_O, // l + SEG14_C | SEG14_E | SEG14_G | SEG14_H | SEG14_O, // m + SEG14_E | SEG14_G | SEG14_O, // n + SEG14_C | SEG14_D | SEG14_E | SEG14_G | SEG14_H, // o + SEG14_A | SEG14_E | SEG14_F | SEG14_G | SEG14_M, // p + SEG14_A | SEG14_B | SEG14_C | SEG14_H | SEG14_K, // q + SEG14_E | SEG14_G, // r + SEG14_D | SEG14_H | SEG14_P, // s + SEG14_D | SEG14_E | SEG14_F | SEG14_G, // t + SEG14_C | SEG14_D | SEG14_E, // u + SEG14_E | SEG14_N, // v + SEG14_C | SEG14_E | SEG14_N | SEG14_P, // w + SEG14_K | SEG14_M | SEG14_N | SEG14_P, // x + SEG14_K | SEG14_M | SEG14_O, // y + SEG14_D | SEG14_G | SEG14_N, // z 122 + SEG14_A | SEG14_D | SEG14_G | SEG14_N | SEG14_K, // { 123 + SEG14_B | SEG14_C, // | 124 + SEG14_A | SEG14_D | SEG14_H | SEG14_P | SEG14_M, // } 125 + SEG14_G, // ~ 126 + SEG14_P | SEG14_O | SEG14_N | SEG14_M | SEG14_L | SEG14_K | SEG14_H | SEG14_G | SEG14_F | SEG14_E | SEG14_D | SEG14_C | SEG14_B | SEG14_A | SEG14_DP// 127 all Segments +}; \ No newline at end of file diff --git a/lib/NoiascaHt16k33/src/fonts/font7legacy.h b/lib/NoiascaHt16k33/src/fonts/font7legacy.h new file mode 100644 index 0000000000..5275f90f04 --- /dev/null +++ b/lib/NoiascaHt16k33/src/fonts/font7legacy.h @@ -0,0 +1,121 @@ +/* ******************************************************************* + HT16K33 Library - Fontfile + copyright (c) noiasca + + Version 2021-03-14 + + This is the original 7 segment font as of library version 1.0.2 from 2020-06-07 + + * ******************************************************************/ + +#pragma once +#define FONTFILE7 legacy // include that to each fontfile as additional identifier +#ifndef FONTFILE_WAS_INCLUDED +#define FONTFILE_WAS_INCLUDED +#endif +#define FONTFILE7_MAX_CHAR 130 // 129 + 1 + + /* ******************************************************************* + Characterset for 7 segment + * ******************************************************************/ + +const uint8_t charTable [] PROGMEM = { + 0, // 32 space + SEG_B | SEG_C | SEG_DP, // ! 33 + SEG_B | SEG_F, // " 34 + 0, // # 35 + SEG_A | SEG_C | SEG_D | SEG_F | SEG_G, // $ 36 + SEG_A | SEG_B | SEG_F | SEG_G, // % 37 + 0, // & 38 + SEG_B, // ' 39 + SEG_A | SEG_D | SEG_E | SEG_F, // ( 40 + SEG_A | SEG_B | SEG_C | SEG_D, // ) 41 + 0, // * 42 no character on 7segment + 0, // + 43 no character on 7segment + 0, // , 44 will be handled in the write methode + SEG_G, // - 45 + 0, // . 46 will be handled in the write methode + SEG_B | SEG_E | SEG_G , // / 47 + SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // 0 48 + SEG_B | SEG_C, // 1 49 + SEG_A | SEG_B | SEG_D | SEG_E | SEG_G, // 2 50 + SEG_A | SEG_B | SEG_C | SEG_D | SEG_G, // 3 51 + SEG_B | SEG_C | SEG_F | SEG_G, // 4 52 + SEG_A | SEG_C | SEG_D | SEG_F | SEG_G, // 5 53 + SEG_A | SEG_C | SEG_D | SEG_E | SEG_F | SEG_G, // 6 54 + SEG_A | SEG_B | SEG_C, // 7 55 + SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F | SEG_G, // 8 56 + SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_G, // 9 57 + 0, // : 58 will be handled in the write methode + 0, // ; 59 will be handled in the write methode + SEG_D | SEG_E | SEG_G, // < 60 + SEG_G, // = 61 + SEG_C | SEG_D | SEG_G, // > 62 + SEG_A | SEG_B | SEG_E | SEG_G, // ? 63 + 0, // @ 64 + SEG_A | SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, // A 65 + SEG_C | SEG_D | SEG_E | SEG_F | SEG_G, // B + SEG_A | SEG_D | SEG_E | SEG_F, // C + SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, // D + SEG_A | SEG_D | SEG_E | SEG_F | SEG_G, // E + SEG_A | SEG_E | SEG_F | SEG_G, // F + SEG_A | SEG_C | SEG_D | SEG_E | SEG_F, // G + SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, // H + SEG_B | SEG_C, // I + SEG_B | SEG_C | SEG_D | SEG_E, // J + SEG_A | SEG_C | SEG_E | SEG_F | SEG_G, // K + SEG_D | SEG_E | SEG_F, // L + SEG_A | SEG_C | SEG_E, // M + SEG_C | SEG_E | SEG_G, // N + SEG_C | SEG_D | SEG_E | SEG_G, // O + SEG_A | SEG_B | SEG_E | SEG_F | SEG_G, // P + SEG_A | SEG_B | SEG_C | SEG_F | SEG_G, // Q + SEG_E | SEG_G, // R + SEG_A | SEG_C | SEG_D | SEG_F | SEG_G, // S + SEG_D | SEG_E | SEG_F | SEG_G, // T + SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // U + SEG_C | SEG_D | SEG_E, // V + SEG_B | SEG_D | SEG_F, // W + SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, // X + SEG_B | SEG_C | SEG_D | SEG_F | SEG_G, // Y + SEG_A | SEG_B | SEG_D | SEG_E | SEG_G, // Z 90 + SEG_A | SEG_D | SEG_E | SEG_F, // [ 91 + SEG_C | SEG_F | SEG_G, /* \ 92 backslash*/ + SEG_A | SEG_B | SEG_C | SEG_D, // ] 93 + SEG_A | SEG_B | SEG_G | SEG_F, // ^ 94 ESPEasy change: ° degree symbol, like P073 7-digit fonts + SEG_D, // _ 95 underscore + SEG_B, // ` 96 + SEG_C | SEG_D | SEG_E | SEG_G | SEG_DP, // a 97 + SEG_C | SEG_D | SEG_E | SEG_F | SEG_G, // b 98 + SEG_D | SEG_E | SEG_G, // c 99 + SEG_B | SEG_C | SEG_D | SEG_E | SEG_G, // d 100 + SEG_A | SEG_D | SEG_E | SEG_F | SEG_G, // e 101 + SEG_A | SEG_E | SEG_F | SEG_G, // f 102 + SEG_A | SEG_C | SEG_D | SEG_E | SEG_F, // g G 103 capital letter will be used + SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, // h 104 + SEG_C, // i 105 + SEG_C | SEG_D, // j 106 + SEG_A | SEG_C | SEG_E | SEG_F | SEG_G, // k 107 + SEG_E | SEG_F, // l 108 + SEG_A | SEG_C | SEG_E, // m n 109 n will be used + SEG_C | SEG_E | SEG_G, // n 110 + SEG_C | SEG_D | SEG_E | SEG_G, // o 111 + SEG_A | SEG_B | SEG_E | SEG_F | SEG_G, // p P 112 + SEG_A | SEG_B | SEG_C | SEG_D | SEG_F | SEG_DP, // q Q 113 + SEG_E | SEG_G, // r 114 + SEG_A | SEG_C | SEG_D | SEG_F | SEG_G, // s S 115 + SEG_D | SEG_E | SEG_F | SEG_G, // t 116 + SEG_C | SEG_D | SEG_E, // u 117 + SEG_C | SEG_D | SEG_E, // v u 118 u will be used + SEG_C | SEG_D | SEG_E, // w u 119 u will be used + SEG_B | SEG_C | SEG_E | SEG_F | SEG_G, // x 120 + SEG_B | SEG_C | SEG_D | SEG_F | SEG_G, // y Y 121 + SEG_A | SEG_B | SEG_D | SEG_E | SEG_G, // z Z 122 + SEG_A | SEG_D | SEG_E | SEG_F, // { 123 + SEG_B | SEG_C, // | 124 + SEG_A | SEG_B | SEG_C | SEG_D, // } 125 + SEG_G, // ~ 126 + SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F | SEG_G | SEG_DP, // 127 all segments (255) + SEG_A | SEG_D | SEG_E | SEG_F | SEG_G, // € 128 Euro (121) added for ESPEasy + SEG_A | SEG_B | SEG_G | SEG_F // ° 129 degree (99) added for ESPEasy +}; \ No newline at end of file diff --git a/lib/NoiascaHt16k33/src/zInfo.ino b/lib/NoiascaHt16k33/src/zInfo.ino new file mode 100644 index 0000000000..a8b39e8dbc --- /dev/null +++ b/lib/NoiascaHt16k33/src/zInfo.ino @@ -0,0 +1,38 @@ +/* + + 14 Segment + + A + F K L M B + G H + E N O P C + D + + + 7 Segment + A + F B + G + E C + D + + + +print --> write(einzelnes Zeichen) --> writeLowLevel(wohin, bitmask) + + +open tasks + - a method to write a character to a specific position + - replace writeLowLevel with a public version (including usage of _lastcharacter & displaybuffer) + - type_t of displaybuffer and _lastcharacter one or two bytes as needed + + + +Noiasca_ht16k33 base class - not useable + Noiasca_ht16k33_hw_7 7 segments 8 digits + Noiasca_ht16k33_hw_7_4_c 7 segments 4 digits, colon + Noiasca_ht16k33_hw_14 14 segments 8 digits + Noiasca_ht16k33_hw_14_4 14 segments 4 digits only + Noiasca_ht16k33_hw_14_ext 14 segments 8 digits, extended support for scroll text + + */ \ No newline at end of file diff --git a/platformio_esp82xx_base.ini b/platformio_esp82xx_base.ini index 68f17ae757..ce48129483 100644 --- a/platformio_esp82xx_base.ini +++ b/platformio_esp82xx_base.ini @@ -235,6 +235,7 @@ lib_ignore = ESP32_ping WakeOnLan ; Wire XPT2046_Touchscreen + NoiascaHt16k33 bb_captouch htcw_ip5306 ld2410 @@ -406,6 +407,7 @@ lib_ignore = ESP32_ping WakeOnLan Wire XPT2046_Touchscreen + NoiascaHt16k33 bb_captouch htcw_ip5306 ld2410 diff --git a/src/_P057_HT16K33_LED.ino b/src/_P057_HT16K33_LED.ino index 2773e1e0b1..81800d9a3a 100644 --- a/src/_P057_HT16K33_LED.ino +++ b/src/_P057_HT16K33_LED.ino @@ -9,6 +9,7 @@ // written by Jochen Krapf (jk@nerd2nerd.org) /** Changelog: + * 2026-05-23 tonhuisman: Update plugin name to better distinguish from P157 * 2024-12-14 tonhuisman: Fix mprint command to skip the colon segment when printing a non-colon character in that position. * 2024-12 tonhuisman: Start changelog. */ @@ -72,7 +73,7 @@ # define PLUGIN_057 # define PLUGIN_ID_057 57 -# define PLUGIN_NAME_057 "Display - HT16K33" +# define PLUGIN_NAME_057 "Display - HT16K33 4 digit clock/num" # include "src/PluginStructs/P057_data_struct.h" diff --git a/src/_P157_14DGT.ino b/src/_P157_14DGT.ino new file mode 100644 index 0000000000..5382c6aadd --- /dev/null +++ b/src/_P157_14DGT.ino @@ -0,0 +1,281 @@ +#include "_Plugin_Helper.h" +#ifdef USES_P157 + +// ####################################################################################################### +// ###################### Plugin 157 - 14-/7-segment display plugin HT16K33 ###################### +// ####################################################################################################### +// +// Chips/displays supported: +// 0 - HT16K33 -- I2C - 4 digits, 1..8 displays (4..32 digits) with sequential I2C addresses +// 1 - HT16K33 -- I2C - 8 digits, 1..8 displays (4..64 digits) with sequential I2C addresses +// +// Plugin can be setup as: +// - Manual -- display is manually updated sending commands +// "7dn," (number can be negative or positive, even with decimal) +// "7dt," (temperature can be negative or positive and containing decimals) +// "7ddt,," (Dual temperatures on Max7219/74HC595 (8 digits) only, temperature can be negative or +// positive and containing decimals) +// "7dtext," (show free text - supported low ascii, period, comma, colon, semicolon are displayed as dot) +// "7dfont," 7-segment only: (select the used font: 0/7DGT/Default = default, 1/Siekoo = Siekoo, 2/Siekoo_Upper = Siekoo +// with uppercase CHNORUX, 3/dSEG7 = dSEG7) +// Siekoo: https://www.fakoo.de/siekoo (uppercase CHNORUX is a local extension) +// dSEG7 : https://www.keshikan.net/fonts-e.html +// "7dbin,[uint16_t],..." (show data binary formatted, bits clock-wise from left to right, dot, top, right 2x, bottom, +// left 2x, center), scroll-enabled +// +// Generic commands: +// - "7don" -- turn ON the display +// - "7doff" -- turn OFF the display +// - "7db,<0-15> -- set brightness to specific value between 0 and 15 +// + +/** History + * 2026-06-13 tonhuisman: Add Scroll Always option to also scroll content <= display width + * Add Zero with slash option + * Add Delay to next scroll-start option + * 2026-05-25 tonhuisman: Add 7digit,, command for writing content from a specific digit 1..len + * Remove right-align option, as this isn't implemented + * Clean up source + * 2026-05-23 tonhuisman: Add font-selector for 7-segment displays, re-using the fonts available in P073 + * 2026-05-15 tonhuisman: Start plugin, based on P073 + */ + +# define PLUGIN_157 +# define PLUGIN_ID_157 157 +# define PLUGIN_NAME_157 "Display - HT16K33 14-/7-segment" + +# include "src/PluginStructs/P157_data_struct.h" + +boolean Plugin_157(uint8_t function, struct EventStruct *event, String& string) { + boolean success = false; + + switch (function) + { + case PLUGIN_DEVICE_ADD: + { + auto& dev = Device[++deviceCount]; + dev.Number = PLUGIN_ID_157; + dev.Type = DEVICE_TYPE_I2C; + dev.VType = Sensor_VType::SENSOR_TYPE_NONE; + + break; + } + + case PLUGIN_GET_DEVICENAME: + { + string = F(PLUGIN_NAME_157); + break; + } + + case PLUGIN_SET_DEFAULTS: + { + # if P157_SCROLL_TEXT + P157_CFG_SCROLLSPEED = 10; // Default 10 * 0.1 sec scroll speed + # endif // if P157_SCROLL_TEXT + P157_CFG_DISPLAYS = 1; // Default number of displays + uint32_t lSettings{}; + bitWrite(lSettings, P157_OPTION_ZEROSLASH, true); // Enable zero with slash by default + P157_CFG_FLAGS = lSettings; + break; + } + + case PLUGIN_I2C_HAS_ADDRESS: + case PLUGIN_WEBFORM_SHOW_I2C_PARAMS: + { + const uint8_t i2cAddressValues[] = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77 }; + + if (function == PLUGIN_WEBFORM_SHOW_I2C_PARAMS) { + addFormSelectorI2C(F("i2c_addr"), 8, i2cAddressValues, P157_CFG_I2C_ADDRESS); + } else { + success = intArrayContains(8, i2cAddressValues, event->Par1); + } + break; + } + + # if FEATURE_I2C_GET_ADDRESS + case PLUGIN_I2C_GET_ADDRESS: + { + event->Par1 = P157_CFG_I2C_ADDRESS; + success = true; + break; + } + # endif // if FEATURE_I2C_GET_ADDRESS + + case PLUGIN_WEBFORM_LOAD: + { + { + const __FlashStringHelper *displtype[] = { + P157_DisplayModel(P157_MODEL_4DGT), + P157_DisplayModel(P157_MODEL_8DGT), + P157_DisplayModel(P157_MODEL_4DGT_7SEG), + P157_DisplayModel(P157_MODEL_8DGT_7SEG), + }; + const int displOption[] = { + P157_MODEL_4DGT, + P157_MODEL_8DGT, + P157_MODEL_4DGT_7SEG, + P157_MODEL_8DGT_7SEG, + }; + constexpr size_t optionCount = NR_ELEMENTS(displtype); + FormSelectorOptions selector(optionCount, displtype, displOption); + selector.reloadonchange = true; + selector.addFormSelector(F("Display Type"), F("displtype"), P157_CFG_DISPLAYTYPE); + } + + if (0 == P157_CFG_DISPLAYS) { + P157_CFG_DISPLAYS = 1; + } + addFormNumericBox(F("Nr. of displays"), F("dspls"), P157_CFG_DISPLAYS, 1, 8); + addUnit(F("1..8")); + addFormNote(F("Displays must have consecutive I2C addresses")); + + P157_display_output_selector(F("displout"), P157_CFG_OUTPUTTYPE); + + addFormNumericBox(F("Brightness"), F("brightness"), P157_CFG_BRIGHTNESS, 0, 15); + addUnit(F("0..15")); + + # if P157_EXTRA_FONTS + + if (P157_is7SegmentDisplay(P157_CFG_DISPLAYTYPE)) { + P073_font_selector(F("fontset"), P157_CFG_FONTSET); + addFormNote(F("Only available for 7-segment displays")); + } + # endif // if P157_EXTRA_FONTS + + addFormSubHeader(F("Options")); + + addFormCheckBox(F("Hide ° for Temperatures"), F("hide_degree"), bitRead(P157_CFG_FLAGS, P157_OPTION_HIDEDEGREE)); + # if P157_7DDT_COMMAND + addFormNote(F("Commands 7dt,<temp> and 7ddt,<temp1>,<temp2>")); + # else // if P157_7DDT_COMMAND + addFormNote(F("Command 7dt,<temp>")); + # endif // if P157_7DDT_COMMAND + # if P157_SUPPRESS_ZERO + addFormCheckBox(F("Suppress leading 0 on day/hour"), F("supp0"), bitRead(P157_CFG_FLAGS, P157_OPTION_SUPPRESS0)); + # endif // if P157_SUPPRESS_ZERO + + if (!P157_is7SegmentDisplay(P157_CFG_DISPLAYTYPE)) { + addFormCheckBox(F("Use 0 with slash"), F("zero_slash"), bitRead(P157_CFG_FLAGS, P157_OPTION_ZEROSLASH)); + } + + # if P157_SCROLL_TEXT + addFormCheckBox(F("Scroll text > display width"), F("scroll_text"), bitRead(P157_CFG_FLAGS, P157_OPTION_SCROLLTEXT)); + addFormCheckBox(F("Scroll text also <= display width"), F("scroll_always"), bitRead(P157_CFG_FLAGS, P157_OPTION_SCROLL_ALL)); + addFormCheckBox(F("Scroll text in from right"), F("scroll_full"), bitRead(P157_CFG_FLAGS, P157_OPTION_SCROLLFULL)); + + if (P157_CFG_SCROLLSPEED == 0) { P157_CFG_SCROLLSPEED = 10; } + addFormNumericBox(F("Scroll speed (0.1 sec/step)"), F("scrollspeed"), P157_CFG_SCROLLSPEED, 1, 600); + addUnit(F("1..600 = 0.1..60 sec/step")); + addFormNumericBox(F("Delay to next scroll-start"), F("scrolldelay"), P157_CFG_SCROLLDELAY, 0, 6000); + addUnit(F("0.1 sec")); + # endif // if P157_SCROLL_TEXT + + // addFormCheckBox(F("Right-align Temperature (7dt)"), F("temp_rightalign"), bitRead(P157_CFG_FLAGS, P157_OPTION_RIGHTALIGN)); + + success = true; + break; + } + + case PLUGIN_WEBFORM_SAVE: + { + P157_CFG_I2C_ADDRESS = getFormItemInt(F("i2c_addr")); + P157_CFG_DISPLAYTYPE = getFormItemInt(F("displtype")); + P157_CFG_DISPLAYS = getFormItemInt(F("dspls")); + P157_CFG_OUTPUTTYPE = getFormItemInt(F("displout")); + P157_CFG_BRIGHTNESS = getFormItemInt(F("brightness")); + + # if P157_EXTRA_FONTS + + if (P157_is7SegmentDisplay(P157_CFG_DISPLAYTYPE)) { + P157_CFG_FONTSET = getFormItemInt(F("fontset")); + } else + # endif // if P157_EXTRA_FONTS + { + P157_CFG_FONTSET = 0; + } + uint32_t lSettings = 0; + + bitWrite(lSettings, P157_OPTION_ZEROSLASH, isFormItemChecked(F("zero_slash"))); + bitWrite(lSettings, P157_OPTION_HIDEDEGREE, isFormItemChecked(F("hide_degree"))); + + // bitWrite(lSettings, P157_OPTION_RIGHTALIGN, isFormItemChecked(F("temp_rightalign"))); + # if P157_SCROLL_TEXT + bitWrite(lSettings, P157_OPTION_SCROLLTEXT, isFormItemChecked(F("scroll_text"))); + bitWrite(lSettings, P157_OPTION_SCROLL_ALL, isFormItemChecked(F("scroll_always"))); + bitWrite(lSettings, P157_OPTION_SCROLLFULL, isFormItemChecked(F("scroll_full"))); + P157_CFG_SCROLLSPEED = getFormItemInt(F("scrollspeed")); + P157_CFG_SCROLLDELAY = getFormItemInt(F("scrolldelay")); + # endif // if P157_SCROLL_TEXT + # if P157_SUPPRESS_ZERO + bitWrite(lSettings, P157_OPTION_SUPPRESS0, isFormItemChecked(F("supp0"))); + # endif // if P157_SUPPRESS_ZERO + P157_CFG_FLAGS = lSettings; + + success = true; + break; + } + + case PLUGIN_INIT: + { + if (0 == P157_CFG_DISPLAYS) { + P157_CFG_DISPLAYS = 1; + } + initPluginTaskData(event->TaskIndex, new (std::nothrow) P157_data_struct()); + P157_data_struct *P157_data = + static_cast(getPluginTaskData(event->TaskIndex)); + + if (nullptr != P157_data) { + addLog(LOG_LEVEL_INFO, F("P157 : Calling init()")); + success = P157_data->init(event); + } + break; + } + + case PLUGIN_EXIT: + { + success = true; + break; + } + + case PLUGIN_WRITE: + { + P157_data_struct *P157_data = + static_cast(getPluginTaskData(event->TaskIndex)); + + if (nullptr != P157_data) { + success = P157_data->plugin_write(event, string); + } + break; + } + + case PLUGIN_ONCE_A_SECOND: + { + P157_data_struct *P157_data = + static_cast(getPluginTaskData(event->TaskIndex)); + + if (nullptr != P157_data) { + success = P157_data->plugin_once_a_second(event); + } + + break; + } + + # if P157_SCROLL_TEXT + case PLUGIN_TEN_PER_SECOND: + { + P157_data_struct *P157_data = + static_cast(getPluginTaskData(event->TaskIndex)); + + if (nullptr != P157_data) { + success = P157_data->plugin_ten_per_second(event); + } + + break; + } + # endif // if P157_SCROLL_TEXT + + } + return success; +} + +#endif // ifdef USES_P157 diff --git a/src/src/CustomBuild/define_plugin_sets.h b/src/src/CustomBuild/define_plugin_sets.h index 0ddd3935bd..c0931c39d1 100644 --- a/src/src/CustomBuild/define_plugin_sets.h +++ b/src/src/CustomBuild/define_plugin_sets.h @@ -1719,6 +1719,9 @@ To create/register a plugin, you have to : #if !defined(USES_P139) && defined(ESP32) #define USES_P139 // AXP2101 #endif + #if !defined(USES_P157) && defined(ESP32) + #define USES_P157 // HT16K33 14 segment + #endif #endif #if !defined(USES_P180) && defined(ESP32) #define USES_P180 // Generic - I2C Generic @@ -2069,6 +2072,9 @@ To create/register a plugin, you have to : #if !defined(USES_P148) && defined(ESP32) #define USES_P148 // Sonoff POWR3xxD and THR3xxD display #endif + #if !defined(USES_P157) && defined(ESP32) + #define USES_P157 // Display - HT16K33 14 segment + #endif // #if !defined(USES_P165) && defined(ESP32) // #define USES_P165 // Display - NeoPixel (7-Segment) // #endif @@ -2180,6 +2186,9 @@ To create/register a plugin, you have to : #if !defined(USES_P148) && defined(ESP32) #define USES_P148 // Sonoff POWR3xxD and THR3xxD display #endif + #if !defined(USES_P157) && defined(ESP32) + #define USES_P157 // Display - HT16K33 14 segment + #endif // #if !defined(USES_P165) && defined(ESP32) // #define USES_P165 // Display - NeoPixel (7-Segment) // #endif @@ -2957,6 +2966,9 @@ To create/register a plugin, you have to : #ifndef USES_P154 #define USES_P154 // Environment - BMP3xx I2C #endif + #ifndef USES_P157 + #define USES_P157 // Display - HT16K33 14 segment + #endif #ifndef USES_P172 #define USES_P172 // Environment - BMP3xx SPI #endif diff --git a/src/src/PluginStructs/P157_data_struct.cpp b/src/src/PluginStructs/P157_data_struct.cpp new file mode 100644 index 0000000000..152841457b --- /dev/null +++ b/src/src/PluginStructs/P157_data_struct.cpp @@ -0,0 +1,1240 @@ +#include "../PluginStructs/P157_data_struct.h" + +#ifdef USES_P157 + +uint8_t P157_getDefaultDigits(uint8_t displayModel, + uint8_t displays) { + const uint8_t digitsSet[] = { 4, 8, 4, 8 }; // Fixed + uint8_t bufLen{}; + + if (displayModel < NR_ELEMENTS(digitsSet)) { + bufLen = digitsSet[displayModel]; + } + + return bufLen * displays; +} + +const __FlashStringHelper* P157_DisplayModel(uint8_t model) { + switch (model) + { + case P157_MODEL_4DGT: return F("HT16K33 - 4 digit"); + case P157_MODEL_8DGT: return F("HT16K33 - 8 digit"); + case P157_MODEL_4DGT_7SEG: return F("HT16K33 - 4 digit (7-segment)"); + case P157_MODEL_8DGT_7SEG: return F("HT16K33 - 8 digit (7-segment)"); + } + return F(""); +} + +void P157_display_output_selector(const __FlashStringHelper *id, int16_t value) { + const __FlashStringHelper *displout[] = { + F("Manual"), + F("Clock 24h - Blink"), + F("Clock 24h - No Blink"), + F("Clock 12h - Blink"), + F("Clock 12h - No Blink"), + F("Date"), + }; + const int disploutOptions[] = { + P157_DISP_MANUAL, + P157_DISP_CLOCK24BLNK, + P157_DISP_CLOCK24, + P157_DISP_CLOCK12BLNK, + P157_DISP_CLOCK12, + P157_DISP_DATE, + }; + const FormSelectorOptions selector(NR_ELEMENTS(disploutOptions), displout, disploutOptions); + + selector.addFormSelector(F("Display Output"), id, value); +} + +bool P157_is7SegmentDisplay(uint8_t model) { return (P157_MODEL_4DGT_7SEG == model) || (P157_MODEL_8DGT_7SEG == model); } + +bool P157_is4DigitDisplay(uint8_t model) { return (P157_MODEL_4DGT == model) || (P157_MODEL_4DGT_7SEG == model); } + +P157_data_struct::~P157_data_struct() { + if (nullptr != ht16k33) { + ht16k33->off(); + delete ht16k33; + ht16k33 = nullptr; + } +} + +bool P157_data_struct::init(struct EventStruct *event) +{ + clearBuffer(); + i2cAddress = P157_CFG_I2C_ADDRESS; + displayModel = P157_CFG_DISPLAYTYPE; + output = P157_CFG_OUTPUTTYPE; + brightness = P157_CFG_BRIGHTNESS; + periods = true; // bitRead(P157_CFG_FLAGS, P157_OPTION_PERIOD); + hideDegree = bitRead(P157_CFG_FLAGS, P157_OPTION_HIDEDEGREE); + # if P157_SCROLL_TEXT + txtScrolling = bitRead(P157_CFG_FLAGS, P157_OPTION_SCROLLTEXT); + scrollFull = bitRead(P157_CFG_FLAGS, P157_OPTION_SCROLLFULL); + scrollAll = bitRead(P157_CFG_FLAGS, P157_OPTION_SCROLL_ALL); + scrollDelay = P157_CFG_SCROLLDELAY; + setScrollSpeed(P157_CFG_SCROLLSPEED); + # endif // if P157_SCROLL_TEXT + suppressLeading0 = bitRead(P157_CFG_FLAGS, P157_OPTION_SUPPRESS0); + timesep = true; + zeroSlash = bitRead(P157_CFG_FLAGS, P157_OPTION_ZEROSLASH); + + # if P157_EXTRA_FONTS + fontSet = P157_CFG_FONTSET; + # endif // if P157_EXTRA_FONTS + displays = P157_CFG_DISPLAYS; + bufLen = P157_getDefaultDigits(displayModel, displays); + + if (0 == displays) { + displays = 1; + } + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("P157 : Model: %s, displays: %d"), FsP(P157_DisplayModel(displayModel)), displays)); + } + + if (!P157_is7SegmentDisplay(displayModel)) { + ht16k33 = new (std::nothrow) Noiasca_ht16k33_hw_14(); // 14 segment + ht16k33->setZeroSlash(zeroSlash); + } else { + ht16k33 = new (std::nothrow) Noiasca_ht16k33_hw_7(); // 7 segment + } + + if (nullptr == ht16k33) { + return false; + } + + if (0 == ht16k33->begin(i2cAddress, displays)) { + if (ht16k33->isConnected()) // Happy flow + { + ht16k33->setDigits(P157_is4DigitDisplay(displayModel) ? 4 : 8); + ht16k33->setBrightness(brightness); + ht16k33->on(); + return true; + } + } + return false; +} + +void P157_data_struct::fillBufferWithTime(bool sevendgt_now, + uint8_t sevendgt_hours, + uint8_t sevendgt_minutes, + uint8_t sevendgt_seconds, + bool flag12h, + bool suppressLeading0) { + clearBuffer(); + + if (sevendgt_now) { + sevendgt_hours = node_time.hour(); + sevendgt_minutes = node_time.minute(); + sevendgt_seconds = node_time.second(); + } + + if (flag12h && (sevendgt_hours > 12)) { + sevendgt_hours -= 12; // if flag 12h is TRUE and h>12 adjust subtracting 12 + } + + if (flag12h && (sevendgt_hours == 0)) { + sevendgt_hours = 12; // if flag 12h is TRUE and h=0 adjust to h=12 + } + put4NumbersInBuffer(sevendgt_hours, sevendgt_minutes, bufLen > 4 ? sevendgt_seconds : -1, -1 + # if P157_SUPPRESS_ZERO + , suppressLeading0 + # endif // if P157_SUPPRESS_ZERO + , timesep + ); +} + +void P157_data_struct::fillBufferWithDate(bool sevendgt_now, + uint8_t sevendgt_day, + uint8_t sevendgt_month, + int sevendgt_year, + bool suppressLeading0) { + clearBuffer(); + int sevendgt_year0 = sevendgt_year; + + if (sevendgt_now) { + sevendgt_day = node_time.day(); + sevendgt_month = node_time.month(); + sevendgt_year0 = node_time.year(); + } else if (sevendgt_year0 < 100) { + sevendgt_year0 += 2000; + } + const uint8_t sevendgt_year1 = static_cast(sevendgt_year0 / 100); + const uint8_t sevendgt_year2 = static_cast(sevendgt_year0 % 100); + + put4NumbersInBuffer(sevendgt_day, sevendgt_month, sevendgt_year1, sevendgt_year2 + # if P157_SUPPRESS_ZERO + , suppressLeading0 + # endif // if P157_SUPPRESS_ZERO + , false + ); +} + +void P157_data_struct::put4NumbersInBuffer(const uint8_t nr1, + const uint8_t nr2, + const int8_t nr3, + const int8_t nr4 + # if P157_SUPPRESS_ZERO + , const bool suppressLeading0 + # endif // if P157_SUPPRESS_ZERO + , const bool sep + ) { + uint8_t idx = 0; + + showbuffer[idx++] = 48 + static_cast(nr1 / 10); + + # if P157_SUPPRESS_ZERO + + if (suppressLeading0 && (showbuffer[idx - 1] == '0')) { showbuffer[idx - 1] = ' '; } // set to space + # endif // if P157_SUPPRESS_ZERO + + showbuffer[idx++] = 48 + (nr1 % 10); + + if (sep) { showbuffer[idx++] = ':'; } + + showbuffer[idx++] = 48 + static_cast(nr2 / 10); + showbuffer[idx++] = 48 + (nr2 % 10); + + if (nr3 > -1) { + if (sep) { showbuffer[idx++] = ':'; } + + showbuffer[idx++] = 48 + static_cast(nr3 / 10); + showbuffer[idx++] = 48 + (nr3 % 10); + + if (nr4 > -1) { + showbuffer[idx++] = 48 + static_cast(nr4 / 10); + showbuffer[idx++] = 48 + (nr4 % 10); + } + } +} + +void P157_data_struct::fillBufferWithNumber(const String& number) { + clearBuffer(); + + if (number.length() == 0) { + return; + } + int8_t P157_index = 7; + + dotpos = -1; // -1 means no dot to display + + for (int i = number.length() - 1; i >= 0 && P157_index >= 0; --i) { + const char P157_tmpchar = number.charAt(i); + + if (P157_tmpchar == '.') { // dot + dotpos = P157_index; + } else { + showbuffer[P157_index] = P157_tmpchar; + P157_index--; + } + } + + while (P157_index >= 0) { // Prefix with spaces + showbuffer[P157_index] = ' '; + P157_index--; + } +} + +void P157_data_struct::fillBufferWithTemp(int temperature) { + clearBuffer(); + char P157_digit[8]; + const bool between10and0 = ((temperature < 10) && (temperature >= 0)); // To have a zero prefix (0.x and -0.x) display between 0.9 + const bool between0andMinus10 = ((temperature < 0) && (temperature > -10)); // and -0.9 degrees,as all display types use 1 digit for + // temperatures between 10.0 and -10.0 + String format; + + if (hideDegree) { + format = (between10and0 ? F(" %02d") : (between0andMinus10 ? F(" %03d") : F("%8d"))); + } else { + format = (between10and0 ? F(" %02d") : (between0andMinus10 ? F(" %03d") : F("%7d"))); + } + sprintf_P(P157_digit, format.c_str(), temperature); + const size_t P157_numlenght = strlen(P157_digit); + + for (size_t i = 0; i < P157_numlenght; ++i) { + showbuffer[i] = P157_digit[i]; + } + + if (P157_numlenght > 2) { + showperiods[P157_numlenght - 2] = true; + } + + if (!hideDegree) { + showbuffer[7] = P157_CHAR_DEGREE; // degree "°" + } +} + +# if P157_7DDT_COMMAND + +/** + * fillBufferWithDualTemp() + * leftTemperature or rightTempareature < -100.0 then shows dashes + */ +void P157_data_struct::fillBufferWithDualTemp(int leftTemperature, + bool leftWithDecimal, + int rightTemperature, + bool rightWithDecimal) { + clearBuffer(); + char P157_digit[8]; + String format; + const bool leftBetween10and0 = (leftWithDecimal && (leftTemperature < 10) && (leftTemperature >= 0)); + + // To have a zero prefix (0.x and -0.x) display between 0.9 and -0.9 degrees, + // as all display types use 1 digit for temperatures between 10.0 and -10.0 + const bool leftBetween0andMinus10 = (leftWithDecimal && (leftTemperature < 0) && (leftTemperature > -10)); + + if (hideDegree) { + // Include a space for compensation of the degree symbol + format = + (leftBetween10and0 ? F(" %02d") : (leftBetween0andMinus10 ? F(" %03d") : leftTemperature < -1000 ? F("----") : F("%4d"))); + showperiods[2] = leftTemperature >= -1000; + } else { + // Include a space for compensation of the degree symbol + format = + (leftBetween10and0 ? F(" %02d ") : (leftBetween0andMinus10 ? F("%03d ") : leftTemperature < -100 ? F("----") : F("%3d "))); + showperiods[2] = leftTemperature >= -100; + } + bool rightBetween10and0 = (rightWithDecimal && (rightTemperature < 10) && (rightTemperature >= 0)); + + // To have a zero prefix (0.x and -0.x) display between 0.9 and -0.9 degrees, + // as all display types use 1 digit for temperatures between 10.0 and -10.0 + const bool rightBetween0andMinus10 = (rightWithDecimal && (rightTemperature < 0) && (rightTemperature > -10)); + + if (hideDegree) { + format += + (rightBetween10and0 ? F(" %02d") : (rightBetween0andMinus10 ? F(" %03d") : rightTemperature < -1000 ? F("----") : F("%4d"))); + showperiods[6] = rightTemperature >= -1000; + } else { + format += + (rightBetween10and0 ? F(" %02d") : (rightBetween0andMinus10 ? F("%03d") : rightTemperature < -100 ? F("----") : F("%3d"))); + showperiods[6] = rightTemperature >= -100; + } + sprintf_P(P157_digit, format.c_str(), leftTemperature, rightTemperature); + const size_t P157_numlenght = strlen(P157_digit); + + for (size_t i = 0; i < P157_numlenght; ++i) { + showbuffer[i] = P157_digit[i]; + } + + if (!hideDegree) { + if (leftTemperature > -100.0) { + showbuffer[3] = P157_CHAR_DEGREE; // degree "°" + } + + if (rightTemperature > -100.0) { + showbuffer[7] = P157_CHAR_DEGREE; // degree "°" + } + } + + // addLog(LOG_LEVEL_INFO, concat(F("7dgt format: "), format)); +} + +# endif // if P157_7DDT_COMMAND + +void P157_data_struct::fillBufferWithString(const String& textToShow, + bool useBinaryData) { + clearBuffer(); + + String buf(textToShow); + + while (getEffectiveTextLength(buf) > bufLen && !buf.isEmpty()) { + buf = buf.substring(0, buf.length() - 1); + } + + while (buf.length() < bufLen) { + buf += ' '; + } + memcpy(showbuffer, buf.c_str(), bufLen); + + # ifdef P157_DEBUG + logBufferContent(F("7dtext")); + # endif // ifdef P157_DEBUG +} + +# if P157_SCROLL_TEXT || P157_7DBIN_COMMAND + +bool P157_data_struct::isPeriodChar(const char thisChar) { + return std::find(std::begin(periodchars), std::end(periodchars), thisChar) != std::end(periodchars); +} + +int P157_data_struct::getEffectiveTextLength(const String& text) { + const int textLength = text.length(); + int p = 0; + + for (int i = 0; i < textLength; ++i) { + + if (periods && isPeriodChar(text.charAt(i))) { // If setting periods true + if (p == 0) { // Text starts with a period, becomes a space with a dot + p++; + } + + if ((i > 0) && (text.charAt(i - 1) == '.')) { // Handle consecutive periods + p++; + } + } else { + p++; + } + } + return p; +} + +# endif // if P157_SCROLL_TEXT || P157_7DBIN_COMMAND + +# if P157_SCROLL_TEXT + +bool P157_data_struct::nextScroll() { + bool result = false; + + if (scrollWait && (--scrollWait > 0)) { + return result; + } + + if (isScrollEnabled() && (!_textToScroll.isEmpty() + # if P157_7DBIN_COMMAND + || binData.size() > 0 + # endif // if P157_7DBIN_COMMAND + )) { + + if ((scrollCount > 0) && (scrollCount < 0xFFFF)) { scrollCount--; } + + if (scrollCount == 0) { + scrollCount = 0xFFFF; // Max value to avoid interference when scrolling long texts + result = true; + # if P157_7DBIN_COMMAND + + if (binData.size() > 0) { + scrollPos++; + + if (scrollPos > (binData.size() - bufLen)) { + scrollPos = 0; // Redisplay + scrollWait = scrollDelay; // Restart delay counter + } + scrollCount = _scrollSpeed; // Restart countdown + } else + # endif // if P157_7DBIN_COMMAND + { + clearBuffer(); + + if (isPeriodChar(_textToScroll.charAt(scrollPos))) { + scrollPos++; + } + + String part = _textToScroll.substring(scrollPos, scrollPos + 1.5 * bufLen); + + while (getEffectiveTextLength(part) > bufLen && !part.isEmpty()) { + part = part.substring(0, part.length() - 1); + } + + for (uint16_t i = 0; i < bufLen && i < part.length(); ++i) { + showbuffer[i] = part.charAt(i); + } + + scrollPos++; + + if (scrollPos > _textToScroll.length() - bufLen) { + scrollPos = 0; // Restart when all text displayed + scrollWait = scrollDelay; // Restart delay counter + } + scrollCount = _scrollSpeed; // Restart countdown + # ifdef P157_DEBUG + logBufferContent(F("nextScroll")); + # endif // ifdef P157_DEBUG + } + } + } + return result; +} + +void P157_data_struct::setTextToScroll(const String& text) { + free_string(_textToScroll); + + if (!text.isEmpty()) { + _textToScroll.reserve(text.length() + bufLen + (scrollFull ? bufLen : 0)); + + for (int i = 0; scrollFull && i < bufLen; ++i) { // Scroll text in from the right, so start with all spaces + _textToScroll += ' '; + } + _textToScroll += text; + + for (int i = 0; i < bufLen; ++i) { // Scroll text off completely before restarting + _textToScroll += ' '; + } + } + scrollCount = _scrollSpeed; + scrollPos = 0; + # if P157_7DBIN_COMMAND + binaryData = false; + # endif // if P157_7DBIN_COMMAND +} + +void P157_data_struct::setScrollSpeed(uint8_t speed) { + _scrollSpeed = speed; + scrollCount = _scrollSpeed; + scrollPos = 0; +} + +# endif // if P157_SCROLL_TEXT + +# ifdef P157_DEBUG + +void P157_data_struct::logBufferContent(String prefix) { + String log; + + if (loglevelActiveFor(LOG_LEVEL_INFO) && + log.reserve(48)) { + log = strformat(F("%s buffer: periods: %c "), prefix.c_str(), periods ? 't' : 'f'); + + for (uint8_t i = 0; i < 8; ++i) { + if (i > 0) { log += ','; } + log += formatToHex(showbuffer[i]); + log += ','; + log += showperiods[i] ? F(".") : F(""); + } + addLogMove(LOG_LEVEL_INFO, log); + } +} + +# endif // ifdef P157_DEBUG + +// in case of error show all dashes +void P157_data_struct::fillBufferWithDash() { memset(showbuffer, '-', sizeof(showbuffer)); } + +void P157_data_struct::clearBuffer() { + memset(showbuffer, 0, sizeof(showbuffer)); + memset(showperiods, 0, sizeof(showperiods)); +} + +void P157_data_struct::printBuffer() { + if (isInitialized()) { + # if P157_7DBIN_COMMAND + + if (binData.size() > 0) { + # ifdef P157_DEBUG + String log; + # endif // ifdef P157_DEBUG + + for (uint16_t j = 0; j < bufLen && (scrollPos + j) < binData.size(); ++j) { + ht16k33->writeLowLevel(j, binData[scrollPos + j]); + # ifdef P157_DEBUG + log += formatToHex(binData[scrollPos + j]); + log += ','; + # endif // ifdef P157_DEBUG + } + # ifdef P157_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("P157 : printBuffer len: %u maxLen: %u data: %s"), + binData.size(), bufLen, log.c_str())); + } + # endif // ifdef P157_DEBUG + } else + # endif // if P157_7DBIN_COMMAND + { + String buf = String(showbuffer); + uint8_t dotOff{}; + + if ((bufLen < 8) && (buf.length() > bufLen) && buf.startsWith(F(" "))) { + dotOff = 4; + buf = buf.substring(4); + } + + while (getEffectiveTextLength(buf) > bufLen && !buf.isEmpty()) { + buf = buf.substring(0, buf.length() - 1); + } + + while (buf.length() < bufLen) { // TODO Account for offset? + buf += ' '; + } + + # ifdef P157_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("P157 : printBuffer len: %u buffer: %s, maxLen: %u raw: '%s'"), + buf.length(), buf.c_str(), bufLen, showbuffer)); + } + # endif // ifdef P157_DEBUG + + uint8_t i = 0; + # if P157_EXTRA_FONTS + uint8_t pos = ht16k33->getCursor(); + # endif + + while (i < buf.length()) { + # if P157_EXTRA_FONTS + + if (P157_is7SegmentDisplay(displayModel)) { + // Re-use the fonts from P073, but they use the MAX7219 layout, that has bits 0..6 reverted + char toPrint = P073_revert7bits(P073_getFontChar(P073_mapCharToFontPosition(buf[i], fontSet), fontSet)); + + if (showperiods[i + dotOff] || (dotpos == (i + dotOff))) { + toPrint |= SEG_DP; + } + + if (((i + 1) < buf.length()) && isPeriodChar(buf[i + 1])) { + toPrint |= SEG_DP; + ++i; + } + ht16k33->writeLowLevel(pos, toPrint); + ++pos; + } else + # endif // if P157_EXTRA_FONTS + { + ht16k33->write(buf[i]); + + if (showperiods[i + dotOff] || (dotpos == (i + dotOff))) { + ht16k33->write('.'); + + } + } + ++i; + } + } + ht16k33->setCursor(0); + } + +} + +bool P157_data_struct::plugin_once_a_second(struct EventStruct *event) { + if (output == P157_DISP_MANUAL) { + return false; + } + + if ((output == P157_DISP_CLOCK24BLNK) || + (output == P157_DISP_CLOCK12BLNK)) { + timesep = !timesep; + } else { + timesep = true; + } + + if (output == P157_DISP_DATE) { + fillBufferWithDate(true, 0, 0, 0, + # if P157_SUPPRESS_ZERO + suppressLeading0 + # else // if P157_SUPPRESS_ZERO + false + # endif // if P157_SUPPRESS_ZERO + ); + } else { + fillBufferWithTime(true, 0, 0, 0, !((output == P157_DISP_CLOCK24BLNK) || + (output == P157_DISP_CLOCK24)), + # if P157_SUPPRESS_ZERO + suppressLeading0 + # else // if P157_SUPPRESS_ZERO + false + # endif // if P157_SUPPRESS_ZERO + ); + } + + printBuffer(); + + return true; +} + +# if P157_SCROLL_TEXT + +bool P157_data_struct::plugin_ten_per_second(struct EventStruct *event) { + if ((output != P157_DISP_MANUAL) || !isScrollEnabled()) { + return false; + } + + if (nextScroll()) { + printBuffer(); + } + return true; +} + +# endif // if P157_SCROLL_TEXT + +const char P157_commands[] PROGMEM = + "7dn|7dt|" + # if P157_7DDT_COMMAND + "7ddt|" + # endif // if P157_7DDT_COMMAND + "7dst|7dsd|7dtext|7digit|" + # if P157_EXTRA_FONTS + "7dfont|" + # endif // if P157_EXTRA_FONTS + # if P157_7DBIN_COMMAND + "7dbin|" + # endif // if P157_7DBIN_COMMAND + "7don|7doff|7db|7output|" +; +enum class P157_commands_e : int8_t { + invalid = -1, + c7dn = 0, + c7dt, + # if P157_7DDT_COMMAND + c7ddt, + # endif // if P157_7DDT_COMMAND + c7dst, + c7dsd, + c7dtext, + c7digit, + # if P157_EXTRA_FONTS + c7dfont, + # endif // if P157_EXTRA_FONTS + # if P157_7DBIN_COMMAND + c7dbin, + # endif // if P157_7DBIN_COMMAND + c7don, + c7doff, + c7db, + c7output, + +}; + +bool P157_data_struct::plugin_write(struct EventStruct *event, + const String & string) { + const String cmd_s = parseString(string, 1); + + if ((cmd_s.length() < 3) || (cmd_s[0] != '7')) { return false; } + + # if P157_SCROLL_TEXT + const bool currentScroll = isScrollEnabled(); // Save current state + bool newScroll = false; // disable scroll if command changes + setScrollEnabled(false); + # endif // if P157_SCROLL_TEXT + + const int cmd_i = GetCommandCode(cmd_s.c_str(), P157_commands); + + if (cmd_i < 0) { return false; } // Fail fast + + const P157_commands_e cmd = static_cast(cmd_i); + + const String text = parseStringToEndKeepCase(string, 2); + bool success = false; + bool displayon = false; + + # if P157_7DBIN_COMMAND + + if ( + (cmd != P157_commands_e::c7dbin) && + (cmd != P157_commands_e::c7db) && + (cmd != P157_commands_e::c7don) && + (cmd != P157_commands_e::c7doff) + ) { + binData.clear(); + } + # endif // if P157_7DBIN_COMMAND + + switch (cmd) + { + case P157_commands_e::c7dn: + return plugin_write_7dn(event, text); + case P157_commands_e::c7dt: + return plugin_write_7dt(text); + # if P157_7DDT_COMMAND + case P157_commands_e::c7ddt: + return plugin_write_7ddt(text); + # endif // if P157_7DDT_COMMAND + case P157_commands_e::c7dst: + return plugin_write_7dst(event); + case P157_commands_e::c7dsd: + return plugin_write_7dsd(event); + case P157_commands_e::c7dtext: + # if P157_SCROLL_TEXT + setScrollEnabled(true); // Scrolling allowed for 7dtext command + # endif // if P157_SCROLL_TEXT + return plugin_write_7dtext(text); + case P157_commands_e::c7digit: + return plugin_write_7digit(text); + # if P157_EXTRA_FONTS + case P157_commands_e::c7dfont: + # if P157_SCROLL_TEXT + setScrollEnabled(currentScroll); // Restore state + # endif // if P157_SCROLL_TEXT + return plugin_write_7dfont(event, text); + # endif // if P157_EXTRA_FONTS + # if P157_7DBIN_COMMAND + case P157_commands_e::c7dbin: + # if P157_SCROLL_TEXT + setScrollEnabled(true); // Scrolling allowed for 7dbin command + # endif // if P157_SCROLL_TEXT + return plugin_write_7dbin(string, 1); + # endif // if P157_7DBIN_COMMAND + case P157_commands_e::c7don: + # if P157_SCROLL_TEXT + newScroll = currentScroll; // Restore state + # endif // if P157_SCROLL_TEXT + # ifndef BUILD_NO_DEBUG + addLog(LOG_LEVEL_INFO, F("7DGT : Display ON")); + # endif // ifndef BUILD_NO_DEBUG + displayon = true; + success = true; + break; + case P157_commands_e::c7doff: + # if P157_SCROLL_TEXT + newScroll = currentScroll; // Restore state + # endif // if P157_SCROLL_TEXT + # ifndef BUILD_NO_DEBUG + addLog(LOG_LEVEL_INFO, F("7DGT : Display OFF")); + # endif // ifndef BUILD_NO_DEBUG + displayon = false; + success = true; + break; + case P157_commands_e::c7db: + # if P157_SCROLL_TEXT + newScroll = currentScroll; // Restore state + # endif // if P157_SCROLL_TEXT + + if ((event->Par1 >= 0) && (event->Par1 < 16)) { + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, concat(F("7DGT : Brightness="), event->Par1)); + } + # endif // ifndef BUILD_NO_DEBUG + brightness = event->Par1; + P157_CFG_BRIGHTNESS = event->Par1; + displayon = true; + success = true; + } + break; + case P157_commands_e::c7output: + + if ((event->Par1 >= 0) && (event->Par1 < 6)) { // 0:"Manual",1:"Clock 24h - Blink",2:"Clock 24h - No Blink", + // 3:"Clock 12h - Blink",4:"Clock 12h - No Blink",5:"Date" + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, concat(F("7DGT : Display output="), event->Par1)); + } + # endif // ifndef BUILD_NO_DEBUG + output = event->Par1; + P157_CFG_OUTPUTTYPE = event->Par1; + displayon = true; + success = true; + # if P157_SCROLL_TEXT + + if (event->Par1 == 0) { newScroll = currentScroll; } // Restore state + # endif // if P157_SCROLL_TEXT + } + break; + case P157_commands_e::invalid: + break; + } + + if (success) { + # if P157_SCROLL_TEXT + setScrollEnabled(newScroll); + # endif // if P157_SCROLL_TEXT + + if (isInitialized()) { + ht16k33->setBrightness(brightness); + + if (displayon) { + ht16k33->on(); + } + else { + ht16k33->off(); + } + } + } + return success; +} + +void P157_data_struct::getDisplayLimits(int32_t& lLimit, + int32_t& uLimit, + int8_t offset, + uint8_t displays) { + uint8_t dgts = min((uint8_t)8, bufLen); + + dgts -= offset; // Subtract an offset, used for extra symbol + lLimit = -pow10(dgts - 1); // Lowest value we can display - 1 + uLimit = pow10(dgts); // Highest value we can display + 1 + // TODO disable log + // addLog(LOG_LEVEL_INFO, strformat(F("P157: limits: %d digits(%d), lower: %d, upper: %d"), dgts, offset, lLimit, uLimit)); +} + +bool P157_data_struct::plugin_write_7dn(struct EventStruct *event, + const String & text) { + if (output != P157_DISP_MANUAL) { + return false; + } + + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, concat(F("7DGT : Show Number="), event->Par1)); + } + # endif // ifndef BUILD_NO_DEBUG + + int32_t lLimit = 0; + int32_t uLimit = 0; + getDisplayLimits(lLimit, uLimit, 0, displays); + + if (!text.isEmpty()) { + if ((event->Par1 > lLimit) && (event->Par1 < uLimit)) { + fillBufferWithNumber(text.c_str()); + } else { + fillBufferWithDash(); + } + } + + printBuffer(); + return true; +} + +bool P157_data_struct::plugin_write_7dt(const String& text) { + if (output != P157_DISP_MANUAL) { + return false; + } + + float P157_temptemp = 0.0f; + + if (!text.isEmpty()) { + validFloatFromString(text, P157_temptemp); + } + + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, concat(F("7DGT : Show Temperature="), P157_temptemp)); + } + # endif // ifndef BUILD_NO_DEBUG + + int32_t lLimit = 0; + int32_t uLimit = 0; + getDisplayLimits(lLimit, uLimit, hideDegree ? 0 : 1, displays); + float lLimitErr = lLimit + 0.1f; + float uLimitErr = uLimit - 1.0f; + float lLimitDec = lLimit / 10.0f; + float uLimitDec = uLimit / 10.0f; + + // TODO disable log + // addLog(LOG_LEVEL_INFO, strformat(F("P157: 7dt: lErr: %.1f, uErr: %.1f, lDec: %.1f, uDec: %.1f"), + // lLimitErr, uLimitErr, lLimitDec, uLimitDec)); + + if ((P157_temptemp > uLimitErr) || (P157_temptemp < lLimitErr)) { + fillBufferWithDash(); + } else { + if ((P157_temptemp < uLimitDec) && (P157_temptemp > lLimitDec)) { + P157_temptemp = roundf(P157_temptemp * 10.0f); + } + fillBufferWithTemp(P157_temptemp); + } + + printBuffer(); + + # ifdef P157_DEBUG + logBufferContent(F("7dt")); + # endif // ifdef P157_DEBUG + return true; +} + +# if P157_7DDT_COMMAND + +bool P157_data_struct::plugin_write_7ddt(const String& text) { + if (output != P157_DISP_MANUAL) { + return false; + } + + float P157_lefttemp = 0.0f; + float P157_righttemp = 0.0f; + + if (!text.isEmpty()) { + validFloatFromString(parseString(text, 1), P157_lefttemp); + + if (text.indexOf(',') > -1) { + validFloatFromString(parseString(text, 2), P157_righttemp); + } + } + + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("7DGT : Dual Temperature 1st=%.2f 2nd=%.2f"), P157_lefttemp, P157_righttemp)); + } + # endif // ifndef BUILD_NO_DEBUG + + { + uint8_t firstDot = -1; // No decimals is no dots + uint8_t secondDot = -1; + float hideFactor = hideDegree ? 10.0f : 1.0f; + + if ((P157_lefttemp > 999.99f * hideFactor) || (P157_lefttemp < -99.99f * hideFactor)) { + P157_lefttemp = -101.0f * hideFactor; // Triggers on -100 + } else { + if ((P157_lefttemp < 100.0f * hideFactor) && (P157_lefttemp > -10.0f * hideFactor)) { + P157_lefttemp = roundf(P157_lefttemp * 10.0f); + firstDot = hideDegree ? 2 : 1; + } + } + + if ((P157_righttemp > 999.99f * hideFactor) || (P157_righttemp < -99.99f * hideFactor)) { + P157_righttemp = -101.0f * hideFactor; + } else { + if ((P157_righttemp < 100.0f * hideFactor) && (P157_righttemp > -10.0f * hideFactor)) { + P157_righttemp = roundf(P157_righttemp * 10.0f); + secondDot = hideDegree ? 6 : 5; + } + } + + # ifdef P157_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("7DGT : 7ddt preprocessed 1st=%.2f 2nd=%.2f"), P157_lefttemp, P157_righttemp)); + } + # endif // ifdef P157_DEBUG + + fillBufferWithDualTemp(P157_lefttemp, firstDot > -1, P157_righttemp, secondDot > -1); + + printBuffer(); + + } + # ifdef P157_DEBUG + logBufferContent(F("7ddt")); + # endif // ifdef P157_DEBUG + return true; +} + +# endif // if P157_7DDT_COMMAND + +bool P157_data_struct::plugin_write_7dst(struct EventStruct *event) { + if (output != P157_DISP_MANUAL) { + return false; + } + + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("7DGT : Show Time=%02d:%02d:%02d"), event->Par1, event->Par2, event->Par3)); + } + # endif // ifndef BUILD_NO_DEBUG + timesep = true; + fillBufferWithTime(false, event->Par1, event->Par2, event->Par3, false, + # if P157_SUPPRESS_ZERO + suppressLeading0 + # else // if P157_SUPPRESS_ZERO + false + # endif // if P157_SUPPRESS_ZERO + ); + + printBuffer(); + return true; +} + +bool P157_data_struct::plugin_write_7dsd(struct EventStruct *event) { + if (output != P157_DISP_MANUAL) { + return false; + } + + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("7DGT : Show Date=%02d:%02d:%02d"), event->Par1, event->Par2, event->Par3)); + } + # endif // ifndef BUILD_NO_DEBUG + fillBufferWithDate(false, event->Par1, event->Par2, event->Par3, + # if P157_SUPPRESS_ZERO + suppressLeading0 + # else // if P157_SUPPRESS_ZERO + false + # endif // if P157_SUPPRESS_ZERO + ); + + printBuffer(); + return true; +} + +bool P157_data_struct::plugin_write_7dtext(const String& text) { + if (output != P157_DISP_MANUAL) { + return false; + } + # ifndef BUILD_NO_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLogMove(LOG_LEVEL_INFO, concat(F("7DGT : Show Text="), text)); + } + # endif // ifndef BUILD_NO_DEBUG + # if P157_SCROLL_TEXT + + if (_lastArgument.equals(text)) { + return true; // Success, but no change + } + _lastArgument = text; + setTextToScroll(EMPTY_STRING); + + setScrollEnabled(scrollAll || getEffectiveTextLength(text) > bufLen); + + if (isScrollEnabled()) { + setTextToScroll(text); + } else + # endif // if P157_SCROLL_TEXT + { + fillBufferWithString(text); + + printBuffer(); + } + return true; +} + +# if P157_EXTRA_FONTS + +bool P157_data_struct::plugin_write_7dfont(struct EventStruct *event, + const String & text) { + if (!P157_is7SegmentDisplay(displayModel)) { return false; } + + if (!text.isEmpty()) { + int32_t fontNr = P073_parse_7dfont(event, text); + # ifdef P157_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("P157 7dfont,%s -> %d"), parseString(text, 1).c_str(), fontNr)); + } + # endif // ifdef P157_DEBUG + + if ((fontNr >= 0) && (fontNr <= 3)) { + fontSet = fontNr; + P157_CFG_FONTSET = fontNr; + return true; + } + } + return false; +} + +# endif // if P157_EXTRA_FONTS + +# if P157_7DBIN_COMMAND + +bool P157_data_struct::plugin_write_7dbin(const String& text, + const uint8_t offset) { + if (output != P157_DISP_MANUAL) { + return false; + } + + if (_lastArgument.equals(text)) { + return true; // Success, but no change + } + _lastArgument = text; + + if (!text.isEmpty()) { + binData.clear(); + scrollPos = 0; + + uint32_t wordValue{}; + uint8_t arg = 1; + String argValue = parseStringKeepCaseNoTrim(text, offset + arg); + + while (!argValue.isEmpty()) { + NumericalType numType; + + if (isNumerical(argValue, numType) && (numType != NumericalType::FloatingPoint) && + validUIntFromString(argValue, wordValue) && (wordValue <= 0xFFFF)) { + # ifdef P157_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("7dbin : argValue: %s value: 0x%04x"), argValue.c_str(), wordValue)); + } + # endif // ifdef P157_DEBUG + binData.push_back(wordValue & 0xFFFF); + } else { + # ifdef P157_DEBUG + + if (loglevelActiveFor(LOG_LEVEL_INFO)) { + addLog(LOG_LEVEL_INFO, strformat(F("7dbin : argValue: %s"), argValue.c_str())); + } + # endif // ifdef P157_DEBUG + + uint16_t i = 0; + + while (i < argValue.length()) { + uint16_t bitmap; + + # if P157_EXTRA_FONTS + + if (P157_is7SegmentDisplay(displayModel)) { + // Re-use the fonts from P073, but they use the MAX7219 layout, that has bits 0..6 reverted + bitmap = P073_revert7bits(P073_getFontChar(P073_mapCharToFontPosition(argValue.charAt(i), fontSet), fontSet)); + + } else + # endif // if P157_EXTRA_FONTS + { + bitmap = ht16k33->getCharacterBitmap(argValue.charAt(i)); + + if (zeroSlash && ('0' == argValue.charAt(i)) && !P157_is7SegmentDisplay(displayModel)) { + bitmap |= (SEG14_M | SEG14_N); + } + } + + if ((i < argValue.length()) && isPeriodChar(argValue.charAt(i + 1))) { + bitmap |= P157_is7SegmentDisplay(displayModel) ? SEG_DP : SEG14_DP; + ++i; + } + binData.push_back(bitmap); + ++i; + } + } + arg++; + argValue = parseStringKeepCaseNoTrim(text, offset + arg); + } + + if (binData.size() > 0) { + # if P157_SCROLL_TEXT + setScrollEnabled(scrollAll || binData.size() > bufLen); + + if (isScrollEnabled()) { + uint8_t i = 0; + + for (; scrollFull && i < bufLen; ++i) { // prepend to start display empty + binData.insert(binData.begin(), 0); + } + + for (i = 0; i < bufLen; ++i) { // append empty to scroll until empty + binData.push_back(0); + } + } else + # endif // if P157_SCROLL_TEXT + { + printBuffer(); + } + return true; + } + } + return false; +} + +# endif // if P157_7DBIN_COMMAND + +/**************************************************************************** + * Write a character or string to an explicit digit + ***************************************************************************/ +bool P157_data_struct::plugin_write_7digit(const String& text) { + if (output != P157_DISP_MANUAL) { + return false; + } + + if (!text.isEmpty()) { + setTextToScroll(EMPTY_STRING); // Clear scrolling text and binary data + binData.clear(); + setScrollEnabled(false); + + int32_t dgt = 0; + uint32_t bitmap = 0; + const String data = parseStringKeepCaseNoTrim(text, 2); + const bool isValid = validIntFromString(parseString(text, 1), dgt); + + if (isValid && (dgt > 0) && (dgt <= bufLen) && + !data.isEmpty()) { + dgt--; + ht16k33->setCursor(dgt); + uint8_t per = 0; + + for (uint8_t i = 0; i < data.length() && (i + dgt - per) < (bufLen + (isPeriodChar(data.charAt(i)) ? 1 : 0)); ++i) { + ht16k33->write(data.charAt(i)); + per += isPeriodChar(data.charAt(i)) ? 1 : 0; + } + return true; + } else if (isValid && (dgt < 0) && (abs(dgt) <= bufLen) && + !data.isEmpty() && validUIntFromString(data, bitmap) && (bitmap < 0xFFFF)) { + dgt = abs(dgt); + dgt--; + ht16k33->writeLowLevel(dgt, bitmap); + return true; + } + } + return false; +} + +#endif // ifdef USES_P157 diff --git a/src/src/PluginStructs/P157_data_struct.h b/src/src/PluginStructs/P157_data_struct.h new file mode 100644 index 0000000000..864f10e177 --- /dev/null +++ b/src/src/PluginStructs/P157_data_struct.h @@ -0,0 +1,248 @@ +#ifndef PLUGINSTRUCTS_P157_DATA_STRUCT_H +#define PLUGINSTRUCTS_P157_DATA_STRUCT_H + +#include "../../_Plugin_Helper.h" +#ifdef USES_P157 + +# include "NoiascaHt16k33.h" +# include + +# define P157_CFG_DISPLAYTYPE PCONFIG(0) +# define P157_CFG_OUTPUTTYPE PCONFIG(1) +# define P157_CFG_BRIGHTNESS PCONFIG(2) +# define P157_CFG_SCROLLSPEED PCONFIG(3) +# define P157_CFG_I2C_ADDRESS PCONFIG(4) +# define P157_CFG_DISPLAYS PCONFIG(5) +# define P157_CFG_FONTSET PCONFIG(6) +# define P157_CFG_SCROLLDELAY PCONFIG(7) +# define P157_CFG_FLAGS PCONFIG_ULONG(0) + +# define P157_DISP_MANUAL 0 +# define P157_DISP_CLOCK24BLNK 1 +# define P157_DISP_CLOCK24 2 +# define P157_DISP_CLOCK12BLNK 3 +# define P157_DISP_CLOCK12 4 +# define P157_DISP_DATE 5 + +# define P157_MODEL_4DGT 0 +# define P157_MODEL_8DGT 1 +# define P157_MODEL_4DGT_7SEG 2 +# define P157_MODEL_8DGT_7SEG 3 + +# define P157_CHAR_EURO 128 +# define P157_CHAR_DEGREE 129 + +# define P157_OPTION_ZEROSLASH 0 // Use zero with slash (14-segment only) +# define P157_OPTION_HIDEDEGREE 1 // Hide degree symbol for temperatures +# define P157_OPTION_SCROLL_ALL 2 // Scroll also when text not linger than display width +# define P157_OPTION_SCROLLTEXT 3 // Scroll text > display width +# define P157_OPTION_SCROLLFULL 4 // Scroll text from the right in, starting with a blank display +# define P157_OPTION_SUPPRESS0 5 // Suppress leading zero on day/hour of Date/Time display +# define P157_OPTION_BLINK_DOT 6 // Use dot on second digit for flashing instead of colon + +# ifdef USES_P073 +# define P157_FEATURE_P073 1 // Use P073 shared functions and fonts when available +# else // ifdef USES_P073 +# define P157_FEATURE_P073 0 +# endif // ifdef USES_P073 + +# if P157_FEATURE_P073 // Use shared fonts and functions from P073 Display - 7-segment display when available +# include "../PluginStructs/P073_data_struct.h" +# endif // if P157_FEATURE_P073 + +# if P157_FEATURE_P073 +# if P073_EXTRA_FONTS +# define P157_EXTRA_FONTS 1 +# else // if P073_EXTRA_FONTS +# define P157_EXTRA_FONTS 0 +# endif // if P073_EXTRA_FONTS +# endif // if P157_FEATURE_P073 + +# ifndef P157_7DDT_COMMAND +# define P157_7DDT_COMMAND 1 // Enable 7ddt by default +# endif // ifndef P157_7DDT_COMMAND +# ifndef P157_EXTRA_FONTS +# define P157_EXTRA_FONTS 0 // Disable extra fonts +# endif // ifndef P157_EXTRA_FONTS +# ifndef P157_SCROLL_TEXT +# define P157_SCROLL_TEXT 1 // Enable scrolling of 7dtext by default +# endif // ifndef P157_SCROLL_TEXT +# ifndef P157_7DBIN_COMMAND +# define P157_7DBIN_COMMAND 1 // Enable input of binary data via 7dbin,uint8_t,... command +# endif // ifndef P157_7DBIN_COMMAND +# ifndef P157_SUPPRESS_ZERO +# define P157_SUPPRESS_ZERO 1 // Enable Suppress leading zero on day/hour +# endif // ifndef P157_SUPPRESS_ZERO + +# if defined(PLUGIN_SET_COLLECTION) && defined(ESP8266) +# if P157_7DDT_COMMAND +# undef P157_7DDT_COMMAND // Optionally activate if .bin file space is problematic, remove the 7ddt command +# define P157_7DDT_COMMAND 0 +# endif // if P157_7DDT_COMMAND +# if P157_EXTRA_FONTS +# undef P157_EXTRA_FONTS // Optionally activate if .bin file space is problematic, remove the font selection and 7dfont command +# define P157_EXTRA_FONTS 0 +# endif // if P157_EXTRA_FONTS +# if P157_SCROLL_TEXT +# undef P157_SCROLL_TEXT // Optionally activate if .bin file space is problematic, remove the scrolling text feature +# define P157_SCROLL_TEXT 0 +# endif // if P157_SCROLL_TEXT +# if P157_7DBIN_COMMAND +# undef P157_7DBIN_COMMAND // Optionally activate if .bin file space is problematic, remove the 7dbin command +# define P157_7DBIN_COMMAND 0 +# endif // if P157_7DBIN_COMMAND +# if P157_SUPPRESS_ZERO +# undef P157_SUPPRESS_ZERO // Optionally activate if .bin file space is problematic, remove the Suppress leading zero feature +# define P157_SUPPRESS_ZERO 0 +# endif // if P157_SUPPRESS_ZERO +# endif // if defined(PLUGIN_SET_COLLECTION) && defined(ESP8266) +// # define P157_DEBUG // Leave out some debugging on demand, activates extra log info in the debug + +const __FlashStringHelper* P157_DisplayModel(uint8_t model); +uint8_t P157_getDefaultDigits(uint8_t displayModel, + uint8_t digits = 0); +void P157_display_output_selector(const __FlashStringHelper *id, + int16_t value); +bool P157_is7SegmentDisplay(uint8_t model); +bool P157_is4DigitDisplay(uint8_t model); + +struct P157_data_struct : public PluginTaskData_base { +public: + + P157_data_struct() = default; + virtual ~P157_data_struct(); + + bool init(struct EventStruct *event); + bool plugin_write(struct EventStruct *event, + const String & string); + bool plugin_once_a_second(struct EventStruct *event); + # if P157_SCROLL_TEXT + bool plugin_ten_per_second(struct EventStruct *event); + # endif // if P157_SCROLL_TEXT + + void printBuffer(); + void fillBufferWithTime(bool sevendgt_now, + uint8_t sevendgt_hours, + uint8_t sevendgt_minutes, + uint8_t sevendgt_seconds, + bool flag12h, + bool suppressLeading0); + void fillBufferWithDate(bool sevendgt_now, + uint8_t sevendgt_day, + uint8_t sevendgt_month, + int sevendgt_year, + bool suppressLeading0); + void put4NumbersInBuffer(const uint8_t nr1, + const uint8_t nr2, + const int8_t nr3, + const int8_t nr4 + # if P157_SUPPRESS_ZERO + , + const bool suppressLeading0 + # endif // if P157_SUPPRESS_ZERO + , + const bool sep + ); + void fillBufferWithNumber(const String& number); + void fillBufferWithTemp(int temperature); + # if P157_7DDT_COMMAND + void fillBufferWithDualTemp(int leftTemperature, + bool leftWithDecimal, + int rightTemperature, + bool rightWithDecimal); + # endif // if P157_7DDT_COMMAND + void fillBufferWithString(const String& textToShow, + bool useBinaryData = false); + # if P157_SCROLL_TEXT || P157_7DBIN_COMMAND + bool isPeriodChar(const char thisChar); + int getEffectiveTextLength(const String& text); + # endif // if P157_SCROLL_TEXT || P157_7DBIN_COMMAND + # if P157_SCROLL_TEXT + bool nextScroll(); + void setTextToScroll(const String& text); + void setScrollSpeed(uint8_t speed); + + bool isScrollEnabled() const { return txtScrolling && scrollAllowed; } + + void setScrollEnabled(bool scroll) { scrollAllowed = scroll; } + + # endif // if P157_SCROLL_TEXT + # ifdef P157_DEBUG + void logBufferContent(String prefix); + # endif // ifdef P157_DEBUG + void fillBufferWithDash(); + void clearBuffer(); + + int dotpos = -1; + char showbuffer[64] = { 0 }; + bool showperiods[64] = { 0 }; + uint8_t i2cAddress = 0; + uint8_t displayModel = 0; + uint8_t output = 0; + uint8_t brightness = 0; + uint8_t displays = 4; + uint8_t fontSet = 0; + bool timesep = false; + bool periods = false; + bool hideDegree = false; + bool suppressLeading0 = false; + uint8_t fontset = 0; + # if P157_7DBIN_COMMAND + bool binaryData = false; + std::vectorbinData; + # endif // P157_7DBIN_COMMAND + # if P157_SCROLL_TEXT + bool txtScrolling = false; + bool scrollAllowed = false; + uint16_t scrollCount = 0; + uint16_t scrollPos = 0; + uint16_t scrollDelay = 0; + uint16_t scrollWait = 0; + bool scrollFull = false; + bool scrollAll = false; + bool zeroSlash = false; + +private: + + uint16_t _scrollSpeed = 0; + # endif // P157_SCROLL_TEXT + # if defined(P157_SCROLL_TEXT) || defined(P157_7DBIN_COMMAND) + String _textToScroll; + # endif // if defined(P157_SCROLL_TEXT) || defined(P157_7DBIN_COMMAND) + String _lastArgument; // Keep last argument for 7dtext and 7dbin + +private: + + Noiasca_ht16k33*ht16k33 = nullptr; + uint8_t bufLen{}; + + bool isInitialized() const { return nullptr != ht16k33; } + + void getDisplayLimits(int32_t& lLimit, + int32_t& uLimit, + int8_t offset = 0, + uint8_t digits = 0); + bool plugin_write_7dn(struct EventStruct *event, + const String & text); + bool plugin_write_7dt(const String& text); + # if P157_7DDT_COMMAND + bool plugin_write_7ddt(const String& text); + # endif // if P157_7DDT_COMMAND + bool plugin_write_7dst(struct EventStruct *event); + bool plugin_write_7dsd(struct EventStruct *event); + bool plugin_write_7dtext(const String& text); + # if P157_EXTRA_FONTS + bool plugin_write_7dfont(struct EventStruct *event, + const String & text); + # endif // if P157_EXTRA_FONTS + # if P157_7DBIN_COMMAND + bool plugin_write_7dbin(const String& text, + const uint8_t offset); + # endif // if P157_7DBIN_COMMAND + bool plugin_write_7digit(const String& text); + const char periodchars[4] = { '.', ',', ':', ';' }; + +}; + +#endif // ifdef USES_P157 +#endif // ifndef PLUGINSTRUCTS_P157_DATA_STRUCT_H diff --git a/src/src/PluginStructs/P165_data_struct.h b/src/src/PluginStructs/P165_data_struct.h index 7b7bdcbbc8..1754f7868c 100644 --- a/src/src/PluginStructs/P165_data_struct.h +++ b/src/src/PluginStructs/P165_data_struct.h @@ -26,11 +26,11 @@ # endif // if P165_FEATURE_P073 # if P165_FEATURE_P073 -# ifdef P073_EXTRA_FONTS // FIXME to use #if instead of #ifdef after P073 improvements from PR #5091 are merged +# if P073_EXTRA_FONTS # define P165_EXTRA_FONTS 1 -# else // ifdef P073_EXTRA_FONTS +# else // if P073_EXTRA_FONTS # define P165_EXTRA_FONTS 0 -# endif // ifdef P073_EXTRA_FONTS +# endif // if P073_EXTRA_FONTS # endif // if P165_FEATURE_P073 # ifndef P165_FEATURE_GROUPCOLOR