#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
-extern uint8_t battery_get_voltage(float *voltage);
-
+#include "battery_hal.h"
#define TIMEVIEW_UP 0
#define TIMEVIEW_DOWN 1
#define SECONDTEST 0
/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-04-17 15:26:49
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-30 18:27:12
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2025-01-09 21:50:24
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/include/PullUpDownView.h
*/
#include "main/include/dropdown/DropDownCardPage1.h"
#include "main/include/dropdown/DropDownCardPage2.h"
-extern uint8_t battery_get_voltage(float *voltage);
-
namespace OHOS
{
static constexpr int16_t SETTING_INDEX = 0;
#include "MainModel.h"
#include "../../../../../../../zhihui/utils/custom_runtime.h"
#include "rebootandshutdown/include/RebootAndShutdownModelC.h"
+#include "battery_hal.h"
#if USE_OFFLINE_DIAL
#include "DialViewGroup.h"
#include "battery_hal.h"
#include "wearable_log.h"
-extern uint8_t battery_get_voltage(float *voltage);
-
// 定义电量宏
#define BATTERY_LOW_THRESHOLD 10
#define BATTERY_MEDIUM_THRESHOLD 20
#include <string>
#include "battery_hal.h"
#include "wearable_log.h"
-extern uint8_t battery_get_voltage(float *voltage);
REGIST_DIAL_MODULE(DialDataType::DATA_TYPE_POWER, OHOS::DialModelPower::GetInstance());
#include "battery_hal.h"
#include "wearable_log.h"
#include <string>
-extern uint8_t battery_get_voltage(float *voltage);
+#include "battery_hal.h"
REGIST_DIAL_MODULE(DialDataType::DATA_TYPE_POWER_MAPPER,
OHOS::DialModelPowerMapper::GetInstance());
#include "battery_hal.h"
#include "wearable_log.h"
#include <string>
+#include "battery_hal.h"
-extern uint8_t battery_get_voltage(float *voltage);
REGIST_DIAL_MODULE(DialDataType::DATA_TYPE_POWER_STANDBY,
OHOS::DialModelPowerStanby::GetInstance());
#include "main/include/dial/RegisterDialModel.h"
#include "wearable_log.h"
#include "battery_hal.h"
-extern uint8_t battery_get_voltage(float *voltage);
namespace OHOS
{
#include "battery_hal.h"
#include "build_version.h"
-extern uint8_t battery_get_voltage(float *voltage);
// const char *get_version_string(void);
bool resfile_checksum_thread(void);
#include "bleService.h"\r
#include "battery_hal.h"\r
#include "ui_resource_string.h"\r
-extern uint8_t battery_get_voltage(float *voltage);\r
+\r
#include "systemupdate/include/SystemUpdateModel.h"\r
namespace OHOS\r
{\r
{
#include "build_version.h"
#include "battery_hal.h"
- extern uint8_t battery_get_voltage(float *voltage);
- const char *get_version_string(void);
+
}
bool WatchQRCodeView::WatchQRCodeInitViewGroup(void)
#include "battery_hal.h"
#include "uicomponents/UIComponents.h"
+#include "battery_hal.h"
//#include "ui_resource_string.h"
#include "ui_resource_image.h"
#include "common/image_cache_manager.h"
#include <ctime>
+#include "battery_hal.h"
#include "custom_utils.h"
namespace OHOS {
static MainClockView *g_pMainClockView = nullptr;
return false;
}
batteryLabel->SetPosition(BATTERYP_LABEL_X, BATTERYP_LABEL_Y, TEXT_WIDTH, TEXT_HEIGHT);
- uint8_t power=90;
- battery_getvolpower(&power);
+ float voltage = 0.0F;
+ int power = battery_get_voltage(&voltage);
char tmp[16]={0};
sprintf(tmp,"%d%c",power,'%');
batteryLabel->SetText(tmp);
#include "ScreenModels.h"
#include "SettingModel.h"
#include "ui_resource_image.h"
+#include "battery_hal.h"
#include "custom_utils.h"
namespace OHOS {
return;
}
batteryLable->SetPosition(BATTERY_LABEL_X, BATTERY_LABEL_Y, TEXT_WIDTH, TEXT_HEIGHT);
- uint8_t power=90;
- battery_getvolpower(&power);
+ float voltage = 0.0F;
+ int power = battery_get_voltage(&voltage);
char tmp[16]={0};
sprintf(tmp,"%d%c",power,'%');
batteryLable->SetText(tmp);
#include "components/ui_label.h"\r
#include "common/image_cache_manager.h"\r
#include "MainClockView.h"\r
+#include "battery_hal.h"\r
#include "custom_utils.h"\r
\r
namespace OHOS {\r
return false;\r
}\r
batteryLabel->SetPosition(BATTERYP_LABEL_X, BATTERYP_LABEL_Y, TEXT_WIDTH, TEXT_HEIGHT);\r
- uint8_t power=90;\r
- battery_getvolpower(&power);\r
+ float voltage = 0.0F; \r
+ int power = battery_get_voltage(&voltage); \r
char tmp[16]={0};\r
sprintf(tmp,"%d%c",power,'%');\r
batteryLabel->SetText(tmp);\r
#include "ScreenModel.h"\r
#include "ui_resource_image.h"\r
#include "common/image_cache_manager.h"\r
+#include "battery_hal.h"\r
#include "custom_utils.h"\r
\r
namespace OHOS {\r
return;\r
}\r
batteryLable->SetPosition(BATTERY_LABEL_X, BATTERY_LABEL_Y, TEXT_WIDTH, TEXT_HEIGHT);\r
- uint8_t power=90;\r
- battery_getvolpower(&power);\r
+ float voltage = 0.0F; \r
+ int power = battery_get_voltage(&voltage); \r
char tmp[16]={0};\r
sprintf(tmp,"%d%c",power,'%');\r
batteryLable->SetText(tmp);\r