From: hcj <1224667075@qq.com> Date: Mon, 1 Jul 2024 02:11:07 +0000 (+0800) Subject: LCD补交 X-Git-Tag: release_V1.2.70_20241020_135402~895^2~9 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=f062bb127bffb250cb0be9366eb5a64bfa55a4ff;p=mirrors%2FFD230.git LCD补交 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testLCD.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testLCD.cpp index f6b885d97..ea29e3b82 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testLCD.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testLCD.cpp @@ -76,17 +76,18 @@ namespace OHOS testLCDScrollView=nullptr; } } - + uint8_t LCD_TEST_FALG=0; void colorTimerCallBack(int data) { testLCDView* t= testLCDView::GetInstance(); if(t!=NULL) - t->set_LCD_color(); + t->set_LCD_color(LCD_TEST_FALG); + LCD_TEST_FALG++; } - uint8_t LCD_TEST_FALG=0; - void testLCDView :: set_LCD_color(void) + + void testLCDView :: set_LCD_color(int color) { - switch (LCD_TEST_FALG) + switch (color) { case 0: testLCDScrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Green().full); @@ -97,11 +98,20 @@ namespace OHOS case 2: testLCDScrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Yellow().full); break; + case 3: + testLCDScrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Red().full); + break; + case 4: + testLCDScrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::White().full); + break; + case 5: + testLCDScrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); + break; default: break; } RootView::GetInstance()->Invalidate(); - LCD_TEST_FALG++; + //LCD_TEST_FALG++; } @@ -147,7 +157,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::draglistener can not be nullptr!"); return false; } - testLCDScrollView->SetOnDragListener(draglistener); + testLCDScrollView->SetOnDragListener(draglistener); testLCDScrollView->SetTouchable(true); testLCDScrollView->SetDraggable(true); @@ -174,4 +184,26 @@ namespace OHOS } return testLCDScrollView; } + +#ifdef __cplusplus +#if __cplusplus +extern "C" +{ +#endif /* __cplusplus */ +#endif /* __cplusplus */ + + void ble_factorytest_set_LCD_color(int color) + { + testLCDView* t= testLCDView::GetInstance(); + + if(t!=NULL) + t->set_LCD_color(color); + } + + +#ifdef __cplusplus +#if __cplusplus +} +#endif /* __cplusplus */ +#endif /* __cplusplus */ } \ No newline at end of file