From d2e15ac1774cae46ace6b583bfeaaf0aa85f57a4 Mon Sep 17 00:00:00 2001 From: Th3maz1ng Date: Sun, 19 Feb 2023 17:05:58 +0100 Subject: [PATCH] Minor changes --- .../watch_peripherals/watch_peripherals.c | 1 - src/W800_SDK_v1.00.10/app/gfx/gfx_task.c | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/W800_SDK_v1.00.10/app/app_drivers/watch_peripherals/watch_peripherals.c b/src/W800_SDK_v1.00.10/app/app_drivers/watch_peripherals/watch_peripherals.c index 2ccd709..bc45d1c 100644 --- a/src/W800_SDK_v1.00.10/app/app_drivers/watch_peripherals/watch_peripherals.c +++ b/src/W800_SDK_v1.00.10/app/app_drivers/watch_peripherals/watch_peripherals.c @@ -13,7 +13,6 @@ static uint8_t _vibration_motor_timer_id = WM_TIMER_ID_INVALID; static void vibration_motor_timer_irq_cb(void *p) { (void)p; - //tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0); tls_pwm_stop(VIBRATION_MOTOR_PWM_CHANNEL); tls_gpio_cfg(VIBRATION_MOTOR_ENABLE, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING); tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0); diff --git a/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c b/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c index 8d90103..9cac928 100644 --- a/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c +++ b/src/W800_SDK_v1.00.10/app/gfx/gfx_task.c @@ -156,12 +156,6 @@ void gfx_task(void *param) lv_scr_load(watchFace.display); - /* Let's init the watch peripherals driver (vibration motor + battery voltage sense) */ - watch_peripherals_init(27); - /* Make the first battery voltage reading here */ - uint16_t battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV); - battery_percentage = battery_voltage_to_percentage(battery_voltage); - /* Let's init the I2C interface */ i2c_init(I2C_SDA, I2C_SCL, 100000); @@ -265,6 +259,13 @@ void gfx_task(void *param) else APP_LOG_INFO("BMA456 set pin conf failed"); + /* Let's init the watch peripherals driver (vibration motor + battery voltage sense) */ + watch_peripherals_init(27); + /* Make the first battery voltage reading here */ + uint16_t battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV); + battery_percentage = battery_voltage_to_percentage(battery_voltage); + watch_face_set_battery_indicator(&watchFace, battery_percentage); + /* Once we are done with the initializing steps we don't forget to turn the backlight on ! */ setBrightness(persistency_get_settings()->display.brightness);