From 105434c660f75b1811de5e6e1ed9b9b0c5cc9420 Mon Sep 17 00:00:00 2001
From: i7-8700 <1281261856@qq.com>
Date: Mon, 14 Sep 2020 19:06:31 +0800
Subject: [PATCH] update

---
 docs/README.md                         | 18 +++++++++---------
 examples/gen_event_md/gen_event_md.cpp |  8 +++++++-
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/docs/README.md b/docs/README.md
index b4c225b..bf71015 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -166,19 +166,19 @@
 
 |型号|示例图片|
 |---|--------|
-|HB-G250|<img alt="HB-G250" src="./主机类型/smartresize/HB-G250-web.png" style="max-height:80px" />|
-|HB-BJQ560|<img alt="HB-BJQ560" src="./主机类型/smartresize/HB-BJQ560-web.png" style="max-height:80px" />|
-|HB-BJQ560B|<img alt="HB-BJQ560B" src="./主机类型/smartresize/HB-BJQ560B-web.png" style="max-height:80px" />|
+|HB-2050|<img alt="HB-2050" src="./主机类型/smartresize/HB-2050-web.png" style="max-height:80px" />|
+|HB-2050-4G|<img alt="HB-2050-4G" src="./主机类型/smartresize/HB-2050-4G-web.png" style="max-height:80px" />|
+|HB-4040G|<img alt="HB-4040G" src="./主机类型/smartresize/HB-4040G-web.png" style="max-height:80px" />|
 |HB-4040R|<img alt="HB-4040R" src="./主机类型/smartresize/HB-4040R-web.png" style="max-height:80px" />|
-|HB-5050R|<img alt="HB-5050R" src="./主机类型/smartresize/HB-5050R-web.png" style="max-height:80px" />|
-|HB-G1000|<img alt="HB-G1000" src="./主机类型/smartresize/HB-G1000-web.png" style="max-height:80px" />|
-|HB-G1000-4G|<img alt="HB-G1000-4G" src="./主机类型/smartresize/HB-G1000-4G-web.png" style="max-height:80px" />|
+|HB-5050G|<img alt="HB-5050G" src="./主机类型/smartresize/HB-5050G-web.png" style="max-height:80px" />|
+|HB-5050G-4G|<img alt="HB-5050G-4G" src="./主机类型/smartresize/HB-5050G-4G-web.png" style="max-height:80px" />|
 |HB-5050G-4GW|<img alt="HB-5050G-4GW" src="./主机类型/smartresize/HB-5050G-4GW-web.png" style="max-height:80px" />|
+|HB-5050R|<img alt="HB-5050R" src="./主机类型/smartresize/HB-5050R-web.png" style="max-height:80px" />|
+|HB-BJQ560|<img alt="HB-BJQ560" src="./主机类型/smartresize/HB-BJQ560-web.png" style="max-height:80px" />|
+|HB-BJQ560B|<img alt="HB-BJQ560B" src="./主机类型/smartresize/HB-BJQ560B-web.png" style="max-height:80px" />|
 |HB-G1000|<img alt="HB-G1000" src="./主机类型/smartresize/HB-G1000-web.png" style="max-height:80px" />|
 |HB-G1000-4G|<img alt="HB-G1000-4G" src="./主机类型/smartresize/HB-G1000-4G-web.png" style="max-height:80px" />|
-|HB-5050G|<img alt="HB-5050G" src="./主机类型/smartresize/HB-5050G-web.png" style="max-height:80px" />|
-|HB-5050G-4G|<img alt="HB-5050G-4G" src="./主机类型/smartresize/HB-5050G-4G-web.png" style="max-height:80px" />|
-|HB-2050|<img alt="HB-2050" src="./主机类型/smartresize/HB-2050-web.png" style="max-height:80px" />|
+|HB-G250|<img alt="HB-G250" src="./主机类型/smartresize/HB-G250-web.png" style="max-height:80px" />|
 
 ## 四、恒博扩展
 
diff --git a/examples/gen_event_md/gen_event_md.cpp b/examples/gen_event_md/gen_event_md.cpp
index 4be1b88..e2ea0d5 100644
--- a/examples/gen_event_md/gen_event_md.cpp
+++ b/examples/gen_event_md/gen_event_md.cpp
@@ -6,6 +6,7 @@
 #include "../../include/hb_helper.h"
 #include <jlib/win32/UnicodeTool.h>
 #include <jlib/win32/path_op.h>
+#include <map>
 
 using namespace ademco;
 using namespace hb;
@@ -257,6 +258,8 @@ void print_imgs()
 
 	printf("|ÐͺÅ|ʾÀýͼƬ|\n"
 		   "|---|--------|\n");
+
+	std::map<std::string, std::string> imgs;
 	for (auto e : AdemcoEvents) {
 		if (isMachineTypeEvent(e)) {
 			auto t = hb::machineTypeFromAdemcoEvent(e);
@@ -265,12 +268,15 @@ void print_imgs()
 			for (auto brand : get_machine_brands(t)) {
 				auto path = brand_to_path(brand);
 				if (!path.empty()) {
-					printf(R"(|%s|<img alt="%s" src="%s" style="max-height:80px" />|)" "\n", brand.data(), brand.data(), path.data());
+					imgs[brand] = path;
 				}
 
 			}
 		}
 	}
+	for (auto i : imgs) {
+		printf(R"(|%s|<img alt="%s" src="%s" style="max-height:80px" />|)" "\n", i.first.data(), i.first.data(), i.second.data());
+	}
 	printf("\n\n");
 }
 
-- 
2.18.1