UILabelButtonExt *SetTheButton_ext(ButtonConfig_ext_t &buttonconfig);//, UIView::OnTouchListener *clickListener);
bool testCHANINGScrollViewcrollViewinit(uint8_t);
UIScrollView *testCHANINGScrollView{nullptr};
+ uint8_t GetChargeId(void);
bool initViewStatus{false};
UILabel *Title{nullptr}; // 标题
UILabel *charnge_label{nullptr}; // 标题
#endif
#include "pm_veto.h"
#include "pm.h"
+#ifdef ENABLE_HP4570
+ #include "hp4570.h"
+#endif
#ifdef __cplusplus
#if __cplusplus
}
float bat_temp = 0.0F;
float pcb_temp = 0.0F;
uint8_t power = 0;
+ uint8_t charge_id = 0;
#ifdef SUPPORT_BATTERY_SERVICE
power = battery_get_voltage(&voltage);
battery_get_pcb_temp(&pcb_temp);
battery_get_battery_temp(&bat_temp);
+#endif
+#ifdef ENABLE_HP4570
+
+ charge_id = GetChargeId();
#endif
char battery_buf[64]={0};
- sprintf_s(battery_buf,64,"power:%d\nvoltage:%.2f\nbat_temp:%.2f\npcb_temp:%.2f",power,voltage,bat_temp,pcb_temp);
+ sprintf_s(battery_buf,64,"power:%d\nvoltage:%.2f\nbat_temp:%.2f\npcb_temp:%.2f\ncharge Ic:%d",power,voltage,bat_temp,pcb_temp,charge_id);
- charnge_label= testAboutView::GetInstance()->init_title(70,250,battery_buf);
+ charnge_label= testAboutView::GetInstance()->init_title(70,240,battery_buf);
testCHANINGScrollView->Add(charnge_label);
#if ENABLE_TEST_RESULT_BUTTONS
}
return testCHANINGScrollView;
}
+
+ uint8_t testCHANINGView::GetChargeId(void)
+ {
+ uint8_t charge_id = hp4570n_get_id();
+ if(0x2 == charge_id)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
}
#ifdef __cplusplus