{"id":2156,"date":"2023-10-21T20:14:23","date_gmt":"2023-10-21T12:14:23","guid":{"rendered":"https:\/\/www.huangrongzhen.ink\/?p=2156"},"modified":"2023-10-23T16:33:01","modified_gmt":"2023-10-23T08:33:01","slug":"%e7%bb%98%e5%88%b6%e7%94%b5%e6%b1%a0%e5%9b%be%e6%a0%87","status":"publish","type":"post","link":"https:\/\/www.huangrongzhen.ink\/?p=2156","title":{"rendered":"\u7ed8\u5236\u7535\u6c60\u56fe\u6807"},"content":{"rendered":"<div class=\"wp-block-post-excerpt\"><p class=\"wp-block-post-excerpt__excerpt\">\u4f7f\u7528\u586b\u5145\u51fd\u6570\uff0c\u5728 LCD \u4e0a\u7ed8\u5236\u7535\u6c60\u56fe\u6807\u3002 <\/p><\/div>\n\n\n<p>\u9996\u5148\u5148\u653e\u4e00\u5f20\u6548\u679c\u56fe\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"226\" height=\"113\" src=\"http:\/\/www.huangrongzhen.ink\/wp-content\/uploads\/2023\/10\/\u7535\u6c60\u56fe\u6807-20231021A.png\" alt=\"\" class=\"wp-image-2159\"\/><\/figure><\/div>\n\n\n<p>\u8fd9\u4e2a\u9a71\u52a8\u53ef\u4ee5\u7ed8\u5236\u56db\u79cd\u4e0d\u540c\u65b9\u5411\u7684\u7535\u6c60\u56fe\u6807\uff0c\u989c\u8272\u3001\u7ebf\u5bbd\u53ef\u4ee5\u81ea\u7531\u914d\u7f6e\uff0c\u7535\u91cf\u663e\u793a\u8303\u56f4 0%~100%\u3002<\/p>\n\n\n\n<p>\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"c\" class=\"language-c\">\/*********************************************************************************************************\n* \u51fd\u6570\u540d\u79f0\uff1a GUIDrawBatIcon\n* \u51fd\u6570\u529f\u80fd\uff1a \u7ed8\u5236\u7535\u6c60\u56fe\u6807\n* \u8f93\u5165\u53c2\u6570\uff1a x\uff0cy     \uff1a\u6574\u578b\u53d8\u91cf\u3002\u539f\u70b9\u5750\u6807\u3002\n*            width    \uff1a\u6574\u578b\u53d8\u91cf\u3002\u5bbd\u5ea6\u3002\n*            height   \uff1a\u6574\u578b\u53d8\u91cf\u3002\u9ad8\u5ea6\u3002\n*            lineSize \uff1a\u6574\u578b\u53d8\u91cf\u3002\u7ebf\u6761\u5bbd\u5ea6\u3002\u7ebf\u6761\u5bbd\u5ea6\u4e3a\u5076\u6570\u7684\u65f6\u5019\u663e\u793a\u4f1a\u5f02\u5e38\uff1f\uff1f\uff1f\n*            edgeColor\uff1a\u6574\u578b\u53d8\u91cf\u3002\u8fb9\u6cbf\u7ebf\u6761\u989c\u8272\u3002\n*            batColor \uff1a\u6574\u578b\u53d8\u91cf\u3002\u5269\u4f59\u7535\u91cf\u989c\u8272\u3002\n*            direction\uff1a\u6574\u578b\u53d8\u91cf\u3002\u7535\u6c60\u65b9\u5411\u30020-\u671d\u5de6\uff0c1-\u671d\u53f3\uff0c2-\u671d\u4e0a\uff0c3-\u671d\u4e0b\u3002\n*            remain   \uff1a\u6574\u578b\u53d8\u91cf\u3002\u5269\u4f59\u7535\u91cf\uff0c\u53d6\u503c 0-100\uff0c\u8868\u793a 0-100% \u7535\u91cf\n* \u8f93\u51fa\u53c2\u6570\uff1a void\n* \u8fd4 \u56de \u503c\uff1a void\n* \u521b\u5efa\u65e5\u671f\uff1a 2023\u5e7410\u670818\u65e5\n* \u6ce8    \u610f\uff1a \n*********************************************************************************************************\/\nvoid GUIDrawBatIcon(const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height,\n  unsigned int lineSize, unsigned int edgeColor, unsigned int batColor, unsigned int direction, unsigned int remain)\n{\n  typedef struct\n  {\n    unsigned int x;\n    unsigned int y;\n  }StructBatCoord;\n  StructBatCoord coord[8];\n  unsigned int x0, y0, x1, y1, space, tWidth, tHeight, tx, ty;\n\n  \/\/\u53c2\u6570\u6821\u9a8c\n  if((0 == width) || (0 == height) || (0 == lineSize) || (direction > 3)) { return; }\n\n  \/\/\u7535\u91cf\u8d85\u8fc7 100\uff0c\u5f3a\u5236\u5b9a\u4e49\u4e3a 100\n  if (remain > 100)\n  {\n    remain = 100;\n  }\n\n  \/*\n   *      1____________________2\n   *   7__|                    |\n   *   |  0                    |\n   *   |__5                    |\n   *   6  |____________________|\n   *      4                    3\n   *\n   * \u7535\u6c60\u6b63\u6781\u7a81\u8d77\u9ad8\u5ea6\u56fa\u5b9a\u4e3a\u6574\u4f53\u9ad8\u5ea6\u7684 10%\n   * \u7535\u6c60\u6b63\u6781\u76f4\u5f84\u4e3a\u6574\u4e2a\u7535\u6c60\u76f4\u5f84\u7684 50%\n   *\/\n  if (0 == direction)\n  {\n    \/\/\u6c42\u5404\u4e2a\u70b9\u4e4b\u95f4\u7684\u5750\u6807\n    space = width \/ 10;\n    coord[0].x = x + space - 1;\n    coord[0].y = y + (height \/ 4) - 1;\n    coord[1].x = coord[0].x;\n    coord[1].y = y;\n    coord[2].x = x + width - 1;\n    coord[2].y = y;\n    coord[3].x = coord[2].x;\n    coord[3].y = y + height - 1;\n    coord[4].x = coord[0].x;\n    coord[4].y = coord[3].y;\n    coord[5].x = coord[0].x;\n    coord[5].y = coord[4].y - (height \/ 4) + 1;\n    coord[6].x = x;\n    coord[6].y = coord[5].y;\n    coord[7].x = x;\n    coord[7].y = coord[0].y;\n\n    \/\/\u7ed8\u5236\u7f3a\u53e3\n    x0 = coord[1].x; y0 = coord[1].y; x1 = coord[2].x; y1 = coord[2].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[2].x - lineSize + 1; y0 = coord[2].y; x1 = coord[3].x; y1 = coord[3].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[4].x; y0 = coord[4].y - lineSize + 1; x1 = coord[3].x; y1 = coord[3].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u7ad6\u7ebf\n    x0 = coord[1].x; y0 = coord[1].y; x1 = coord[0].x + lineSize - 1; y1 = coord[0].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[5].x; y0 = coord[5].y; x1 = coord[4].x + lineSize - 1; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[7].x; y0 = coord[7].y; x1 = coord[6].x + lineSize - 1; y1 = coord[6].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u6a2a\u7ebf\n    x0 = coord[7].x; y0 = coord[7].y; x1 = coord[0].x + lineSize - 1; y1 = coord[0].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[6].x; y0 = coord[6].y - lineSize + 1; x1 = coord[5].x + lineSize - 1; y1 = coord[5].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u7535\u91cf\u4e3a\u96f6\uff0c\u76f4\u63a5\u8fd4\u56de\n    if (0 == remain) { return; }\n\n    \/\/\u786e\u5b9a\u7535\u6c60\u4e3b\u4f53\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[1].x + lineSize;\n    x1 = coord[2].x - lineSize;\n    y0 = coord[1].y + lineSize;\n    y1 = coord[4].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u5c0f\u4e8e\u7b49\u4e8e 90 \u7684\u90e8\u5206\n    tx = x1 - remain * tWidth \/ 90;\n    if (tx > x0) { x0 = tx; }\n    GUIFillColor(x0, y0, x1, y1, batColor);\n\n    \/\/\u786e\u5b9a\u6b63\u6781\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[7].x + lineSize;\n    x1 = coord[1].x + lineSize - 1;\n    y0 = coord[7].y + lineSize;\n    y1 = coord[6].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u6b63\u6781\u90e8\u5206\u90e8\u5206\n    if (remain > 90)\n    {\n      remain = remain - 90;\n      tx = x1 - remain * tWidth \/ 10;\n      if (tx > x0) { x0 = tx; }\n      GUIFillColor(x0, y0, x1, y1, batColor);\n    }\n  }\n\n  \/*\n   *      0____________________1\n   *      |                    |__3\n   *      |                    2  |\n   *      |                    5__|\n   *      |____________________|  4\n   *      7                    6\n   *\n   * \u7535\u6c60\u6b63\u6781\u7a81\u8d77\u9ad8\u5ea6\u56fa\u5b9a\u4e3a\u6574\u4f53\u9ad8\u5ea6\u7684 10%\n   * \u7535\u6c60\u6b63\u6781\u76f4\u5f84\u4e3a\u6574\u4e2a\u7535\u6c60\u76f4\u5f84\u7684 50%\n   *\/\n  else if (1 == direction)\n  {\n    \/\/\u6c42\u5404\u4e2a\u70b9\u4e4b\u95f4\u7684\u5750\u6807\n    space = width \/ 10;\n    coord[0].x = x;\n    coord[0].y = y;\n    coord[1].x = (x + width - 1) - space + 1;\n    coord[1].y = y;\n    coord[2].x = coord[1].x;\n    coord[2].y = y + (height \/ 4) - 1;\n    coord[3].x = x + width - 1;\n    coord[3].y = coord[2].y;\n    coord[4].x = coord[3].x;\n    coord[4].y = (y + height - 1) - (height \/ 4) + 1;\n    coord[5].x = coord[1].x;\n    coord[5].y = coord[4].y;\n    coord[6].x = coord[1].x;\n    coord[6].y = y + height - 1;\n    coord[7].x = x;\n    coord[7].y = coord[6].y;\n\n    \/\/\u7ed8\u5236\u7f3a\u53e3\n    x0 = coord[0].x; y0 = coord[0].y; x1 = coord[1].x; y1 = coord[1].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[7].x; y0 = coord[7].y - lineSize + 1; x1 = coord[6].x; y1 = coord[6].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[0].x; y0 = coord[0].y; x1 = coord[7].x + lineSize - 1; y1 = coord[7].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u7ad6\u7ebf\n    x0 = coord[1].x - lineSize + 1; y0 = coord[1].y; x1 = coord[2].x; y1 = coord[2].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[5].x - lineSize + 1; y0 = coord[5].y; x1 = coord[6].x; y1 = coord[6].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[3].x - lineSize + 1; y0 = coord[3].y; x1 = coord[4].x; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u6a2a\u7ebf\n    x0 = coord[2].x - lineSize + 1; y0 = coord[2].y; x1 = coord[3].x; y1 = coord[3].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[5].x - lineSize + 1; y0 = coord[5].y - lineSize + 1; x1 = coord[4].x; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u7535\u91cf\u4e3a\u96f6\uff0c\u76f4\u63a5\u8fd4\u56de\n    if (0 == remain)\n    {\n      return;\n    }\n\n    \/\/\u786e\u5b9a\u7535\u6c60\u4e3b\u4f53\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[0].x + lineSize;\n    x1 = coord[1].x - lineSize;\n    y0 = coord[0].y + lineSize;\n    y1 = coord[7].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u5c0f\u4e8e\u7b49\u4e8e 90 \u7684\u90e8\u5206\n    tx = x0 + remain * tWidth \/ 90;\n    if (tx &lt; x1) { x1 = tx; }\n    GUIFillColor(x0, y0, x1, y1, batColor);\n\n    \/\/\u786e\u5b9a\u6b63\u6781\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[2].x - lineSize + 1;\n    x1 = coord[3].x - lineSize;\n    y0 = coord[2].y + lineSize;\n    y1 = coord[5].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u6b63\u6781\u90e8\u5206\u90e8\u5206\n    if (remain > 90)\n    {\n      remain = remain - 90;\n      tx = x0 + remain * tWidth \/ 10;\n      if (tx &lt; x1) { x1 = tx; }\n      GUIFillColor(x0, y0, x1, y1, batColor);\n    }\n  }\n\n  \/*\n   *          0____1\n   *      6___|    |___3\n   *      |   7    2   |\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |____________|\n   *      5            4\n   *\n   * \u7535\u6c60\u6b63\u6781\u7a81\u8d77\u9ad8\u5ea6\u56fa\u5b9a\u4e3a\u6574\u4f53\u9ad8\u5ea6\u7684 10%\n   * \u7535\u6c60\u6b63\u6781\u76f4\u5f84\u4e3a\u6574\u4e2a\u7535\u6c60\u76f4\u5f84\u7684 50%\n   *\/\n  else if (2 == direction)\n  {\n    \/\/\u6c42\u5404\u4e2a\u70b9\u4e4b\u95f4\u7684\u5750\u6807\n    space = height \/ 10;\n    coord[0].x = x + (width \/ 4) - 1;\n    coord[0].y = y;\n    coord[1].x = (x + width - 1) - (width \/ 4) + 1;\n    coord[1].y = y;\n    coord[2].x = coord[1].x;\n    coord[2].y = y + space - 1;\n    coord[3].x = x + width - 1;\n    coord[3].y = coord[2].y;\n    coord[4].x = coord[3].x;\n    coord[4].y = y + height - 1;\n    coord[5].x = x;\n    coord[5].y = coord[4].y;\n    coord[6].x = x;\n    coord[6].y = coord[2].y;\n    coord[7].x = coord[0].x;\n    coord[7].y = coord[6].y;\n\n    \/\/\u7ed8\u5236\u7f3a\u53e3\n    x0 = coord[6].x; y0 = coord[6].y; x1 = coord[5].x + lineSize - 1; y1 = coord[5].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[5].x; y0 = coord[5].y - lineSize + 1; x1 = coord[4].x; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[3].x - lineSize + 1; y0 = coord[3].y; x1 = coord[4].x; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u6a2a\u7ebf\n    x0 = coord[6].x; y0 = coord[6].y; x1 = coord[7].x; y1 = coord[7].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[0].x; y0 = coord[0].y; x1 = coord[1].x; y1 = coord[1].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[2].x; y0 = coord[2].y; x1 = coord[3].x; y1 = coord[3].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u7ad6\u7ebf\n    x0 = coord[0].x; y0 = coord[0].y; x1 = coord[7].x + lineSize - 1; y1 = coord[7].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[1].x - lineSize + 1; y0 = coord[1].y; x1 = coord[2].x; y1 = coord[2].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u7535\u91cf\u4e3a\u96f6\uff0c\u76f4\u63a5\u8fd4\u56de\n    if (0 == remain) { return; }\n\n    \/\/\u786e\u5b9a\u7535\u6c60\u4e3b\u4f53\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[6].x + lineSize;\n    x1 = coord[3].x - lineSize;\n    y0 = coord[6].y + lineSize;\n    y1 = coord[5].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u5c0f\u4e8e\u7b49\u4e8e 90 \u7684\u90e8\u5206\n    ty = y1 - remain * tHeight \/ 90;\n    if(ty > y0) { y0 = ty; }\n    GUIFillColor(x0, y0, x1, y1, batColor);\n\n    \/\/\u786e\u5b9a\u6b63\u6781\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[0].x + lineSize;\n    x1 = coord[1].x - lineSize;\n    y0 = coord[0].y + lineSize;\n    y1 = coord[7].y + lineSize - 1;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u6b63\u6781\u90e8\u5206\u90e8\u5206\n    if (remain > 90)\n    {\n      remain = remain - 90;\n      ty = y1 - remain * tHeight \/ 10;\n      if (ty > y0) { y0 = ty; }\n      GUIFillColor(x0, y0, x1, y1, batColor);\n    }\n  }\n\n  \/*\n   *      0____________1\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |            |\n   *      |___6    3___|\n   *      7   |____|   2\n   *          5    4\n   *\n   * \u7535\u6c60\u6b63\u6781\u7a81\u8d77\u9ad8\u5ea6\u56fa\u5b9a\u4e3a\u6574\u4f53\u9ad8\u5ea6\u7684 10%\n   * \u7535\u6c60\u6b63\u6781\u76f4\u5f84\u4e3a\u6574\u4e2a\u7535\u6c60\u76f4\u5f84\u7684 50%\n   *\/\n  else if (3 == direction)\n  {\n    \/\/\u6c42\u5404\u4e2a\u70b9\u4e4b\u95f4\u7684\u5750\u6807\n    space = height \/ 10;\n    coord[0].x = x;\n    coord[0].y = y;\n    coord[1].x = x + width - 1;\n    coord[1].y = coord[0].y;\n    coord[2].x = coord[1].x;\n    coord[2].y = (y + height - 1) - space + 1;\n    coord[3].x = (x + width - 1) - (width \/ 4) + 1;\n    coord[3].y = coord[2].y;\n    coord[4].x = coord[3].x;\n    coord[4].y = y + height - 1;\n    coord[5].x = x + (width \/ 4) \/ 1;\n    coord[5].y = coord[4].y;\n    coord[6].x = coord[5].x;\n    coord[6].y = coord[2].y;\n    coord[7].x = coord[0].x;\n    coord[7].y = coord[6].y;\n\n    \/\/\u7ed8\u5236\u7f3a\u53e3\n    x0 = coord[0].x; y0 = coord[0].y; x1 = coord[7].x + lineSize - 1; y1 = coord[7].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[0].x; y0 = coord[0].y; x1 = coord[1].x; y1 = coord[1].y + lineSize - 1; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[1].x - lineSize + 1; y0 = coord[1].y; x1 = coord[2].x; y1 = coord[2].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u6a2a\u7ebf\n    x0 = coord[7].x; y0 = coord[7].y - lineSize + 1; x1 = coord[6].x; y1 = coord[6].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[5].x; y0 = coord[5].y - lineSize + 1; x1 = coord[4].x; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[3].x; y0 = coord[3].y - lineSize + 1; x1 = coord[2].x; y1 = coord[2].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u753b\u6b63\u6781\u7ad6\u7ebf\n    x0 = coord[6].x; y0 = coord[6].y - lineSize + 1; x1 = coord[5].x + lineSize - 1; y1 = coord[5].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n    x0 = coord[3].x - lineSize + 1; y0 = coord[3].y - lineSize + 1; x1 = coord[4].x; y1 = coord[4].y; GUIFillColor(x0, y0, x1, y1, edgeColor);\n\n    \/\/\u7535\u91cf\u4e3a\u96f6\uff0c\u76f4\u63a5\u8fd4\u56de\n    if (0 == remain) { return; }\n\n    \/\/\u786e\u5b9a\u7535\u6c60\u4e3b\u4f53\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[0].x + lineSize;\n    x1 = coord[1].x - lineSize;\n    y0 = coord[0].y + lineSize;\n    y1 = coord[7].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u5c0f\u4e8e\u7b49\u4e8e 90 \u7684\u90e8\u5206\n    ty = y0 + remain * tHeight \/ 90;\n    if (ty &lt; y1) { y1 = ty; }\n    GUIFillColor(x0, y0, x1, y1, batColor);\n\n    \/\/\u786e\u5b9a\u6b63\u6781\u90e8\u5206\u5185\u90e8\u533a\u57df\u5750\u6807\n    x0 = coord[6].x + lineSize;\n    x1 = coord[3].x - lineSize;\n    y0 = coord[6].y - lineSize + 1;\n    y1 = coord[5].y - lineSize;\n    tWidth = x1 - x0 + 1;\n    tHeight = y1 - y0 + 1;\n\n    \/\/\u586b\u5145\u6b63\u6781\u90e8\u5206\u90e8\u5206\n    if (remain > 90)\n    {\n      remain = remain - 90;\n      ty = y0 + remain * tHeight \/ 10;\n      if (ty &lt; y1) { y1 = ty; }\n      GUIFillColor(x0, y0, x1, y1, batColor);\n    }\n  }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528\u586b\u5145\u51fd\u6570\uff0c\u5728 LCD \u4e0a\u7ed8\u5236\u7535\u6c60\u56fe\u6807\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=\/wp\/v2\/posts\/2156"}],"collection":[{"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2156"}],"version-history":[{"count":5,"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=\/wp\/v2\/posts\/2156\/revisions"}],"predecessor-version":[{"id":2164,"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=\/wp\/v2\/posts\/2156\/revisions\/2164"}],"wp:attachment":[{"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huangrongzhen.ink\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}