From a02accab9e80d743a78fc46fdb7b460fe3360c1c Mon Sep 17 00:00:00 2001 From: huangxiaoming Date: Tue, 11 Oct 2016 14:31:13 +0800 Subject: [PATCH] Organize the annotation --- NexButton.cpp | 240 +++--- NexButton.h | 338 ++++----- NexCheckbox.cpp | 42 +- NexCheckbox.h | 85 ++- NexDualStateButton.cpp | 694 +++++++++--------- NexDualStateButton.h | 486 ++++++------ NexGauge.cpp | 88 +-- NexGauge.h | 112 +-- NexNumber.cpp | 526 ++++++------- NexNumber.h | 374 +++++----- NexProgressBar.cpp | 44 +- NexProgressBar.h | 56 +- NexRadio.cpp | 44 +- NexRadio.h | 84 +-- NexScrolltext.cpp | 166 ++--- NexScrolltext.h | 285 ++++--- NexSlider.cpp | 132 ++-- NexSlider.h | 168 ++--- NexText.cpp | 130 ++-- NexText.h | 196 ++--- NexTimer.cpp | 230 +++--- NexTimer.h | 241 +++--- NexVariable.h | 29 +- NexWaveform.cpp | 112 +-- NexWaveform.h | 140 ++-- .../_comp_button_8ino-example.html | 2 +- .../_comp_button_8ino_source.html | 2 +- .../_comp_crop_8ino-example.html | 2 +- doc/Documentation/_comp_crop_8ino_source.html | 2 +- .../_comp_dual_state_button_8ino-example.html | 2 +- .../_comp_dual_state_button_8ino_source.html | 2 +- .../_comp_gauge_8ino-example.html | 2 +- .../_comp_gauge_8ino_source.html | 2 +- .../_comp_hotspot_8ino-example.html | 2 +- .../_comp_hotspot_8ino_source.html | 2 +- .../_comp_number_8ino-example.html | 2 +- .../_comp_number_8ino_source.html | 2 +- .../_comp_page_8ino-example.html | 2 +- doc/Documentation/_comp_page_8ino_source.html | 2 +- .../_comp_picture_8ino-example.html | 2 +- .../_comp_picture_8ino_source.html | 2 +- .../_comp_progress_bar_8ino-example.html | 2 +- .../_comp_progress_bar_8ino_source.html | 2 +- .../_comp_slider_8ino-example.html | 2 +- .../_comp_slider_8ino_source.html | 2 +- .../_comp_text_8ino-example.html | 2 +- doc/Documentation/_comp_text_8ino_source.html | 2 +- .../_comp_timer_8ino-example.html | 2 +- .../_comp_timer_8ino_source.html | 2 +- .../_comp_waveform_8ino-example.html | 2 +- .../_comp_waveform_8ino_source.html | 2 +- doc/Documentation/_nex_button_8cpp.html | 2 +- .../_nex_button_8cpp_source.html | 2 +- doc/Documentation/_nex_button_8h.html | 2 +- doc/Documentation/_nex_button_8h_source.html | 2 +- doc/Documentation/_nex_config_8h.html | 2 +- doc/Documentation/_nex_config_8h_source.html | 2 +- doc/Documentation/_nex_crop_8cpp.html | 2 +- doc/Documentation/_nex_crop_8cpp_source.html | 2 +- doc/Documentation/_nex_crop_8h.html | 2 +- doc/Documentation/_nex_crop_8h_source.html | 2 +- .../_nex_dual_state_button_8cpp.html | 2 +- .../_nex_dual_state_button_8cpp_source.html | 2 +- .../_nex_dual_state_button_8h.html | 2 +- .../_nex_dual_state_button_8h_source.html | 2 +- doc/Documentation/_nex_gauge_8cpp.html | 2 +- doc/Documentation/_nex_gauge_8cpp_source.html | 2 +- doc/Documentation/_nex_gauge_8h.html | 2 +- doc/Documentation/_nex_gauge_8h_source.html | 2 +- doc/Documentation/_nex_hardware_8cpp.html | 2 +- .../_nex_hardware_8cpp_source.html | 2 +- doc/Documentation/_nex_hardware_8h.html | 2 +- .../_nex_hardware_8h_source.html | 2 +- doc/Documentation/_nex_hotspot_8cpp.html | 2 +- .../_nex_hotspot_8cpp_source.html | 2 +- doc/Documentation/_nex_hotspot_8h.html | 2 +- doc/Documentation/_nex_hotspot_8h_source.html | 2 +- doc/Documentation/_nex_number_8cpp.html | 2 +- .../_nex_number_8cpp_source.html | 14 +- doc/Documentation/_nex_number_8h.html | 2 +- doc/Documentation/_nex_number_8h_source.html | 2 +- doc/Documentation/_nex_object_8cpp.html | 2 +- .../_nex_object_8cpp_source.html | 2 +- doc/Documentation/_nex_object_8h.html | 2 +- doc/Documentation/_nex_object_8h_source.html | 2 +- doc/Documentation/_nex_page_8cpp.html | 2 +- doc/Documentation/_nex_page_8cpp_source.html | 2 +- doc/Documentation/_nex_page_8h.html | 2 +- doc/Documentation/_nex_page_8h_source.html | 2 +- doc/Documentation/_nex_picture_8cpp.html | 2 +- .../_nex_picture_8cpp_source.html | 2 +- doc/Documentation/_nex_picture_8h.html | 2 +- doc/Documentation/_nex_picture_8h_source.html | 2 +- doc/Documentation/_nex_progress_bar_8cpp.html | 2 +- .../_nex_progress_bar_8cpp_source.html | 2 +- doc/Documentation/_nex_progress_bar_8h.html | 2 +- .../_nex_progress_bar_8h_source.html | 2 +- doc/Documentation/_nex_slider_8cpp.html | 2 +- .../_nex_slider_8cpp_source.html | 2 +- doc/Documentation/_nex_slider_8h.html | 2 +- doc/Documentation/_nex_slider_8h_source.html | 2 +- doc/Documentation/_nex_text_8cpp.html | 2 +- doc/Documentation/_nex_text_8cpp_source.html | 2 +- doc/Documentation/_nex_text_8h.html | 2 +- doc/Documentation/_nex_text_8h_source.html | 2 +- doc/Documentation/_nex_timer_8cpp.html | 2 +- doc/Documentation/_nex_timer_8cpp_source.html | 2 +- doc/Documentation/_nex_timer_8h.html | 2 +- doc/Documentation/_nex_timer_8h_source.html | 7 +- doc/Documentation/_nex_touch_8cpp.html | 2 +- doc/Documentation/_nex_touch_8cpp_source.html | 2 +- doc/Documentation/_nex_touch_8h.html | 2 +- doc/Documentation/_nex_touch_8h_source.html | 2 +- doc/Documentation/_nex_waveform_8cpp.html | 2 +- .../_nex_waveform_8cpp_source.html | 4 +- doc/Documentation/_nex_waveform_8h.html | 2 +- .../_nex_waveform_8h_source.html | 2 +- doc/Documentation/_nextion_8h.html | 2 +- doc/Documentation/_nextion_8h_source.html | 2 +- doc/Documentation/annotated.html | 2 +- .../class_nex_button-members.html | 2 +- doc/Documentation/class_nex_button.html | 2 +- doc/Documentation/class_nex_crop-members.html | 2 +- doc/Documentation/class_nex_crop.html | 2 +- .../class_nex_d_s_button-members.html | 2 +- doc/Documentation/class_nex_d_s_button.html | 2 +- .../class_nex_gauge-members.html | 2 +- doc/Documentation/class_nex_gauge.html | 2 +- .../class_nex_hotspot-members.html | 2 +- doc/Documentation/class_nex_hotspot.html | 2 +- .../class_nex_number-members.html | 2 +- doc/Documentation/class_nex_number.html | 2 +- .../class_nex_object-members.html | 2 +- doc/Documentation/class_nex_object.html | 2 +- doc/Documentation/class_nex_page-members.html | 2 +- doc/Documentation/class_nex_page.html | 2 +- .../class_nex_picture-members.html | 2 +- doc/Documentation/class_nex_picture.html | 2 +- .../class_nex_progress_bar-members.html | 2 +- doc/Documentation/class_nex_progress_bar.html | 2 +- .../class_nex_slider-members.html | 2 +- doc/Documentation/class_nex_slider.html | 2 +- doc/Documentation/class_nex_text-members.html | 2 +- doc/Documentation/class_nex_text.html | 2 +- .../class_nex_timer-members.html | 2 +- doc/Documentation/class_nex_timer.html | 2 +- .../class_nex_touch-members.html | 2 +- doc/Documentation/class_nex_touch.html | 2 +- .../class_nex_waveform-members.html | 2 +- doc/Documentation/class_nex_waveform.html | 2 +- doc/Documentation/classes.html | 2 +- .../dir_2af451c22587252d0014dbc596e2e19a.html | 2 +- .../dir_3a828b7214103d705cc83e20f29bdad9.html | 2 +- .../dir_472f54fb1d9b74971d8e15d62f212bd3.html | 2 +- .../dir_4b43661efaa18af91f213d2681ebd37e.html | 2 +- .../dir_53835f0dfcb7abf9d97bc46682fab859.html | 2 +- .../dir_7962cac16a99e8bbaaea18abede03fcb.html | 2 +- .../dir_8dcbebf38b229bfa7bb34d68bf824093.html | 2 +- .../dir_9bbf8342b0f9a157b7af08fe1412fc17.html | 2 +- .../dir_a48692e2802a027399b146b680655303.html | 2 +- .../dir_c918e8bf3fc71f849978cdb0d900e61c.html | 2 +- .../dir_ce36ac18ad3deaf5eae0bd2e09775a7d.html | 2 +- .../dir_d28a4824dc47e487b107a5db32ef43c4.html | 2 +- .../dir_f3d39c87bc262720c50d5e3885667b8a.html | 2 +- .../dir_f76977d9ffe8ddf3ad01f3d689aa5df4.html | 2 +- doc/Documentation/doxygen_8h.html | 2 +- doc/Documentation/doxygen_8h_source.html | 2 +- doc/Documentation/examples.html | 2 +- doc/Documentation/files.html | 2 +- doc/Documentation/functions.html | 2 +- doc/Documentation/functions_func.html | 2 +- doc/Documentation/globals.html | 2 +- doc/Documentation/globals_defs.html | 2 +- doc/Documentation/globals_func.html | 2 +- doc/Documentation/globals_type.html | 2 +- doc/Documentation/group___component.html | 2 +- doc/Documentation/group___configuration.html | 2 +- doc/Documentation/group___core_a_p_i.html | 2 +- doc/Documentation/group___get_started.html | 2 +- doc/Documentation/group___touch_event.html | 2 +- doc/Documentation/hierarchy.html | 2 +- doc/Documentation/index.html | 2 +- doc/Documentation/md_readme.html | 2 +- doc/Documentation/md_release_notes.html | 2 +- doc/Documentation/modules.html | 2 +- doc/Documentation/pages.html | 2 +- doc/Documentation/readme_8md_source.html | 2 +- .../release__notes_8md_source.html | 2 +- 188 files changed, 2695 insertions(+), 2692 deletions(-) diff --git a/NexButton.cpp b/NexButton.cpp index 3fe7988..37aa3a9 100755 --- a/NexButton.cpp +++ b/NexButton.cpp @@ -44,17 +44,17 @@ bool NexButton::setText(const char *buffer) uint32_t NexButton::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -63,26 +63,26 @@ bool NexButton::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_press_background_color_bco2(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco2"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_press_background_color_bco2(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -91,26 +91,26 @@ bool NexButton::Set_press_background_color_bco2(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -119,26 +119,26 @@ bool NexButton::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_press_font_color_pco2(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco2"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_press_font_color_pco2(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -147,26 +147,26 @@ bool NexButton::Set_press_font_color_pco2(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_place_xcen(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".xcen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_place_xcen(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -175,26 +175,26 @@ bool NexButton::Set_place_xcen(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_place_ycen(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".ycen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_place_ycen(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -203,26 +203,26 @@ bool NexButton::Set_place_ycen(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::getFont(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".font"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::setFont(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -231,26 +231,26 @@ bool NexButton::setFont(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_background_cropi_picc(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_background_crop_picc(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -259,21 +259,21 @@ bool NexButton::Set_background_crop_picc(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_press_background_crop_picc2(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc2"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_press_background_crop_picc2(uint32_t number) @@ -287,26 +287,26 @@ bool NexButton::Set_press_background_crop_picc2(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_background_image_pic(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pic"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_background_image_pic(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -315,26 +315,26 @@ bool NexButton::Set_background_image_pic(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexButton::Get_press_background_image_pic2(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pic2"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic2"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexButton::Set_press_background_image_pic2(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -343,9 +343,9 @@ bool NexButton::Set_press_background_image_pic2(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } diff --git a/NexButton.h b/NexButton.h index 853c1d8..66d01c7 100755 --- a/NexButton.h +++ b/NexButton.h @@ -60,179 +60,179 @@ public: /* methods */ /** * Get bco attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get bco2 attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_press_background_color_bco2(uint32_t *number); - - /** - * Set bco2 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_press_background_color_bco2(uint32_t number); - - /** - * Get pco attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); - - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); - - /** - * Get pco2 attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_press_font_color_pco2(uint32_t *number); - - /** - * Set pco2 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_press_font_color_pco2(uint32_t number); - - /** - * Get xcen attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_place_xcen(uint32_t *number); - - /** - * Set xcen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_xcen(uint32_t number); - - /** - * Get ycen attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_place_ycen(uint32_t *number); - - /** - * Set ycen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_ycen(uint32_t number); - - /** - * Get font attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t getFont(uint32_t *number); - - /** - * Set font attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setFont(uint32_t number); - - /** - * Get picc attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_background_cropi_picc(uint32_t *number); - - /** - * Set picc attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_crop_picc(uint32_t number); - - /** - * Get picc2 attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_press_background_crop_picc2(uint32_t *number); - - /** - * Set picc2 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_press_background_crop_picc2(uint32_t number); - - /** - * Get pic attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_background_image_pic(uint32_t *number); - - /** - * Set pic attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_image_pic(uint32_t number); - - /** - * Get pic2 attribute of component - * - * @param number - buffer storing data return - * @return the length of the data - */ - uint32_t Get_press_background_image_pic2(uint32_t *number); + /** + * Get bco2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_background_color_bco2(uint32_t *number); /** - * Set pic2 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_press_background_image_pic2(uint32_t number); + * Set bco2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_background_color_bco2(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get pco2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_font_color_pco2(uint32_t *number); + + /** + * Set pco2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_font_color_pco2(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_background_cropi_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get picc2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_background_crop_picc2(uint32_t *number); + + /** + * Set picc2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_background_crop_picc2(uint32_t number); + + /** + * Get pic attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); + + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); + + /** + * Get pic2 attribute of component + * + * @param number - buffer storing data return + * @return the length of the data + */ + uint32_t Get_press_background_image_pic2(uint32_t *number); + + /** + * Set pic2 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_press_background_image_pic2(uint32_t number); }; /** * @} diff --git a/NexCheckbox.cpp b/NexCheckbox.cpp index 3e358d7..12f1528 100755 --- a/NexCheckbox.cpp +++ b/NexCheckbox.cpp @@ -44,12 +44,12 @@ bool NexCheckbox::setValue(uint32_t number) uint32_t NexCheckbox::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexCheckbox::Set_background_color_bco(uint32_t number) @@ -63,26 +63,26 @@ bool NexCheckbox::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexCheckbox::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexCheckbox::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -91,9 +91,9 @@ bool NexCheckbox::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } \ No newline at end of file diff --git a/NexCheckbox.h b/NexCheckbox.h index dbde242..d398286 100755 --- a/NexCheckbox.h +++ b/NexCheckbox.h @@ -41,54 +41,53 @@ public: /* methods */ */ NexCheckbox(uint8_t pid, uint8_t cid, const char *name); - /** - * Get val attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getValue(uint32_t *number); + /** + * Get val attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getValue(uint32_t *number); - /** - * Set val attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setValue(uint32_t number); + /** + * Set val attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setValue(uint32_t number); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); - + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); }; /** * @} diff --git a/NexDualStateButton.cpp b/NexDualStateButton.cpp index e938b9a..7f2e5d0 100755 --- a/NexDualStateButton.cpp +++ b/NexDualStateButton.cpp @@ -1,347 +1,347 @@ -/** - * @file NexDualStateButton.cpp - * - * The implementation of class NexDSButton. - * - * @author huang xianming (email:) - * @date 2015/11/11 - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#include "NexDualStateButton.h" - -NexDSButton::NexDSButton(uint8_t pid, uint8_t cid, const char *name) - :NexTouch(pid, cid, name) -{ -} - -bool NexDSButton::getValue(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".val"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::setValue(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".val="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint16_t NexDSButton::getText(char *buffer, uint16_t len) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".txt"; - sendCommand(cmd.c_str()); - return recvRetString(buffer,len); -} - -bool NexDSButton::setText(const char *buffer) -{ - String cmd; - cmd += getObjName(); - cmd += ".txt=\""; - cmd += buffer; - cmd += "\""; - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_state0_color_bco0(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco0"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_state0_color_bco0(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".bco0="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_state1_color_bco1(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco1"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_state1_color_bco1(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".bco1="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_font_color_pco(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_font_color_pco(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".pco="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_place_xcen(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".xcen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_place_xcen(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".xcen="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_place_ycen(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".ycen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_place_ycen(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".ycen="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::getFont(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".font"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::setFont(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".font="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_state0_crop_picc0(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc0"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_state0_crop_picc0(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".picc0="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_state1_crop_picc1(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc1"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_state1_crop_picc1(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".picc1="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_state0_image_pic0(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pic0"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_state0_image_pic0(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".pic0="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexDSButton::Get_state1_image_pic1(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pic1"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexDSButton::Set_state1_image_pic1(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".pic1="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - - +/** + * @file NexDualStateButton.cpp + * + * The implementation of class NexDSButton. + * + * @author huang xianming (email:) + * @date 2015/11/11 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#include "NexDualStateButton.h" + +NexDSButton::NexDSButton(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +bool NexDSButton::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint16_t NexDSButton::getText(char *buffer, uint16_t len) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".txt"; + sendCommand(cmd.c_str()); + return recvRetString(buffer,len); +} + +bool NexDSButton::setText(const char *buffer) +{ + String cmd; + cmd += getObjName(); + cmd += ".txt=\""; + cmd += buffer; + cmd += "\""; + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state0_color_bco0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state0_color_bco0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state1_color_bco1(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco1"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state1_color_bco1(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco1="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state0_crop_picc0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state0_crop_picc0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state1_crop_picc1(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc1"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state1_crop_picc1(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc1="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state0_image_pic0(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state0_image_pic0(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic0="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexDSButton::Get_state1_image_pic1(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pic1"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexDSButton::Set_state1_image_pic1(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic1="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + + diff --git a/NexDualStateButton.h b/NexDualStateButton.h index 6c70d91..428baeb 100755 --- a/NexDualStateButton.h +++ b/NexDualStateButton.h @@ -1,243 +1,243 @@ -/** - * @file NexDualStateButton.h - * - * The definition of class NexDSButton. - * - * @author huang xianming (email:) - * @date 2015/11/11 - * - * - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#ifndef __NEXDSBUTTON_H__ -#define __NEXDSBUTTON_H__ - -#include "NexTouch.h" -#include "NexHardware.h" -/** - * @addtogroup Component - * @{ - */ - -/** - * NexDSButton component. - * - * Commonly, you want to do something after push and pop it. It is recommanded that only - * call @ref NexTouch::attachPop to satisfy your purpose. - * - * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. - */ -class NexDSButton: public NexTouch -{ -public: /* methods */ - /** - * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); - */ - NexDSButton(uint8_t pid, uint8_t cid, const char *name); - - /** - * Get number attribute of component. - * - * @param number - buffer storing text returned. - * @return The real length of text returned. - */ - bool getValue(uint32_t *number); - - /** - * Set number attribute of component. - * - * @param number - number buffer. - * @return true if success, false for failure. - */ - bool setValue(uint32_t number); - - /** - * Get text attribute of component. - * - * @param buffer - buffer storing text returned. - * @param len - length of buffer. - * @return The real length of text returned. - */ - uint16_t getText(char *buffer, uint16_t len); - - /** - * Set text attribute of component. - * - * @param buffer - text buffer terminated with '\0'. - * @return true if success, false for failure. - */ - bool setText(const char *buffer); - - /** - * Get bco0 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_state0_color_bco0(uint32_t *number); - - /** - * Set bco0 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_state0_color_bco0(uint32_t number); - - /** - * Get bco1 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_state1_color_bco1(uint32_t *number); - - /** - * Set bco1 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_state1_color_bco1(uint32_t number); - - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); - - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); - - /** - * Get xcen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_xcen(uint32_t *number); - - /** - * Set xcen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_xcen(uint32_t number); - - /** - * Get ycen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_ycen(uint32_t *number); - - /** - * Set ycen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_ycen(uint32_t number); - - /** - * Get font attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getFont(uint32_t *number); - - /** - * Set font attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setFont(uint32_t number); - - /** - * Get picc0 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_state0_crop_picc0(uint32_t *number); - - /** - * Set picc0 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_state0_crop_picc0(uint32_t number); - - /** - * Get picc1 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_state1_crop_picc1(uint32_t *number); - - /** - * Set picc1 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_state1_crop_picc1(uint32_t number); - - /** - * Get pic0 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_state0_image_pic0(uint32_t *number); - - /** - * Set pic0 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_state0_image_pic0(uint32_t number); - - /** - * Get pic1 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_state1_image_pic1(uint32_t *number); - - /** - * Set pic1 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_state1_image_pic1(uint32_t number); -}; -/** - * @} - */ - - - -#endif /* #ifndef __NEXDSBUTTON_H__ */ +/** + * @file NexDualStateButton.h + * + * The definition of class NexDSButton. + * + * @author huang xianming (email:) + * @date 2015/11/11 + * + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXDSBUTTON_H__ +#define __NEXDSBUTTON_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexDSButton component. + * + * Commonly, you want to do something after push and pop it. It is recommanded that only + * call @ref NexTouch::attachPop to satisfy your purpose. + * + * @warning Please do not call @ref NexTouch::attachPush on this component, even though you can. + */ +class NexDSButton: public NexTouch +{ +public: /* methods */ + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexDSButton(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get number attribute of component. + * + * @param number - buffer storing text returned. + * @return The real length of text returned. + */ + bool getValue(uint32_t *number); + + /** + * Set number attribute of component. + * + * @param number - number buffer. + * @return true if success, false for failure. + */ + bool setValue(uint32_t number); + + /** + * Get text attribute of component. + * + * @param buffer - buffer storing text returned. + * @param len - length of buffer. + * @return The real length of text returned. + */ + uint16_t getText(char *buffer, uint16_t len); + + /** + * Set text attribute of component. + * + * @param buffer - text buffer terminated with '\0'. + * @return true if success, false for failure. + */ + bool setText(const char *buffer); + + /** + * Get bco0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state0_color_bco0(uint32_t *number); + + /** + * Set bco0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state0_color_bco0(uint32_t number); + + /** + * Get bco1 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state1_color_bco1(uint32_t *number); + + /** + * Set bco1 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state1_color_bco1(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get picc0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state0_crop_picc0(uint32_t *number); + + /** + * Set picc0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state0_crop_picc0(uint32_t number); + + /** + * Get picc1 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state1_crop_picc1(uint32_t *number); + + /** + * Set picc1 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state1_crop_picc1(uint32_t number); + + /** + * Get pic0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state0_image_pic0(uint32_t *number); + + /** + * Set pic0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state0_image_pic0(uint32_t number); + + /** + * Get pic1 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_state1_image_pic1(uint32_t *number); + + /** + * Set pic1 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_state1_image_pic1(uint32_t number); +}; +/** + * @} + */ + + + +#endif /* #ifndef __NEXDSBUTTON_H__ */ diff --git a/NexGauge.cpp b/NexGauge.cpp index 11e8d21..4f294fb 100755 --- a/NexGauge.cpp +++ b/NexGauge.cpp @@ -45,17 +45,17 @@ bool NexGauge::setValue(uint32_t number) uint32_t NexGauge::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexGauge::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -64,26 +64,26 @@ bool NexGauge::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexGauge::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexGauge::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -92,26 +92,26 @@ bool NexGauge::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexGauge::Get_pointer_thickness_wid(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".wid"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".wid"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexGauge::Set_pointer_thickness_wid(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -120,26 +120,26 @@ bool NexGauge::Set_pointer_thickness_wid(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexGauge::Get_background_cropi_picc(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexGauge::Set_background_crop_picc(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -148,10 +148,10 @@ bool NexGauge::Set_background_crop_picc(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } diff --git a/NexGauge.h b/NexGauge.h index ed8a868..10796ab 100755 --- a/NexGauge.h +++ b/NexGauge.h @@ -55,69 +55,69 @@ public: /* methods */ */ bool setValue(uint32_t number); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); - /** - * Get wid attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_pointer_thickness_wid(uint32_t *number); + /** + * Get wid attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_pointer_thickness_wid(uint32_t *number); - /** - * Set wid attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_pointer_thickness_wid(uint32_t number); + /** + * Set wid attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_pointer_thickness_wid(uint32_t number); - /** - * Get picc attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_cropi_picc(uint32_t *number); + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_cropi_picc(uint32_t *number); - /** - * Set picc attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_crop_picc(uint32_t number); + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); }; /** diff --git a/NexNumber.cpp b/NexNumber.cpp index dd9e610..86217cb 100755 --- a/NexNumber.cpp +++ b/NexNumber.cpp @@ -1,262 +1,266 @@ -/** - * @file NexNumber.cpp - * - * The implementation of class NexNumber. - * - * @author huang xianming (email:) - * @date 2015/8/13 - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ -#include "NexNumber.h" - -NexNumber::NexNumber(uint8_t pid, uint8_t cid, const char *name) - :NexTouch(pid, cid, name) -{ -} - -bool NexNumber::getValue(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".val"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::setValue(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".val="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_background_color_bco(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_background_color_bco(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".bco="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_font_color_pco(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_font_color_pco(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".pco="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_place_xcen(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".xcen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_place_xcen(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".xcen="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_place_ycen(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".ycen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_place_ycen(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".ycen="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::getFont(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".font"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::setFont(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".font="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_number_lenth(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".lenth"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_number_lenth(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".lenth="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_background_crop_picc(uint32_t *number) -{ - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_background_crop_picc(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".picc="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexNumber::Get_background_image_pic(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".pic"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexNumber::Set_background_image_pic(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".pic="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); +/** + * @file NexNumber.cpp + * + * The implementation of class NexNumber. + * + * @author huang xianming (email:) + * @date 2015/8/13 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ +#include "NexNumber.h" + +NexNumber::NexNumber(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +bool NexNumber::getValue(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".val"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::setValue(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".val="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_background_color_bco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_background_color_bco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".bco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_font_color_pco(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_font_color_pco(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pco="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_place_xcen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_place_xcen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".xcen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_place_ycen(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_place_ycen(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".ycen="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::getFont(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::setFont(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".font="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_number_lenth(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".lenth"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_number_lenth(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".lenth="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_background_crop_picc(uint32_t *number) +{ + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_background_crop_picc(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".picc="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexNumber::Get_background_image_pic(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".pic"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexNumber::Set_background_image_pic(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".pic="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); } \ No newline at end of file diff --git a/NexNumber.h b/NexNumber.h index e2b47d8..5f22790 100755 --- a/NexNumber.h +++ b/NexNumber.h @@ -1,187 +1,187 @@ -/** - * @file NexNumber.h - * - * The definition of class NexNumber. - * - * @author Wu Pengfei (email:) - * @date 2015/8/13 - * - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#ifndef __NEXNUMBER_H__ -#define __NEXNUMBER_H__ - -#include "NexTouch.h" -#include "NexHardware.h" -/** - * @addtogroup Component - * @{ - */ - -/** - * NexNumber component. - */ -class NexNumber: public NexTouch -{ -public: /* methods */ - /** - * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); - */ - NexNumber(uint8_t pid, uint8_t cid, const char *name); - - /** - * Get number attribute of component. - * - * @param number - buffer storing text returned. - * @return The real length of text returned. - */ - bool getValue(uint32_t *number); - - /** - * Set number attribute of component. - * - * @param number - number buffer. - * @return true if success, false for failure. - */ - bool setValue(uint32_t number); - - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); - - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); - - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); - - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); - - /** - * Get xcen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_xcen(uint32_t *number); - - /** - * Set xcen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_xcen(uint32_t number); - - /** - * Get ycen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_ycen(uint32_t *number); - - /** - * Set ycen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_ycen(uint32_t number); - - /** - * Get font attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getFont(uint32_t *number); - - /** - * Set font attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setFont(uint32_t number); - - /** - * Get lenth attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_number_lenth(uint32_t *number); - - /** - * Set lenth attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_number_lenth(uint32_t number); - - /** - * Get picc attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_crop_picc(uint32_t *number); - - /** - * Set picc attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_crop_picc(uint32_t number); - - /** - * Get pic attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_image_pic(uint32_t *number); - - /** - * Set pic attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_image_pic(uint32_t number); -}; - -/** - * @} - */ - -#endif /* #ifndef __NEXNUMBER_H__ */ +/** + * @file NexNumber.h + * + * The definition of class NexNumber. + * + * @author Wu Pengfei (email:) + * @date 2015/8/13 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXNUMBER_H__ +#define __NEXNUMBER_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexNumber component. + */ +class NexNumber: public NexTouch +{ +public: /* methods */ + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexNumber(uint8_t pid, uint8_t cid, const char *name); + + /** + * Get number attribute of component. + * + * @param number - buffer storing text returned. + * @return The real length of text returned. + */ + bool getValue(uint32_t *number); + + /** + * Set number attribute of component. + * + * @param number - number buffer. + * @return true if success, false for failure. + */ + bool setValue(uint32_t number); + + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); + + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); + + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); + + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); + + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); + + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); + + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); + + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); + + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); + + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); + + /** + * Get lenth attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_number_lenth(uint32_t *number); + + /** + * Set lenth attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_number_lenth(uint32_t number); + + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_crop_picc(uint32_t *number); + + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); + + /** + * Get pic attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); + + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); +}; + +/** + * @} + */ + +#endif /* #ifndef __NEXNUMBER_H__ */ diff --git a/NexProgressBar.cpp b/NexProgressBar.cpp index a7c5cf0..245dda0 100755 --- a/NexProgressBar.cpp +++ b/NexProgressBar.cpp @@ -45,17 +45,17 @@ bool NexProgressBar::setValue(uint32_t number) uint32_t NexProgressBar::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexProgressBar::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -64,26 +64,26 @@ bool NexProgressBar::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexProgressBar::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexProgressBar::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -92,9 +92,9 @@ bool NexProgressBar::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } diff --git a/NexProgressBar.h b/NexProgressBar.h index 0568609..1948518 100755 --- a/NexProgressBar.h +++ b/NexProgressBar.h @@ -55,37 +55,37 @@ public: /* methods */ */ bool setValue(uint32_t number); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); }; /** diff --git a/NexRadio.cpp b/NexRadio.cpp index 09cb9c4..c80aae5 100755 --- a/NexRadio.cpp +++ b/NexRadio.cpp @@ -44,17 +44,17 @@ bool NexRadio::setValue(uint32_t number) uint32_t NexRadio::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexRadio::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -63,26 +63,26 @@ bool NexRadio::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexRadio::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexRadio::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -91,9 +91,9 @@ bool NexRadio::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } \ No newline at end of file diff --git a/NexRadio.h b/NexRadio.h index 073937e..c36dea7 100755 --- a/NexRadio.h +++ b/NexRadio.h @@ -41,53 +41,53 @@ public: /* methods */ */ NexRadio(uint8_t pid, uint8_t cid, const char *name); - /** - * Get val attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getValue(uint32_t *number); + /** + * Get val attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getValue(uint32_t *number); - /** - * Set val attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setValue(uint32_t number); + /** + * Set val attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setValue(uint32_t number); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); }; /** diff --git a/NexScrolltext.cpp b/NexScrolltext.cpp index 7852b5d..faa207a 100755 --- a/NexScrolltext.cpp +++ b/NexScrolltext.cpp @@ -42,17 +42,17 @@ bool NexScrolltext::setText(const char *buffer) uint32_t NexScrolltext::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexScrolltext::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -61,26 +61,26 @@ bool NexScrolltext::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexScrolltext::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexScrolltext::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -89,26 +89,26 @@ bool NexScrolltext::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexScrolltext::Get_place_xcen(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".xcen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexScrolltext::Set_place_xcen(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -117,26 +117,26 @@ bool NexScrolltext::Set_place_xcen(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexScrolltext::Get_place_ycen(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".ycen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexScrolltext::Set_place_ycen(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -145,26 +145,26 @@ bool NexScrolltext::Set_place_ycen(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexScrolltext::getFont(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".font"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexScrolltext::setFont(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -173,26 +173,26 @@ bool NexScrolltext::setFont(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexScrolltext::Get_background_crop_picc(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexScrolltext::Set_background_crop_picc(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -201,10 +201,10 @@ bool NexScrolltext::Set_background_crop_picc(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } @@ -228,10 +228,10 @@ bool NexScrolltext::Set_background_image_pic(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } @@ -255,10 +255,10 @@ bool NexScrolltext::Set_scroll_dir(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } @@ -276,7 +276,7 @@ bool NexScrolltext::Set_scroll_distance(uint32_t number) char buf[10] = {0}; String cmd; - if (number < 2) + if (number < 2) { number = 2; } @@ -286,10 +286,10 @@ bool NexScrolltext::Set_scroll_distance(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } @@ -316,10 +316,10 @@ bool NexScrolltext::Set_cycle_tim(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } diff --git a/NexScrolltext.h b/NexScrolltext.h index 35ffbeb..caf7f1d 100755 --- a/NexScrolltext.h +++ b/NexScrolltext.h @@ -52,169 +52,168 @@ public: /* methods */ */ bool setText(const char *buffer); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); - /** - * Get xcen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_xcen(uint32_t *number); + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); - /** - * Set xcen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_xcen(uint32_t number); + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); - /** - * Get ycen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_ycen(uint32_t *number); + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); - /** - * Set ycen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_ycen(uint32_t number); + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); - /** - * Get font attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getFont(uint32_t *number); + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); - /** - * Set font attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setFont(uint32_t number); + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); - /** - * Get picc attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_crop_picc(uint32_t *number); + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_crop_picc(uint32_t *number); - /** - * Set picc attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_crop_picc(uint32_t number); + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); - /** - * Get pic attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_image_pic(uint32_t *number); + /** + * Get pic attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); - /** - * Set pic attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_image_pic(uint32_t number); + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); - /** - * Get dir attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_scroll_dir(uint32_t *number); + /** + * Get dir attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_scroll_dir(uint32_t *number); - /** - * Set dir attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_scroll_dir(uint32_t number); + /** + * Set dir attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_scroll_dir(uint32_t number); - /** - * Get dis attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_scroll_distance(uint32_t *number); + /** + * Get dis attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_scroll_distance(uint32_t *number); - /** - * Set dis attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_scroll_distance(uint32_t number); + /** + * Set dis attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_scroll_distance(uint32_t number); - /** - * Get tim attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_cycle_tim(uint32_t *number); + /** + * Get tim attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_cycle_tim(uint32_t *number); - /** - * Set tim attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_cycle_tim(uint32_t number); - - bool enable(void); - bool disable(void); + /** + * Set tim attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_cycle_tim(uint32_t number); + bool enable(void); + bool disable(void); }; /** diff --git a/NexSlider.cpp b/NexSlider.cpp index d4601e3..43ace8c 100755 --- a/NexSlider.cpp +++ b/NexSlider.cpp @@ -44,17 +44,17 @@ bool NexSlider::setValue(uint32_t number) uint32_t NexSlider::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexSlider::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -63,26 +63,26 @@ bool NexSlider::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexSlider::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexSlider::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -91,26 +91,26 @@ bool NexSlider::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexSlider::Get_pointer_thickness_wid(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".wid"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".wid"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexSlider::Set_pointer_thickness_wid(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -119,26 +119,26 @@ bool NexSlider::Set_pointer_thickness_wid(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexSlider::Get_cursor_height_hig(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".hig"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".hig"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexSlider::Set_cursor_height_hig(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -147,26 +147,26 @@ bool NexSlider::Set_cursor_height_hig(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexSlider::getMaxval(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".maxval"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".maxval"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexSlider::setMaxval(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -175,26 +175,26 @@ bool NexSlider::setMaxval(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexSlider::getMinval(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".minval"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".minval"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexSlider::setMinval(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -203,9 +203,9 @@ bool NexSlider::setMinval(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } \ No newline at end of file diff --git a/NexSlider.h b/NexSlider.h index 2404323..47cac68 100755 --- a/NexSlider.h +++ b/NexSlider.h @@ -55,101 +55,101 @@ public: /* methods */ */ bool setValue(uint32_t number); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); - /** - * Get wid attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_pointer_thickness_wid(uint32_t *number); + /** + * Get wid attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_pointer_thickness_wid(uint32_t *number); - /** - * Set wid attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_pointer_thickness_wid(uint32_t number); + /** + * Set wid attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_pointer_thickness_wid(uint32_t number); - /** - * Get hig attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_cursor_height_hig(uint32_t *number); + /** + * Get hig attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_cursor_height_hig(uint32_t *number); - /** - * Set hig attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_cursor_height_hig(uint32_t number); + /** + * Set hig attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_cursor_height_hig(uint32_t number); - /** - * Get maxval attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getMaxval(uint32_t *number); + /** + * Get maxval attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getMaxval(uint32_t *number); - /** - * Set maxval attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setMaxval(uint32_t number); + /** + * Set maxval attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setMaxval(uint32_t number); - /** - * Get minval attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getMinval(uint32_t *number); + /** + * Get minval attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getMinval(uint32_t *number); - /** - * Set minval attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setMinval(uint32_t number); + /** + * Set minval attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setMinval(uint32_t number); }; /** * @} diff --git a/NexText.cpp b/NexText.cpp index 95a05b1..01d5d76 100755 --- a/NexText.cpp +++ b/NexText.cpp @@ -42,17 +42,17 @@ bool NexText::setText(const char *buffer) uint32_t NexText::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexText::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -61,26 +61,26 @@ bool NexText::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexText::Get_font_color_pco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexText::Set_font_color_pco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -89,21 +89,21 @@ bool NexText::Set_font_color_pco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexText::Get_place_xcen(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".xcen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".xcen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexText::Set_place_xcen(uint32_t number) @@ -117,26 +117,26 @@ bool NexText::Set_place_xcen(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexText::Get_place_ycen(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".ycen"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".ycen"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexText::Set_place_ycen(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -145,26 +145,26 @@ bool NexText::Set_place_ycen(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexText::getFont(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".font"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".font"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexText::setFont(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -173,26 +173,26 @@ bool NexText::setFont(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexText::Get_background_crop_picc(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".picc"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".picc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexText::Set_background_crop_picc(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -201,10 +201,10 @@ bool NexText::Set_background_crop_picc(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } diff --git a/NexText.h b/NexText.h index 12b6b69..d2f4787 100755 --- a/NexText.h +++ b/NexText.h @@ -52,117 +52,117 @@ public: /* methods */ */ bool setText(const char *buffer); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get pco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_font_color_pco(uint32_t *number); + /** + * Get pco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_font_color_pco(uint32_t *number); - /** - * Set pco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_font_color_pco(uint32_t number); + /** + * Set pco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_font_color_pco(uint32_t number); - /** - * Get xcen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_xcen(uint32_t *number); + /** + * Get xcen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_xcen(uint32_t *number); - /** - * Set xcen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_xcen(uint32_t number); + /** + * Set xcen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_xcen(uint32_t number); - /** - * Get ycen attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_place_ycen(uint32_t *number); + /** + * Get ycen attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_place_ycen(uint32_t *number); - /** - * Set ycen attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_place_ycen(uint32_t number); + /** + * Set ycen attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_place_ycen(uint32_t number); - /** - * Get font attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getFont(uint32_t *number); + /** + * Get font attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getFont(uint32_t *number); - /** - * Set font attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setFont(uint32_t number); + /** + * Set font attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setFont(uint32_t number); - /** - * Get picc attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_crop_picc(uint32_t *number); + /** + * Get picc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_crop_picc(uint32_t *number); - /** - * Set picc attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_crop_picc(uint32_t number); + /** + * Set picc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_crop_picc(uint32_t number); - /** - * Get pic attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_image_pic(uint32_t *number); + /** + * Get pic attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_image_pic(uint32_t *number); - /** - * Set pic attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_image_pic(uint32_t number); + /** + * Set pic attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_image_pic(uint32_t number); }; /** diff --git a/NexTimer.cpp b/NexTimer.cpp index 43744dc..9d69527 100755 --- a/NexTimer.cpp +++ b/NexTimer.cpp @@ -1,115 +1,115 @@ -/** - * @file NexTimer.cpp - * - * The implementation of class NexTimer. - * - * @author huang xianming (email:) - * @date 2015/8/26 - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#include "NexTimer.h" - -NexTimer::NexTimer(uint8_t pid, uint8_t cid, const char *name) - :NexTouch(pid, cid, name) -{ -} - -void NexTimer::attachTimer(NexTouchEventCb timer, void *ptr) -{ - NexTouch::attachPop(timer, ptr); -} - -void NexTimer::detachTimer(void) -{ - NexTouch::detachPop(); -} - -bool NexTimer::getCycle(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".tim"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexTimer::setCycle(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - if (number < 50) - { - number = 50; - } - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".tim="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - - -bool NexTimer::enable(void) -{ - char buf[10] = {0}; - String cmd; - utoa(1, buf, 10); - cmd += getObjName(); - cmd += ".en="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -bool NexTimer::disable(void) -{ - char buf[10] = {0}; - String cmd; - utoa(0, buf, 10); - cmd += getObjName(); - cmd += ".en="; - cmd += buf; - - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - -uint32_t NexTimer::Get_cycle_tim(uint32_t *number) -{ - String cmd = String("get "); - cmd += getObjName(); - cmd += ".tim"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); -} - -bool NexTimer::Set_cycle_tim(uint32_t number) -{ - char buf[10] = {0}; - String cmd; - if (number < 8) - { - number = 8; - } - utoa(number, buf, 10); - cmd += getObjName(); - cmd += ".tim="; - cmd += buf; - sendCommand(cmd.c_str()); - - cmd = ""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); - return recvRetCommandFinished(); -} - +/** + * @file NexTimer.cpp + * + * The implementation of class NexTimer. + * + * @author huang xianming (email:) + * @date 2015/8/26 + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#include "NexTimer.h" + +NexTimer::NexTimer(uint8_t pid, uint8_t cid, const char *name) + :NexTouch(pid, cid, name) +{ +} + +void NexTimer::attachTimer(NexTouchEventCb timer, void *ptr) +{ + NexTouch::attachPop(timer, ptr); +} + +void NexTimer::detachTimer(void) +{ + NexTouch::detachPop(); +} + +bool NexTimer::getCycle(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".tim"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexTimer::setCycle(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + if (number < 50) + { + number = 50; + } + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".tim="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + + +bool NexTimer::enable(void) +{ + char buf[10] = {0}; + String cmd; + utoa(1, buf, 10); + cmd += getObjName(); + cmd += ".en="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +bool NexTimer::disable(void) +{ + char buf[10] = {0}; + String cmd; + utoa(0, buf, 10); + cmd += getObjName(); + cmd += ".en="; + cmd += buf; + + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + +uint32_t NexTimer::Get_cycle_tim(uint32_t *number) +{ + String cmd = String("get "); + cmd += getObjName(); + cmd += ".tim"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); +} + +bool NexTimer::Set_cycle_tim(uint32_t number) +{ + char buf[10] = {0}; + String cmd; + if (number < 8) + { + number = 8; + } + utoa(number, buf, 10); + cmd += getObjName(); + cmd += ".tim="; + cmd += buf; + sendCommand(cmd.c_str()); + + cmd = ""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); + return recvRetCommandFinished(); +} + diff --git a/NexTimer.h b/NexTimer.h index 62f6333..2bb24a6 100755 --- a/NexTimer.h +++ b/NexTimer.h @@ -1,121 +1,120 @@ -/** - * @file NexTimer.h - * - * The definition of class NexTimer. - * - * @author huang xianming (email:) - * @date 2015/8/26 - * - * @copyright - * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - */ - -#ifndef __NEXTIMER_H__ -#define __NEXTIMER_H__ - -#include "NexTouch.h" -#include "NexHardware.h" -/** - * @addtogroup Component - * @{ - */ - -/** - * NexTimer component. - * - * Commonly, you want to do something after set timer cycle and enable it,and the cycle value - * must be greater than 50 - * - */ -class NexTimer: public NexTouch -{ -public: /* methods */ - - /** - * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); - */ - NexTimer(uint8_t pid, uint8_t cid, const char *name); - - /** - * Attach an callback function of timer respond event. - * - * @param timer - callback called with ptr when a timer respond event occurs. - * @param ptr - parameter passed into push[default:NULL]. - * @return none. - * - * @note If calling this method multiply, the last call is valid. - */ - void attachTimer(NexTouchEventCb timer, void *ptr = NULL); - - /** - * Detach an callback function. - * - * @return none. - */ - void detachTimer(void); - - /** - * Get the value of timer cycle val. - * - * @param number - an output parameter to save the value of timer cycle. - * - * @retval true - success. - * @retval false - failed. - */ - bool getCycle(uint32_t *number); - - /** - * Set the value of timer cycle val. - * - * @param number - the value of timer cycle. - * - * @retval true - success. - * @retval false - failed. - * - * @warning the cycle value must be greater than 50. - */ - bool setCycle(uint32_t number); - - /** - * contorl timer enable. - * - * @retval true - success. - * @retval false - failed. - */ - bool enable(void); - - /** - * contorl timer disable. - * - * @retval true - success. - * @retval false - failed. - */ - bool disable(void); - - /** - * Get tim attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_cycle_tim(uint32_t *number); - - /** - * Set tim attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_cycle_tim(uint32_t number); - -}; -/** - * @} - */ - - -#endif /* #ifndef __NEXTIMER_H__ */ +/** + * @file NexTimer.h + * + * The definition of class NexTimer. + * + * @author huang xianming (email:) + * @date 2015/8/26 + * + * @copyright + * Copyright (C) 2014-2015 ITEAD Intelligent Systems Co., Ltd. \n + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + */ + +#ifndef __NEXTIMER_H__ +#define __NEXTIMER_H__ + +#include "NexTouch.h" +#include "NexHardware.h" +/** + * @addtogroup Component + * @{ + */ + +/** + * NexTimer component. + * + * Commonly, you want to do something after set timer cycle and enable it,and the cycle value + * must be greater than 50 + * + */ +class NexTimer: public NexTouch +{ +public: /* methods */ + + /** + * @copydoc NexObject::NexObject(uint8_t pid, uint8_t cid, const char *name); + */ + NexTimer(uint8_t pid, uint8_t cid, const char *name); + + /** + * Attach an callback function of timer respond event. + * + * @param timer - callback called with ptr when a timer respond event occurs. + * @param ptr - parameter passed into push[default:NULL]. + * @return none. + * + * @note If calling this method multiply, the last call is valid. + */ + void attachTimer(NexTouchEventCb timer, void *ptr = NULL); + + /** + * Detach an callback function. + * + * @return none. + */ + void detachTimer(void); + + /** + * Get the value of timer cycle val. + * + * @param number - an output parameter to save the value of timer cycle. + * + * @retval true - success. + * @retval false - failed. + */ + bool getCycle(uint32_t *number); + + /** + * Set the value of timer cycle val. + * + * @param number - the value of timer cycle. + * + * @retval true - success. + * @retval false - failed. + * + * @warning the cycle value must be greater than 50. + */ + bool setCycle(uint32_t number); + + /** + * contorl timer enable. + * + * @retval true - success. + * @retval false - failed. + */ + bool enable(void); + + /** + * contorl timer disable. + * + * @retval true - success. + * @retval false - failed. + */ + bool disable(void); + + /** + * Get tim attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_cycle_tim(uint32_t *number); + + /** + * Set tim attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_cycle_tim(uint32_t number); +}; +/** + * @} + */ + + +#endif /* #ifndef __NEXTIMER_H__ */ diff --git a/NexVariable.h b/NexVariable.h index 60e6bf9..ebbba13 100755 --- a/NexVariable.h +++ b/NexVariable.h @@ -58,22 +58,21 @@ public: /* methods */ */ bool setText(const char *buffer); - /** - * Get val attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t getValue(uint32_t *number); - - /** - * Set val attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool setValue(uint32_t number); + /** + * Get val attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t getValue(uint32_t *number); + /** + * Set val attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool setValue(uint32_t number); }; /** * @} diff --git a/NexWaveform.cpp b/NexWaveform.cpp index f515f85..c1fbe9a 100755 --- a/NexWaveform.cpp +++ b/NexWaveform.cpp @@ -36,17 +36,17 @@ bool NexWaveform::addValue(uint8_t ch, uint8_t number) uint32_t NexWaveform::Get_background_color_bco(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".bco"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".bco"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexWaveform::Set_background_color_bco(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -55,26 +55,26 @@ bool NexWaveform::Set_background_color_bco(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexWaveform::Get_grid_color_gdc(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".gdc"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".gdc"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexWaveform::Set_grid_color_gdc(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -83,26 +83,26 @@ bool NexWaveform::Set_grid_color_gdc(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexWaveform::Get_grid_width_gdw(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".gdw"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".gdw"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexWaveform::Set_grid_width_gdw(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -111,26 +111,26 @@ bool NexWaveform::Set_grid_width_gdw(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexWaveform::Get_grid_height_gdh(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".gdh"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".gdh"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexWaveform::Set_grid_height_gdh(uint32_t number) { - char buf[10] = {0}; + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -139,26 +139,26 @@ bool NexWaveform::Set_grid_height_gdh(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } uint32_t NexWaveform::Get_channel_0_color_pco0(uint32_t *number) { - String cmd; - cmd += "get "; - cmd += getObjName(); - cmd += ".pco0"; - sendCommand(cmd.c_str()); - return recvRetNumber(number); + String cmd; + cmd += "get "; + cmd += getObjName(); + cmd += ".pco0"; + sendCommand(cmd.c_str()); + return recvRetNumber(number); } bool NexWaveform::Set_channel_0_color_pco0(uint32_t number) -{ - char buf[10] = {0}; +{ + char buf[10] = {0}; String cmd; utoa(number, buf, 10); @@ -167,10 +167,10 @@ bool NexWaveform::Set_channel_0_color_pco0(uint32_t number) cmd += buf; sendCommand(cmd.c_str()); - cmd=""; - cmd += "ref "; - cmd += getObjName(); - sendCommand(cmd.c_str()); + cmd=""; + cmd += "ref "; + cmd += getObjName(); + sendCommand(cmd.c_str()); return recvRetCommandFinished(); } diff --git a/NexWaveform.h b/NexWaveform.h index 499026b..52bdef9 100755 --- a/NexWaveform.h +++ b/NexWaveform.h @@ -45,85 +45,85 @@ public: /* methods */ */ bool addValue(uint8_t ch, uint8_t number); - /** - * Get bco attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_background_color_bco(uint32_t *number); + /** + * Get bco attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_background_color_bco(uint32_t *number); - /** - * Set bco attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_background_color_bco(uint32_t number); + /** + * Set bco attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_background_color_bco(uint32_t number); - /** - * Get gdc attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_grid_color_gdc(uint32_t *number); + /** + * Get gdc attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_grid_color_gdc(uint32_t *number); - /** - * Set gdc attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_grid_color_gdc(uint32_t number); + /** + * Set gdc attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_grid_color_gdc(uint32_t number); - /** - * Get gdw attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_grid_width_gdw(uint32_t *number); + /** + * Get gdw attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_grid_width_gdw(uint32_t *number); - /** - * Set gdw attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_grid_width_gdw(uint32_t number); + /** + * Set gdw attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_grid_width_gdw(uint32_t number); - /** - * Get gdh attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_grid_height_gdh(uint32_t *number); + /** + * Get gdh attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_grid_height_gdh(uint32_t *number); - /** - * Set gdh attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_grid_height_gdh(uint32_t number); + /** + * Set gdh attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_grid_height_gdh(uint32_t number); - /** - * Get pco0 attribute of component - * - * @param number - buffer storing data retur - * @return the length of the data - */ - uint32_t Get_channel_0_color_pco0(uint32_t *number); + /** + * Get pco0 attribute of component + * + * @param number - buffer storing data retur + * @return the length of the data + */ + uint32_t Get_channel_0_color_pco0(uint32_t *number); - /** - * Set pco0 attribute of component - * - * @param number - To set up the data - * @return true if success, false for failure - */ - bool Set_channel_0_color_pco0(uint32_t number); + /** + * Set pco0 attribute of component + * + * @param number - To set up the data + * @return true if success, false for failure + */ + bool Set_channel_0_color_pco0(uint32_t number); }; /** diff --git a/doc/Documentation/_comp_button_8ino-example.html b/doc/Documentation/_comp_button_8ino-example.html index c305f54..9be747d 100755 --- a/doc/Documentation/_comp_button_8ino-example.html +++ b/doc/Documentation/_comp_button_8ino-example.html @@ -152,7 +152,7 @@ This program is free software; you can redistribute it and/or modify it under th