1 /** 2 * @file lv_demo_smartwatch_weather.h 3 * 4 */ 5 6 #ifndef LV_DEMO_SMARTWATCH_WEATHER_H 7 #define LV_DEMO_SMARTWATCH_WEATHER_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "lv_demo_smartwatch.h" 17 18 #if LV_USE_DEMO_SMARTWATCH 19 20 /********************* 21 * DEFINES 22 *********************/ 23 24 /********************** 25 * TYPEDEFS 26 **********************/ 27 28 /********************** 29 * GLOBAL PROTOTYPES 30 **********************/ 31 32 /** 33 * Create the weather page. Called only once. 34 */ 35 void lv_demo_smartwatch_weather_create(void); 36 37 /** 38 * Load the weather screen 39 * @param anim_type screen load animation to use 40 * @param time animation time 41 * @param delay delay time before loading the screen 42 */ 43 void lv_demo_smartwatch_weather_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 44 45 /** 46 * Update weather in the default watchface 47 * @param temp current temp in °C 48 * @param icon weather icon to use (0-7) 49 */ 50 void lv_demo_smartwatch_home_set_weather(int temp, const lv_img_dsc_t * icon); 51 52 /** 53 * Clear daily forecast list 54 */ 55 void lv_demo_smartwatch_weather_daily_clear(void); 56 57 /** 58 * Clear hourly forecast list 59 */ 60 void lv_demo_smartwatch_weather_hourly_clear(void); 61 62 /** 63 * Add daily forecast weather to the list 64 * @param day day of the week (0-7) 65 * @param temp temp in °C 66 * @param id weather icon to use (0-7) 67 */ 68 void lv_demo_smartwatch_weather_add_daily(int day, int temp, int id); 69 70 /** 71 * Add hourly forecast weather to the list 72 * @param hour hour oof the day (0-23) 73 * @param id weather icon to use (0-7) 74 * @param temp temp in °C 75 * @param humidity relative humidity % 76 * @param wind wind speed in km/hr 77 * @param uv uv index 78 * @param info item type (use true when adding forecast details, false adds it as a title row) 79 */ 80 void lv_demo_smartwatch_weather_add_hourly(int hour, int id, int temp, int humidity, int wind, int uv, bool info); 81 82 /********************** 83 * MACROS 84 **********************/ 85 86 #endif /*LV_USE_DEMO_SMARTWATCH*/ 87 88 #ifdef __cplusplus 89 } /*extern "C"*/ 90 #endif 91 92 #endif /*LV_DEMO_SMARTWATCH_HOME_H*/ 93