// #include "gnss_sample.h"
#include "graphic_service.h"
+#ifdef __cplusplus
+#if __cplusplus
+extern "C"
+{
+#endif
+#endif
+#ifdef ENABLE_LQBP002TA
+#include "lqbp_service.h"
+#include "lqbp002ta.h"
+#endif
+#ifdef __cplusplus
+#if __cplusplus
+}
+#endif
+#endif
+
+
+
namespace OHOS
{
void testpressureView::ClearAll()
{
+#ifdef ENABLE_LQBP002TA
+ do_lqbp_service_check_msg(LQBP_SERVICE_CMD_STOP_CHECK);
+#endif
if(testpressureScrollView)
{
testpressureScrollView->RemoveAll();
void testpressureView:: pressuredataTimerCallBack(void)
{
//此处实现数据刷新
+#ifdef ENABLE_LQBP002TA
+ float temp = lqbp002ta_get_temp();
+ float pressure = lqbp002ta_get_pressure();
+ char buf1[32]={0};
+ char buf2[32]={0};
+ sprintf(buf1,"temp:%.2f",temp);
+ sprintf(buf2,"pressure:%.2f",pressure);
+
+ label_1_MSG->SetText(buf1);
+ label_2_MSG->SetText(buf2);
+ RootView::GetInstance()->Invalidate();
+#endif
}
void pressuredataTimerCallBackproc()
LabelConfig Config = {
.left = 50,
- .top = 85,
- .width = Screen::GetInstance().GetWidth()-80,
+ .top = 100,
+ .width = 350,
.height = 35,
- .fontSize = 20,
- .lineHeigh = 25,
+ .fontSize = 40,
+ .lineHeigh = 35,
.text = "",
.lineBreakMode = UILabel::LINE_BREAK_WRAP,
};
Config = {
.left = 50,
- .top = 50,
+ .top = 200,
.width = 350,
- .height = 30,
- .fontSize = 25,
+ .height = 35,
+ .fontSize = 40,
.lineHeigh = 35,
.text = "",
.lineBreakMode = UILabel::LINE_BREAK_WRAP,
labelButton_next= testAboutView::GetInstance()->init_button_next(267,320,Test_ViewMapper_t[id].viewid_str_next);
testpressureScrollView->Add(labelButton_next);
- Title= testAboutView::GetInstance()->init_title(165,45,"PRESSURE_TEST");
+ Title= testAboutView::GetInstance()->init_title(125,45,"PRESSURE_TEST");
testpressureScrollView->Add(Title);
testpressureScrollView->SetTouchable(true);
testpressureScrollView->SetDraggable(true);
+
+#ifdef ENABLE_LQBP002TA
+ do_lqbp_service_check_msg(LQBP_SERVICE_CMD_START_CHECK);
+#endif
+
uint32_t tick;
osStatus_t retTimer;
P_TEST_timer = osTimerNew((osTimerFunc_t)pressuredataTimerCallBackproc, osTimerPeriodic, NULL, NULL);