mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 02:34:12 +01:00
Update nextion.h
This commit is contained in:
parent
0d9f5ef363
commit
28f2a7f99c
1 changed files with 28 additions and 17 deletions
|
@ -87,7 +87,8 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* This will change the background color of the component `button` to blue.
|
* This will change the background color of the component `button` to blue.
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to
|
||||||
|
* Nextion HMI colors.
|
||||||
*/
|
*/
|
||||||
void set_component_background_color(const char *component, const char *color);
|
void set_component_background_color(const char *component, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -100,9 +101,10 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* it.set_component_pressed_background_color("button", "17013");
|
* it.set_component_pressed_background_color("button", "17013");
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* This will change the pressed background color of the component `button` to blue. This is the background color that is shown when the
|
* This will change the pressed background color of the component `button` to blue. This is the background color that
|
||||||
* component is pressed.
|
* is shown when the component is pressed. Use this [color
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI
|
||||||
|
* colors.
|
||||||
*/
|
*/
|
||||||
void set_component_pressed_background_color(const char *component, const char *color);
|
void set_component_pressed_background_color(const char *component, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +118,8 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* This will change the font color of the component `textview` to a blue color.
|
* This will change the font color of the component `textview` to a blue color.
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to
|
||||||
|
* Nextion HMI colors.
|
||||||
*/
|
*/
|
||||||
void set_component_font_color(const char *component, const char *color);
|
void set_component_font_color(const char *component, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -130,7 +133,8 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* This will change the pressed font color of the component `button` to a blue color.
|
* This will change the pressed font color of the component `button` to a blue color.
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to
|
||||||
|
* Nextion HMI colors.
|
||||||
*/
|
*/
|
||||||
void set_component_pressed_font_color(const char *component, const char *color);
|
void set_component_pressed_font_color(const char *component, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -262,8 +266,9 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* fill_area(50, 50, 100, 100, "17013");
|
* fill_area(50, 50, 100, 100, "17013");
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Fills an area that starts at x coordiante `50` and y coordinate `50` with a height of `100` and width of `100` with the color of blue.
|
* Fills an area that starts at x coordiante `50` and y coordinate `50` with a height of `100` and width of `100` with
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors
|
* the color of blue. Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to
|
||||||
|
* convert color codes to Nextion HMI colors
|
||||||
*/
|
*/
|
||||||
void fill_area(int x1, int y1, int width, int height, const char *color);
|
void fill_area(int x1, int y1, int width, int height, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -279,8 +284,10 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* it.line(50, 50, 75, 75, "17013");
|
* it.line(50, 50, 75, 75, "17013");
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Makes a line that starts at x coordinate `50` and y coordinate `50` and ends at x coordinate `75` and y coordinate `75` with the color of blue.
|
* Makes a line that starts at x coordinate `50` and y coordinate `50` and ends at x coordinate `75` and y coordinate
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* `75` with the color of blue. Use this [color
|
||||||
|
* picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI
|
||||||
|
* colors.
|
||||||
*/
|
*/
|
||||||
void line(int x1, int y1, int x2, int y2, const char *color);
|
void line(int x1, int y1, int x2, int y2, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -296,8 +303,10 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* it.rectangle(25, 35, 40, 50, "17013");
|
* it.rectangle(25, 35, 40, 50, "17013");
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Makes a outline of a rectangle that starts at x coordinate `25` and y coordinate `35` and has a width of `40` and a length of `50` with color of blue.
|
* Makes a outline of a rectangle that starts at x coordinate `25` and y coordinate `35` and has a width of `40` and a
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* length of `50` with color of blue. Use this [color
|
||||||
|
* picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI
|
||||||
|
* colors.
|
||||||
*/
|
*/
|
||||||
void rectangle(int x1, int y1, int width, int height, const char *color);
|
void rectangle(int x1, int y1, int width, int height, const char *color);
|
||||||
/**
|
/**
|
||||||
|
@ -321,7 +330,8 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Makes a filled circle at the x cordinates `25` and y coordinate `25` with a radius of `10` with a color of blue.
|
* Makes a filled circle at the x cordinates `25` and y coordinate `25` with a radius of `10` with a color of blue.
|
||||||
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to Nextion HMI colors.
|
* Use this [color picker](https://nodtem66.github.io/nextion-hmi-color-convert/index.html) to convert color codes to
|
||||||
|
* Nextion HMI colors.
|
||||||
*/
|
*/
|
||||||
void filled_circle(int center_x, int center_y, int radius, const char *color);
|
void filled_circle(int center_x, int center_y, int radius, const char *color);
|
||||||
|
|
||||||
|
@ -346,7 +356,8 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||||
* it.set_touch_sleep_timeout(30);
|
* it.set_touch_sleep_timeout(30);
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* After 30 seconds the display will go to sleep. Note: the display will only wakeup by a restart or by setting up `thup`.
|
* After 30 seconds the display will go to sleep. Note: the display will only wakeup by a restart or by setting up
|
||||||
|
* `thup`.
|
||||||
*/
|
*/
|
||||||
void set_touch_sleep_timeout(uint16_t timeout);
|
void set_touch_sleep_timeout(uint16_t timeout);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue