LCD补交 420/3 420/head
authorhcj <1224667075@qq.com>
Mon, 1 Jul 2024 02:11:07 +0000 (10:11 +0800)
committerhcj <1224667075@qq.com>
Mon, 1 Jul 2024 02:11:07 +0000 (10:11 +0800)
code/sdk/application/wearable/fd230app/nativeui/producttest/src/testLCD.cpp

index f6b885d..ea29e3b 100644 (file)
@@ -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