{"id":467227,"date":"2025-07-16T21:02:14","date_gmt":"2025-07-16T21:02:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=467227"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=467227","title":{"rendered":"<span>\u0423\u0447\u0438\u043c Xiaomi Mi Band 9 \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0441\u0430\u0443\u043d\u0443<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u041b\u044f\u0445\u043e\u0432\u0441\u043a\u0438\u0439, \u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 10 \u043b\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u043e\u0432 Xiaomi \u0434\u043b\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0443 \u043c\u0435\u043d\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043b\u0438\u043d\u0435\u0439\u043a\u0438 \u0447\u0430\u0441\u043e\u0432 Xiaomi &#8212; Mi Band 9.<br \/>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u043e\u0432 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 Mi Band 10 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043e\u0437\u0440\u0435\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0447\u0430\u0441\u044b, \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u043e\u0432\u043e\u0434 \u043f\u0438\u0442\u0430\u043d\u0438\u044f, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/55b\/961\/527\/55b96152751aefb07b88209ecf079e7f.png\" alt=\"Temperature overheat shutdown\" title=\"Temperature overheat shutdown\" width=\"1280\" height=\"900\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/55b\/961\/527\/55b96152751aefb07b88209ecf079e7f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/55b\/961\/527\/55b96152751aefb07b88209ecf079e7f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Temperature overheat shutdown<\/figcaption><\/div>\n<\/figure>\n<h2>\u0427\u0442\u043e \u0436\u0435 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043d\u043e\u0441\u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0441\u043b\u0435\u0442, \u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043b\u0438 \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0431\u0440\u0430\u0441\u043b\u0435\u0442 \u0438 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u041d\u043e \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0447\u0442\u043e \u0437\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0431\u0440\u0430\u0441\u043b\u0435\u0442. \u0410 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e:<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0441 9\u043a\u0438 Xiaomi \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b BES2700, BES2800 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Bestechnic, \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e flash \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 8Mb, PSRAM 16Mb, \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044c, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 BT \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438 \u043a\u0443\u0447\u0430 \u0440\u0430\u0437\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e19\/f8e\/e1b\/e19f8ee1b37f412ed1a0821ac945ae2c.jpg\" alt=\"\u0411\u043b\u043e\u043a \u0441\u0445\u0435\u043c\u0430 BES2700iMP\" title=\"\u0411\u043b\u043e\u043a \u0441\u0445\u0435\u043c\u0430 BES2700iMP\" width=\"960\" height=\"515\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e19\/f8e\/e1b\/e19f8ee1b37f412ed1a0821ac945ae2c.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e19\/f8e\/e1b\/e19f8ee1b37f412ed1a0821ac945ae2c.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0411\u043b\u043e\u043a \u0441\u0445\u0435\u043c\u0430 BES2700iMP<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443 mb9 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 256Mb nand flash \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f HyperOS \u0442\u0443\u0442 &#8212; \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#8212; Apache NuttX, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0430\u044f realtime OS \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0433\u043e Lunix, c shell \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 (\u0432\u043e\u0442 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 &#8212; <a href=\"https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html\" rel=\"noopener noreferrer nofollow\">https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html<\/a>)<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 bootloader \u043d\u0430 \u0431\u0430\u0437\u0435 NuttX \u0434\u043b\u044f mb9 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 128Kb.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 HyperOS, \u043a\u043e\u0442\u043e\u0440\u0443\u044e Xiaomi \u0435\u0449\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 VelaOS (\u043e\u043d\u0430 \u0442\u0430\u043a \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u0434\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u043e\u0434 HyperOS) \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 2 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439: Lua \u0438 AiotJS (\u0432 \u0434\u0435\u0432\u0438\u0447\u0435\u0441\u0442\u0432\u0435 JerryScript). \u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 Lvgl &#8212; \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432 embedded (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 &#8212; <a href=\"https:\/\/lvgl.io\/\" rel=\"noopener noreferrer nofollow\">https:\/\/lvgl.io\/<\/a>)<\/p>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a AiotJS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0430 \u0434\u0432\u0438\u0436\u043e\u043a Lua \u0434\u043b\u044f \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u043e\u0432.<br \/>Lua \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0430\u0445 \u0432\u0435\u0440\u0441\u0438\u0438 5.4 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 lvgl, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430\u0445.<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0431\u0440\u0430\u0441\u043b\u0435\u0442\u0430<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0430,<br \/>\u044f \u043f\u0440\u043e\u0432\u0435\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 IDA Pro. <br \/>\u0412 \u0434\u0435\u0442\u0430\u043b\u0438 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432.<br \/>\u0412\u043e\u0442 \u0447\u0442\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0432 \u0438\u0442\u043e\u0433\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f system_callback_temp<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall system_callback_temp(float **_temp) {   float board_temp; \/\/ s16   int result; \/\/ r0   int v3; \/\/ r4   int v4; \/\/ r4   __int64 v5; \/\/ [sp+10h] [bp+0h] BYREF    board_temp = **_temp;   unk_200A509F = dword_2009D6E0[31];   unk_200A52A0 = unk_200A529C;   time_diff = get_timestamp(&amp;v5) - body_hand_wrist_time;   result = syslog(              3,              \"[%s] %s: callback_temp called %d %d %d\\n\",              \"system\",              \"callback_temp\",              unk_200A52A0,              unk_200A529C,              *(_DWORD *)&amp;is_watch_is_on_hand);   if ( *(_DWORD *)&amp;is_watch_is_on_hand == 1 )   {     if ( cool_strategy_43_copy &amp;&amp; board_temp &lt; 41.0 )     {       cool_strategy_43_copy = 0;       cool_strategy_43 = 0;       result = syslog(4, \"[%s] %s: Exit the 43-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( cool_strategy_41_copy &amp;&amp; board_temp &lt; 39.0 )     {       cool_strategy_41_copy = 0;       cool_strategy_41 = 0;       result = syslog(4, \"[%s] %s: Exit the 41-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( temp_strategy_autobritghness_off &amp;&amp; board_temp &lt; 37.0 )     {       temp_strategy_autobritghness_off = 0;       cool_strategy_39 = 0;       if ( is_auto_brightness )         sub_2C442BA8(1, &amp;cool_strategy_39);       result = syslog(4, \"[%s] %s: Exit the 39-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( board_temp &gt;= 39.0 &amp;&amp; time_diff &gt; 179 )     {       if ( !cool_strategy_39 )       {         cool_strategy_39 = 1;         syslog(4, \"[%s] %s: Start the 39-degree cooling strategy\\n\", \"system\", \"callback_temp\");         result = system_ui_and_strategy(39);       }       if ( board_temp &gt;= 41.0 )       {         v3 = cool_strategy_41;         if ( !cool_strategy_41 )         {           cool_strategy_41 = 1;           syslog(4, \"[%s] %s: Start the 41-degree cooling strategy\\n\", \"system\", \"callback_temp\");           cool_strategy_41_prev = v3;           cool_strategy_41_val = 41;           cool_strategy_41_started = 1;           result = temp_relative_alarm(v3, (int)&amp;cool_strategy_41_val);         }         if ( board_temp &gt;= 43.0 )         {           v4 = cool_strategy_43;           if ( !cool_strategy_43 )           {             cool_strategy_43 = 1;             syslog(4, \"[%s] %s: Start the 43-degree cooling strategy\\n\", \"system\", \"callback_temp\");             cool_strategy_43_prev = v4;             cool_strategy_43_val = 43;             cool_strategy_43_started = 1;             return temp_relative_alarm(v4, (int)&amp;cool_strategy_43_val);           }         }       }     }   }   else   {     if ( cool_strategy_45 &amp;&amp; board_temp &lt; 46.0 )     {       cool_strategy_45 = 0;       result = syslog(4, \"[%s] %s: Exit the 48-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( cool_strategy_48 &amp;&amp; board_temp &lt; 43.0 )     {       cool_strategy_48 = 0;       result = syslog(4, \"[%s] %s: Exit the 45-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( board_temp &gt;= 45.0 )     {       if ( !cool_strategy_45 )       {         cool_strategy_45 = 1;         cool_strategy_45_val = 45;         temp_relative_alarm(600, (int)&amp;cool_strategy_45_val);         result = syslog(4, \"[%s] %s: Start the 45-degree cooling strategy\\n\", \"system\", \"callback_temp\");       }       if ( board_temp &gt;= 48.0 &amp;&amp; !cool_strategy_48 )       {         cool_strategy_48 = 1;         cool_strategy_48_val = 48;         temp_relative_alarm(60, (int)&amp;cool_strategy_48_val);         return syslog(4, \"[%s] %s: Start the 48-degree cooling strategy\\n\", \"system\", \"callback_temp\");       }     }   }   return result; }<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f system_ui_and_strategy<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall system_ui_and_strategy(int temp) {   int result; \/\/ r0   int v2; \/\/ r4   __int64 v3; \/\/ r0    result = temp - 39;   switch ( result )   {     case 0:       syslog(3, \"[%s] %s: 39 temp will set brightness\\n\", \"system\", \"ui_and_strategy\");       is_auto_brightness = is_auto_brightness_0;       syslog(         6,         \"[%s] %s:  is_auto_brightness:%d\",         \"system\",         \"brightness_temp_charge\",         (unsigned __int8)is_auto_brightness_0);       v2 = *(_DWORD *)&amp;brightness_level;       if ( is_auto_brightness )       {         v3 = syslog(                6,                \"[%s] %s:  brightness_current_now:%d\",                \"system\",                \"brightness_temp_charge\",                *(_DWORD *)&amp;brightness_level);         brightness_set_auto_adjustment(0, HIDWORD(v3));         if ( v2 &lt;= 128 )         {           if ( (unsigned int)(v2 - 0x20) &gt; 96 )           {             brightness_set_value(31);             syslog(6, \"[%s] %s: thermal set brightness to 31\\n\", \"system\", \"brightness_temp_charge\");           }           else           {             brightness_set_value(v2);             v2 = *(_DWORD *)&amp;brightness_level;             syslog(               6,               \"[%s] %s: thermal set brightness to %d\\n\",               \"system\",               \"brightness_temp_charge\",               *(_DWORD *)&amp;brightness_level);           }         }         else         {           brightness_set_value(128);           v2 = *(_DWORD *)&amp;brightness_level;           syslog(6, \"[%s] %s: thermal set brightness to 128\\n\", \"system\", \"brightness_temp_charge\");         }         result = syslog(                    6,                    \"[%s] %s:  auto_brightness:ON-&gt;OFF brightness_current_after :%d\",                    \"system\",                    \"brightness_temp_charge\",                    v2);       }       else       {         result = syslog(                    6,                    \"[%s] %s:  brightness_current_now :%d\",                    \"system\",                    \"brightness_temp_charge\",                    *(_DWORD *)&amp;brightness_level);         if ( v2 &gt; 128 )         {           apply_brightness(128);           result = syslog(                      6,                      \"[%s] %s:  brightness_current_now afer :%d\",                      \"system\",                      \"brightness_temp_charge\",                      *(_DWORD *)&amp;brightness_level);         }       }       temp_strategy_autobritghness_off = 1;       return result;     case 2:       if ( cool_strategy_41_started == 2 )       {         syslog(3, \"[%s] %s:  41 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\");         goto LABEL_16;       }       return result;     case 4:       syslog(3, \"[%s] %s:  43 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\");       goto LABEL_16;     case 6:       syslog(3, \"[%s] %s:  45 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\");       goto LABEL_16;     case 9:       syslog(3, \"[%s] %s:  48 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\"); LABEL_16:       if ( paired_flag == 2 )       {         sub_2C1641D4(3u);         result = system(\"poweroff\");       }       else       {         result = temp_rise_reminder(0);       }       break;     default:       return result;   }   return result; }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430, \u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043d\u0430 \u043f\u043e\u0440\u043e\u0433\u0435 39 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u044f\u0440\u043a\u043e\u0441\u0442\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u043f\u043e\u0440\u043e\u0433\u0430\u0445 41, 43, 45 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0431\u0440\u0430\u0441\u043b\u0435\u0442, \u0435\u0441\u043b\u0438 \u0431\u0440\u0430\u0441\u043b\u0435\u0442 \u043d\u0430 \u0440\u0443\u043a\u0435, \u043a\u043e\u0433\u0434\u0430 \u0436\u0435 \u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e &#8212; \u043f\u043e\u0440\u043e\u0433\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f 45, 48.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u0434, \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 temp_rise_reminder(int)<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f temp_rise_reminder<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall temp_rise_reminder(int prm) {   int v1; \/\/ r0   int v2; \/\/ r4   int result; \/\/ r0   char _prm; \/\/ [sp+7h] [bp+7h] BYREF   int v5[40]; \/\/ [sp+8h] [bp+8h] BYREF    _prm = prm;   syslog(6, \"[%s] %s: enter temp reminder \\n\", \"temp_reminder\", \"temp_rise_reminder\");   v1 = malloc_(1);   v2 = v1;   if ( !v1 )     return syslog(3, \"[%s] %s: temp data malloc fail\\n\", \"temp_reminder\", \"temp_rise_reminder\");   memcpy_(v1, &amp;_prm, 1);   result = memset(&amp;v5[1], 0, 156);   v5[0] = 0x220008;   v5[7] = -1;   LOWORD(v5[3]) = 2049;   v5[10] = temp_reminder_create_cb;   v5[2] = v2;   v5[11] = temp_reminder_delete_cb;   BYTE1(v5[9]) = -94;   v5[14] = temp_reminder_cb;   if ( !temp_reminder_in_progress )   {     result = lvx_reminder_start(v5);     if ( !result )     {       result = syslog(3, \"[%s] %s: High and low temperature startup failure\\n\", \"temp_reminder\", \"temp_rise_reminder\");     }   }   return result; }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 temp_reminder_in_progress, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f. \u0414\u0430\u043a \u0432\u043e\u0442, \u0435\u0433\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043b\u0438\u043d\u043a\u0435\u0440 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 SRAM.<\/p>\n<div class=\"floating-image\"><\/div>\n<div class=\"floating-image\">\n<figure class=\"float\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ab0\/a53\/3a6\/ab0a533a60d7410f2c8c5230cf200371.png\" alt=\"\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 SRAM\" title=\"\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 SRAM\" width=\"405\" height=\"111\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ab0\/a53\/3a6\/ab0a533a60d7410f2c8c5230cf200371.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ab0\/a53\/3a6\/ab0a533a60d7410f2c8c5230cf200371.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 SRAM<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u0444\u043e\u043a\u0443\u0441 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0432 \u0432 \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0442 \u043d\u0443\u043b\u044f, \u043c\u0435\u0442\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e.<\/p>\n<\/div>\n<p>\u0417\u0430\u043e\u0434\u043d\u043e \u043d\u0430\u0439\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 SRAM \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0431\u0440\u0430\u0441\u043b\u0435\u0442\u0430.<br \/>\u0412\u043e\u0442 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u044d\u0442\u043e<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_temperature_finally<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall get_temperature_finally(int a1, int a2, int a3) {   int handle; \/\/ r0   int v4; \/\/ r3   int _handle; \/\/ r4   __int16 temp; \/\/ [sp+Eh] [bp+6h] BYREF    temp = 0;   handle = open(\"\/dev\/charge\", 65, a3, 0);   _handle = handle;   if ( handle &lt; 0 )     return syslog(3, \"[%s] %s: Failed to open charger device\\n\", \"system\", \"get_temperature_finally\");  if ( fb_ioctl(handle, 0xE0A, (int)&amp;temp, v4) &lt; 0 )     return syslog(3, \"[%s] %s: failed to get temperature!\", \"system\", \"get_temperature_finally\");   *(float *)&amp;board_temp_val = (float)temp;   syslog(3, \"[%s] %s: temp_reminder now temp is %d\", \"system\", \"get_temperature_finally\", temp);   write((int)board_temp, dword_200A52A8, (int)&amp;unk_200A4E00, (int)&amp;dword_200A52A8);   return file_close(_handle); }<\/code><\/pre>\n<\/div>\n<\/details>\n<div class=\"floating-image\">\n<figure class=\"float bordered\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0f5\/45d\/caa\/0f545dcaab91533924e2106fadc0d27d.png\" alt=\"\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 SRAM\" title=\"\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 SRAM\" width=\"324\" height=\"100\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0f5\/45d\/caa\/0f545dcaab91533924e2106fadc0d27d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0f5\/45d\/caa\/0f545dcaab91533924e2106fadc0d27d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 SRAM<\/figcaption><\/div>\n<\/figure>\n<p>\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/p>\n<\/div>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442 \u043d\u0430 LUA<\/h2>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c Lua \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442.\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430\u043c\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Xiaomi \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Easyface \u0441 \u043c\u043e\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u043b\u044f mb9 \u0438 mb10.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/193\/958\/e77\/193958e7737ef991c900602fd9acef20.png\" alt=\"\u041f\u0440\u043e\u0435\u043a\u0442 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430 \u0432 Easyface\" title=\"\u041f\u0440\u043e\u0435\u043a\u0442 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430 \u0432 Easyface\" width=\"1150\" height=\"780\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/193\/958\/e77\/193958e7737ef991c900602fd9acef20.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/193\/958\/e77\/193958e7737ef991c900602fd9acef20.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0435\u043a\u0442 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430 \u0432 Easyface<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043d\u0435\u043c \u0438\u0434\u0435\u0442 \u043b\u0438\u043d\u043a \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e.<br \/>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/p>\n<details class=\"spoiler\">\n<summary>main.lua<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local lvgl = require(\"lvgl\") local temp = require(\"temperature\") local dataman = require(\"dataman\")  local fsRoot = SCRIPT_PATH local DEBUG_ENABLE = false  local selfFlag = false  local printf = DEBUG_ENABLE and print or function(...)     end  local function imgPath(src)     return fsRoot .. src end  local rootbase = lvgl.Object(nil, {         w = lvgl.HOR_RES(),         h = lvgl.VER_RES(),         bg_color = 0,         bg_opa = lvgl.OPA(100),         border_width = 0,     })  rootbase:clear_flag(lvgl.FLAG.SCROLLABLE) rootbase:add_flag(lvgl.FLAG.EVENT_BUBBLE)  local root = lvgl.Object(rootbase, {         outline_width = 0,         border_width = 0,         pad_all = 0,         bg_opa = 0,         bg_color = 0,         align = lvgl.ALIGN.CENTER,         w = lvgl.HOR_RES(),         h = lvgl.VER_RES(),         flex = {             flex_direction = \"row\",             flex_wrap = \"wrap\",             justify_content = \"center\",             align_items = \"center\",             align_content = \"center\",         }             })  root:clear_flag(lvgl.FLAG.SCROLLABLE) root:add_flag(lvgl.FLAG.EVENT_BUBBLE)  local font60 = lvgl.Font(\"MiSans-Regular\", 60) local font30 = lvgl.Font(\"MiSans-Regular\", 30) local font26 = lvgl.Font(\"MiSans-Regular\", 26)  local function createText(wgt)     return lvgl.Label(wgt, {         text_font = font60,         text = \"Temp\",         align = lvgl.ALIGN.CENTER,         border_color = '#eee',         border_width = 0,         text_color = '#eee'         }) end  local time = lvgl.Label(root, {     text_font = font26,     text = \"00:00\",     text_color = '#eee',     pad_bottom = 5 })  local title = lvgl.Label(root, {     text_font = font30,     text = \"Band Temp\",     text_color = '#eee',     pad_bottom = 20 }) title:add_flag(lvgl.FLAG.EVENT_BUBBLE)  local txt = createText(root) txt:add_flag(lvgl.FLAG.EVENT_BUBBLE)  local function setText(str)     txt:set { text = str } end  local temp1 = lvgl.Label(root, {     text_font = font26,     text = \"Temperature\",     text_color = '#eee',     pad_top = 40 }) local temp2 = lvgl.Label(root, {     text_font = font26,     text = \"shutdowns\",     text_color = '#eee' }) temp1:add_flag(lvgl.FLAG.EVENT_BUBBLE) temp2:add_flag(lvgl.FLAG.EVENT_BUBBLE)  local installWd = lvgl.Checkbox(root, {     text_font = font26,     text = \"turned off\",     text_color = '#eee',     pad_top = 10 })  local tempEnabled = temp:isEnabled()  if tempEnabled then     installWd:add_state(lvgl.STATE.CHECKED)     installWd:set { text = \"turned on\"} end  installWd:add_flag(lvgl.FLAG.CLICKABLE) installWd:onevent(lvgl.EVENT.CLICKED, function(obj, code)      if tempEnabled then         temp:disable()         installWd:set { text = \"turned off\"}         tempEnabled = false     else         temp:enable()         installWd:set { text = \"turned on\"}         tempEnabled = true     end  end)  dataman.subscribe(\"timeMinuteLow\", time, function(obj, value)     local t = os.time()     local time_str = os.date(\"%H:%M\", t)     time:set { text = time_str } end)  dataman.subscribe(\"timeSecond\", txt, function(obj, value)     setText(string.format(\"%.1f\", temp:getTempFloat())) end) <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c temperature, \u0432\u043e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 &#8212; \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>temperature.lua<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local watchVersion = require(\"watchVersion\") local memory = require(\"memory\") local math = require(\"math\")  local temp = {     g_temp_ptr = 0,     g_reminder_ptr = 0,     init_done = false }  local bodyTempMapping = {     [\"miwear.watch.n66cn\"] = {         [\"1.3.206\"] = 0x200A15E8     },     [\"miwear.watch.n66nfc\"] = {         [\"1.3.206\"] = 0x200A15E8     },     [\"miwear.watch.n66tc\"] = {         [\"1.3.206\"] = 0x200A15E8     },     [\"miwear.watch.n66gl\"] = {         [\"2.3.97\"] = 0x200A55A0     },     [\"unknown\"] = {         [\"version1\"] = 0x20000000,         [\"version2\"] = 0x20000000     } }  local tempReminder = {     -- MiBand 9     [\"miwear.watch.n66cn\"] = {         [\"1.3.206\"] = 0x200A1174     },     [\"miwear.watch.n66nfc\"] = {         [\"1.3.206\"] = 0x200A1174     },     [\"miwear.watch.n66tc\"] = {         [\"1.3.206\"] = 0x200A1174     },     [\"miwear.watch.n66gl\"] = {         [\"2.3.97\"] = 0x200A5150     },     [\"unknown\"] = {         [\"version1\"] = 0x20000000,         [\"version2\"] = 0x20000000     } }  local function getTempValueByVersion(model, version)     local modelVersions = bodyTempMapping[model]     if modelVersions then         return modelVersions[version]     end     return nil end  local function getReminderValueByVersion(model, version)     local modelVersions = tempReminder[model]     if modelVersions then         return modelVersions[version]     end     return nil end  local function uint32_to_float(u)     local sign = ((u &gt;&gt; 31) &amp; 0x01)     local exponent = ((u &gt;&gt; 23) &amp; 0xFF)     local mantissa = u &amp; 0x7FFFFF      if exponent == 255 then         if mantissa == 0 then             return sign == 1 and -math.huge or math.huge         else             return 0\/0  -- NaN         end     end      local value     if exponent == 0 then         -- denormalized         value = (mantissa \/ 2^23) * 2^-126     else         -- normalized         value = (1 + mantissa \/ 2^23) * 2^(exponent - 127)     end      return sign == 1 and -value or value end  local function init()      if temp.init_done then         return     end      local model = watchVersion.get_model()     local ver = watchVersion.get_version()          local addr = getTempValueByVersion(model, ver)     if addr ~= nil then         temp.g_temp_ptr = addr     end      addr = getReminderValueByVersion(model, ver)     if addr ~= nil then         temp.g_reminder_ptr = addr     end      temp.init_done = true end  function temp:readIntByAddress(addr)      if addr == 0 then         return     end      local maddr, res = memory:readAddr(addr)     if res == \"OK\" then         return maddr     end      return 0 end  function temp:getTemp()      if not self.init_done then         init()     end      return self:readIntByAddress(self.g_temp_ptr)  end  function temp:getTempFloat()      if not self.init_done then         init()     end      local res = self:readIntByAddress(self.g_temp_ptr)     if res ~= 0 then         return uint32_to_float(res)     end      return res end  function temp:isEnabled()      if not self.init_done then         init()     end      local res = self:readIntByAddress(self.g_reminder_ptr)     return res == 0 end  function temp:enable()      if not self.init_done then         init()     end      memory:writeAddr(self.g_reminder_ptr, 0x00000000) end  function temp:disable()      if not self.init_done then         init()     end      memory:writeAddr(self.g_reminder_ptr, 0x01010101) end  return temp<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u044b\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0442\u0443\u0442 \u0442\u043e\u0436\u0435 \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 &#8212; \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c, \u0430 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u0430 \u0441\u0430\u043c\u0430\u044f \u043a\u0438\u043b\u043b\u0435\u0440 \u0444\u0438\u0447\u0430 NuttX shell.<\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u044c memory \u0442\u043e\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u043c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0436\u0435 \u043a\u0430\u043a \u0442\u0430\u043c \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e<\/p>\n<details class=\"spoiler\">\n<summary>memory.lua<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local memory = {     tempFile = \"\/data\/tmp_mem_\".. os.date(\"%Y%m%d_%H%M%S\") }  local function reverse_uint32_bytes(n)     local b1 = (n &gt;&gt; 24) &amp; 0xFF     local b2 = (n &gt;&gt; 16) &amp; 0xFF     local b3 = (n &gt;&gt; 8) &amp; 0xFF     local b4 = n &amp; 0xFF      return (b4 &lt;&lt; 24) | (b3 &lt;&lt; 16) | (b2 &lt;&lt; 8) | b1 end  function memory:readAddr(addr, byteEndianIsLittle)      byteEndianIsLittle = byteEndianIsLittle or false      local hexAddr = string.format(\"%x\", addr)     os.execute(\"mw 0x\" .. hexAddr .. \" &gt; \".. self.tempFile)      for line in io.lines(self.tempFile) do         local value = string.match(line, \"= 0x(%w+)\")         if value then             dwordValue = tonumber(value, 16)             if byteEndianIsLittle then                 dwordValue = reverse_uint32_bytes(dwordValue)             end              return dwordValue, \"OK\"         end     end      return 0, \"ERR_FAIL\" end  function memory:readBytes(addr)     local hexAddr = string.format(\"%x\", addr)     os.execute(\"mw 0x\" .. hexAddr .. \" &gt; \" .. self.tempFile)      for line in io.lines(self.tempFile) do         local value = string.match(line, \"= 0x(%w+)\")         if value then             -- Convert the 4-byte integer to a number             local intValue = tonumber(value, 16)              -- Split the 4-byte integer into individual bytes (little-endian order)             local byteArray = {}             for i = 0, 3 do                 local byte = (intValue &gt;&gt; (i * 8)) &amp; 0xFF                 table.insert(byteArray, byte)  -- Insert at the end for little-endian order             end              return byteArray, \"OK\"         end     end      return {}, \"ERR_FAIL\" end  function memory:readUtf8String(addr)     local str = \"\"     local i = 0     while true do         -- Read 4 bytes (1 integer) at the current address         local bytes, status = self:readBytes(addr + i)         if status ~= \"OK\" then             return \"\", status         end          -- Process each byte in the 4-byte array         for _, byte in ipairs(bytes) do             if byte == 0 then  -- Stop at the null terminator                 return str, \"OK\"             end             str = str .. string.char(byte)  -- Append the byte as a character         end          i = i + 4  -- Move to the next 4-byte chunk     end end  function memory:writeAddr(addr, value)     local hexAddr = string.format(\"%X\", addr)     local hexVal = string.format(\"%X\", value)     os.execute(\"mw 0x\" .. hexAddr .. \"=\" .. hexVal) end  return memory<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043a \u0432\u043e\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 NuttX shell &#8212; mw<br \/><a href=\"https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/commands.html#mb-mh-and-mw-access-memory\" rel=\"noopener noreferrer nofollow\">https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/commands.html#mb-mh-and-mw-access-memory<\/a><br \/>\u0412\u043e\u0442 \u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f,<br \/>\u0435\u0441\u043b\u0438 \u043a\u0440\u0430\u0442\u043a\u043e, \u0442\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/p>\n<pre><code class=\"typescript\">mw 0x200A5150 4 &gt;&gt; 0x200A5150 = 0x00000000<\/code><\/pre>\n<p>\u0437\u0430\u043f\u0438\u0441\u044c \u0442\u0430\u043a<\/p>\n<pre><code class=\"typescript\">mw 0x200A5150=0x01010101<\/code><\/pre>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439<br \/>\u044d\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 temp_reminder_in_progress \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0443\u043b\u044c,<br \/>\u0447\u0442\u043e \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 temp:disable() \u0432 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f memory: <\/p>\n<blockquote>\n<p>memory:writeAddr(self.g_reminder_ptr, 0x01010101)<\/p>\n<\/blockquote>\n<p>\u0410 \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0443\u0434\u0430 0\u043b\u044c<\/p>\n<blockquote>\n<p>memory:writeAddr(self.g_reminder_ptr, 0x00000000)<\/p>\n<\/blockquote>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442,<br \/>\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/52b\/88e\/696\/52b88e696966d599593a31a37e5698c8.jpg\" alt=\"\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\" title=\"\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\" width=\"409\" height=\"600\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/52b\/88e\/696\/52b88e696966d599593a31a37e5698c8.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/52b\/88e\/696\/52b88e696966d599593a31a37e5698c8.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0434\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u0445, \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0432 \u043a\u043e\u0434 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u043a\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 RAM \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e 2 \u043d\u0435\u0434\u0435\u043b\u0438, \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0438\u043d\u0443\u0441.<\/p>\n<p>PS. \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043b\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c, \u043d\u043e \u043c\u043d\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043d\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u043b\u0438 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>\u042f \u043f\u0440\u043e\u0432\u0435\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u0447\u0430\u0441\u043e\u0432, \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b \u0447\u0442\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u044b Li-ion,<br \/>\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0439 \u043f\u0440\u0435\u0434\u0435\u043b \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 55-60 \u0433\u0440, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u043c\u043d\u0435 \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043b\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0431\u0435\u043d\u0434\u0430, \u0438 \u043e\u043d\u0430 \u0432 \u0442\u043e\u043f\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c 45 \u0433\u0440, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a \u0442\u0435\u043c\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0430 \u0431\u043e\u043b\u0435\u0435 50 \u0433\u0440, \u0438\u0431\u043e \u044d\u0442\u043e \u0447\u0440\u0435\u0432\u0430\u0442\u043e \u0435\u0449\u0435 \u0438 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0435\u0439 \u0431\u0430\u0442\u0430\u0440\u0435\u0438.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0442\u0435\u043c\u043e\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f<br \/>Apache NuttX &#8212; <a href=\"https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html\" rel=\"noopener noreferrer nofollow\">https:\/\/nuttx.apache.org\/<\/a><br \/>NuttShell &#8212; <a href=\"https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html\" rel=\"noopener noreferrer nofollow\">https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html<\/a><br \/>LVGL &#8212; <a href=\"https:\/\/lvgl.io\/\" rel=\"noopener noreferrer nofollow\">https:\/\/lvgl.io\/<\/a><br \/>Easyface &#8212; <a href=\"https:\/\/github.com\/m0tral\/EasyFace\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/m0tral\/EasyFace<\/a><br \/>TempControl &#8212; <a href=\"https:\/\/github.com\/m0tral\/MiWatchLuaWatchfaces\/tree\/master\/MiBand9\/TempControl\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/m0tral\/MiWatchLuaWatchfaces\/tree\/master\/MiBand9\/TempControl<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u044b \u0433\u043e\u0442\u043e\u0432\u044b<br \/>\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043c\u043e\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 MiFitness mod<br \/>\u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u043a\u0430\u043d\u0430\u043b\u0435 @mi_watch_int @mi_watch_news<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/928370\/\"> https:\/\/habr.com\/ru\/articles\/928370\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u041b\u044f\u0445\u043e\u0432\u0441\u043a\u0438\u0439, \u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 10 \u043b\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0447\u0430\u0441\u043e\u0432 Xiaomi \u0434\u043b\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0443 \u043c\u0435\u043d\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043b\u0438\u043d\u0435\u0439\u043a\u0438 \u0447\u0430\u0441\u043e\u0432 Xiaomi &#8212; Mi Band 9.<br \/>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0435 \u0447\u0430\u0441\u043e\u0432 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 Mi Band 10 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043e\u0437\u0440\u0435\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0447\u0430\u0441\u044b, \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u043e\u0432\u043e\u0434 \u043f\u0438\u0442\u0430\u043d\u0438\u044f, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>Temperature overheat shutdown<\/figcaption><\/div>\n<\/figure>\n<h2>\u0427\u0442\u043e \u0436\u0435 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043d\u043e\u0441\u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0441\u043b\u0435\u0442, \u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043b\u0438 \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0431\u0440\u0430\u0441\u043b\u0435\u0442 \u0438 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u041d\u043e \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0447\u0442\u043e \u0437\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438 \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0431\u0440\u0430\u0441\u043b\u0435\u0442. \u0410 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e:<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0441 9\u043a\u0438 Xiaomi \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b BES2700, BES2800 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Bestechnic, \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e flash \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 8Mb, PSRAM 16Mb, \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0435\u043b\u044c, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 BT \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438 \u043a\u0443\u0447\u0430 \u0440\u0430\u0437\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0411\u043b\u043e\u043a \u0441\u0445\u0435\u043c\u0430 BES2700iMP<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443 mb9 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 256Mb nand flash \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0430\u044f HyperOS \u0442\u0443\u0442 &#8212; \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#8212; Apache NuttX, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0430\u044f realtime OS \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u043e\u0433\u043e Lunix, c shell \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 (\u0432\u043e\u0442 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 &#8212; <a href=\"https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html\" rel=\"noopener noreferrer nofollow\">https:\/\/nuttx.apache.org\/docs\/latest\/applications\/nsh\/index.html<\/a>)<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 bootloader \u043d\u0430 \u0431\u0430\u0437\u0435 NuttX \u0434\u043b\u044f mb9 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 128Kb.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 HyperOS, \u043a\u043e\u0442\u043e\u0440\u0443\u044e Xiaomi \u0435\u0449\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 VelaOS (\u043e\u043d\u0430 \u0442\u0430\u043a \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u0434\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u043e\u0434 HyperOS) \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 2 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439: Lua \u0438 AiotJS (\u0432 \u0434\u0435\u0432\u0438\u0447\u0435\u0441\u0442\u0432\u0435 JerryScript). \u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 Lvgl &#8212; \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432 embedded (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 &#8212; <a href=\"https:\/\/lvgl.io\/\" rel=\"noopener noreferrer nofollow\">https:\/\/lvgl.io\/<\/a>)<\/p>\n<p>\u0414\u0432\u0438\u0436\u043e\u043a AiotJS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0430 \u0434\u0432\u0438\u0436\u043e\u043a Lua \u0434\u043b\u044f \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u043e\u0432.<br \/>Lua \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0430\u0445 \u0432\u0435\u0440\u0441\u0438\u0438 5.4 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 lvgl, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432 \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442\u0430\u0445.<\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0431\u0440\u0430\u0441\u043b\u0435\u0442\u0430<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0430,<br \/>\u044f \u043f\u0440\u043e\u0432\u0435\u043b \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 IDA Pro. <br \/>\u0412 \u0434\u0435\u0442\u0430\u043b\u0438 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432.<br \/>\u0412\u043e\u0442 \u0447\u0442\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0432 \u0438\u0442\u043e\u0433\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f system_callback_temp<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall system_callback_temp(float **_temp) {   float board_temp; \/\/ s16   int result; \/\/ r0   int v3; \/\/ r4   int v4; \/\/ r4   __int64 v5; \/\/ [sp+10h] [bp+0h] BYREF    board_temp = **_temp;   unk_200A509F = dword_2009D6E0[31];   unk_200A52A0 = unk_200A529C;   time_diff = get_timestamp(&amp;v5) - body_hand_wrist_time;   result = syslog(              3,              \"[%s] %s: callback_temp called %d %d %d\\n\",              \"system\",              \"callback_temp\",              unk_200A52A0,              unk_200A529C,              *(_DWORD *)&amp;is_watch_is_on_hand);   if ( *(_DWORD *)&amp;is_watch_is_on_hand == 1 )   {     if ( cool_strategy_43_copy &amp;&amp; board_temp &lt; 41.0 )     {       cool_strategy_43_copy = 0;       cool_strategy_43 = 0;       result = syslog(4, \"[%s] %s: Exit the 43-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( cool_strategy_41_copy &amp;&amp; board_temp &lt; 39.0 )     {       cool_strategy_41_copy = 0;       cool_strategy_41 = 0;       result = syslog(4, \"[%s] %s: Exit the 41-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( temp_strategy_autobritghness_off &amp;&amp; board_temp &lt; 37.0 )     {       temp_strategy_autobritghness_off = 0;       cool_strategy_39 = 0;       if ( is_auto_brightness )         sub_2C442BA8(1, &amp;cool_strategy_39);       result = syslog(4, \"[%s] %s: Exit the 39-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( board_temp &gt;= 39.0 &amp;&amp; time_diff &gt; 179 )     {       if ( !cool_strategy_39 )       {         cool_strategy_39 = 1;         syslog(4, \"[%s] %s: Start the 39-degree cooling strategy\\n\", \"system\", \"callback_temp\");         result = system_ui_and_strategy(39);       }       if ( board_temp &gt;= 41.0 )       {         v3 = cool_strategy_41;         if ( !cool_strategy_41 )         {           cool_strategy_41 = 1;           syslog(4, \"[%s] %s: Start the 41-degree cooling strategy\\n\", \"system\", \"callback_temp\");           cool_strategy_41_prev = v3;           cool_strategy_41_val = 41;           cool_strategy_41_started = 1;           result = temp_relative_alarm(v3, (int)&amp;cool_strategy_41_val);         }         if ( board_temp &gt;= 43.0 )         {           v4 = cool_strategy_43;           if ( !cool_strategy_43 )           {             cool_strategy_43 = 1;             syslog(4, \"[%s] %s: Start the 43-degree cooling strategy\\n\", \"system\", \"callback_temp\");             cool_strategy_43_prev = v4;             cool_strategy_43_val = 43;             cool_strategy_43_started = 1;             return temp_relative_alarm(v4, (int)&amp;cool_strategy_43_val);           }         }       }     }   }   else   {     if ( cool_strategy_45 &amp;&amp; board_temp &lt; 46.0 )     {       cool_strategy_45 = 0;       result = syslog(4, \"[%s] %s: Exit the 48-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( cool_strategy_48 &amp;&amp; board_temp &lt; 43.0 )     {       cool_strategy_48 = 0;       result = syslog(4, \"[%s] %s: Exit the 45-degree cooling strategy\\n\", \"system\", \"callback_temp\");     }     if ( board_temp &gt;= 45.0 )     {       if ( !cool_strategy_45 )       {         cool_strategy_45 = 1;         cool_strategy_45_val = 45;         temp_relative_alarm(600, (int)&amp;cool_strategy_45_val);         result = syslog(4, \"[%s] %s: Start the 45-degree cooling strategy\\n\", \"system\", \"callback_temp\");       }       if ( board_temp &gt;= 48.0 &amp;&amp; !cool_strategy_48 )       {         cool_strategy_48 = 1;         cool_strategy_48_val = 48;         temp_relative_alarm(60, (int)&amp;cool_strategy_48_val);         return syslog(4, \"[%s] %s: Start the 48-degree cooling strategy\\n\", \"system\", \"callback_temp\");       }     }   }   return result; }<\/code><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f system_ui_and_strategy<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall system_ui_and_strategy(int temp) {   int result; \/\/ r0   int v2; \/\/ r4   __int64 v3; \/\/ r0    result = temp - 39;   switch ( result )   {     case 0:       syslog(3, \"[%s] %s: 39 temp will set brightness\\n\", \"system\", \"ui_and_strategy\");       is_auto_brightness = is_auto_brightness_0;       syslog(         6,         \"[%s] %s:  is_auto_brightness:%d\",         \"system\",         \"brightness_temp_charge\",         (unsigned __int8)is_auto_brightness_0);       v2 = *(_DWORD *)&amp;brightness_level;       if ( is_auto_brightness )       {         v3 = syslog(                6,                \"[%s] %s:  brightness_current_now:%d\",                \"system\",                \"brightness_temp_charge\",                *(_DWORD *)&amp;brightness_level);         brightness_set_auto_adjustment(0, HIDWORD(v3));         if ( v2 &lt;= 128 )         {           if ( (unsigned int)(v2 - 0x20) &gt; 96 )           {             brightness_set_value(31);             syslog(6, \"[%s] %s: thermal set brightness to 31\\n\", \"system\", \"brightness_temp_charge\");           }           else           {             brightness_set_value(v2);             v2 = *(_DWORD *)&amp;brightness_level;             syslog(               6,               \"[%s] %s: thermal set brightness to %d\\n\",               \"system\",               \"brightness_temp_charge\",               *(_DWORD *)&amp;brightness_level);           }         }         else         {           brightness_set_value(128);           v2 = *(_DWORD *)&amp;brightness_level;           syslog(6, \"[%s] %s: thermal set brightness to 128\\n\", \"system\", \"brightness_temp_charge\");         }         result = syslog(                    6,                    \"[%s] %s:  auto_brightness:ON-&gt;OFF brightness_current_after :%d\",                    \"system\",                    \"brightness_temp_charge\",                    v2);       }       else       {         result = syslog(                    6,                    \"[%s] %s:  brightness_current_now :%d\",                    \"system\",                    \"brightness_temp_charge\",                    *(_DWORD *)&amp;brightness_level);         if ( v2 &gt; 128 )         {           apply_brightness(128);           result = syslog(                      6,                      \"[%s] %s:  brightness_current_now afer :%d\",                      \"system\",                      \"brightness_temp_charge\",                      *(_DWORD *)&amp;brightness_level);         }       }       temp_strategy_autobritghness_off = 1;       return result;     case 2:       if ( cool_strategy_41_started == 2 )       {         syslog(3, \"[%s] %s:  41 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\");         goto LABEL_16;       }       return result;     case 4:       syslog(3, \"[%s] %s:  43 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\");       goto LABEL_16;     case 6:       syslog(3, \"[%s] %s:  45 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\");       goto LABEL_16;     case 9:       syslog(3, \"[%s] %s:  48 temp start reminder window shutdown\\n\", \"system\", \"ui_and_strategy\"); LABEL_16:       if ( paired_flag == 2 )       {         sub_2C1641D4(3u);         result = system(\"poweroff\");       }       else       {         result = temp_rise_reminder(0);       }       break;     default:       return result;   }   return result; }<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430, \u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043d\u0430 \u043f\u043e\u0440\u043e\u0433\u0435 39 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u044f\u0440\u043a\u043e\u0441\u0442\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u043f\u043e\u0440\u043e\u0433\u0430\u0445 41, 43, 45 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0431\u0440\u0430\u0441\u043b\u0435\u0442, \u0435\u0441\u043b\u0438 \u0431\u0440\u0430\u0441\u043b\u0435\u0442 \u043d\u0430 \u0440\u0443\u043a\u0435, \u043a\u043e\u0433\u0434\u0430 \u0436\u0435 \u043e\u043d \u043b\u0435\u0436\u0438\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e &#8212; \u043f\u043e\u0440\u043e\u0433\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f 45, 48.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u0434, \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 temp_rise_reminder(int)<\/p>\n<details class=\"spoiler\">\n<summary>\u0424\u0443\u043d\u043a\u0446\u0438\u044f temp_rise_reminder<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">int __fastcall temp_rise_reminder(int prm) {   int v1; \/\/ r0   int v2; \/\/ r4<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-467227","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=467227"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467227\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=467227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=467227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=467227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}