From 867b283209017e8d66c5284f75d5a5b3bba73912 Mon Sep 17 00:00:00 2001 From: esea_info Date: Fri, 14 Apr 2023 15:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B4=E6=9C=88=E6=97=A5=20=E4=BD=8D?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/2023/03/20/37/info.bin | Bin 0 -> 79 bytes data/2023/03/20/37/sensor.bin | Bin 0 -> 1754 bytes handheld.py | 27 ++++++++++++++++++--------- 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 data/2023/03/20/37/info.bin create mode 100644 data/2023/03/20/37/sensor.bin diff --git a/data/2023/03/20/37/info.bin b/data/2023/03/20/37/info.bin new file mode 100644 index 0000000000000000000000000000000000000000..aff7373e46aeb93ebc5c7784022dd98764731c40 GIT binary patch literal 79 ycmWe<7U45Al?aQK3%nY}dgg@?ThHCY?iZA&iZUQT3WABm`Vs(wYzz#{2tfdh5Dg*# literal 0 HcmV?d00001 diff --git a/data/2023/03/20/37/sensor.bin b/data/2023/03/20/37/sensor.bin new file mode 100644 index 0000000000000000000000000000000000000000..84c1b09791a283134f088120039045ec365c8813 GIT binary patch literal 1754 zcmWd@R8C+}U|?Vf@^A?)oA{jJG^-D*7wbX>M&$(z2J8$BTl$ z#eUviq3$MbW?n6U4iQ>Wb3&K;PIL=#FtCxfzZc$I*jE5HhlPRRPFR53L5FX)ik5mt z7qz1`7O8z!HC0VhPE(wxa94h#+;rKaGWs$Tq$f$GNFI`Cl8BIaA|WB|Ap1r}R?1TR zyC~QkW(J0LqQ+uh#ZHOmNo#A#6)fjedo94d&+CX2R4U^f#EN&4ew+gcOG7z9o&W7a@=RRCUJ#v$#XGq ziEz1b*>PRqtm4e!jOSG3+{RJB5zk@5q0J!!3~g?XyX-sJr?P|1VPs$^U{7KXW%put z0LGOY5PAUF0qha%vFzdO{_M`|@$6wh906q8v#YSX0#%m-MeNzN*g4ssv0Y;Wn*&S_ zpV|1?RoRu;_1G2Inc2D7-?05>lVrC8#=Z%=1iK^b4Jt8X!;pVKcnT(K$JfK{lV6B literal 0 HcmV?d00001 diff --git a/handheld.py b/handheld.py index 433b7eb..203c051 100644 --- a/handheld.py +++ b/handheld.py @@ -390,9 +390,9 @@ class Handheld(object): def getNewFolderFromOldFolder( self, ) -> Path: # 服务器上转移后的模式 tmp_folder = self.old_folder.parent.parent - path_tuple = ("20"+str(self.info_dict['year']) - ,str(self.info_dict['month']) - ,str(self.info_dict['day']) + path_tuple = ("20"+f"{self.info_dict['year']:02d}" + ,f"{self.info_dict['month']:02d}" + ,f"{self.info_dict['day']:02d}" ,self.old_folder.parts[-1] ) self.new_folder =tmp_folder.joinpath(*path_tuple) self.mydir.setBaseDir(self.new_folder) @@ -412,6 +412,12 @@ class Handheld(object): + str(self.info_dict['hour']) + ':' \ + str(self.info_dict['minute']) + ':' \ + str(self.info_dict['second']) + # ret = "20"+ f"{self.info_dict['year']:02d}" + '_' \ + # + f"{self.info_dict['month']:02d}" + '_' \ + # + f"{self.info_dict['day']:02d}" + '_' \ + # + f"{self.info_dict['hour']:02d}" + '_' \ + # + f"{self.info_dict['minute']:02d}" + '_' \ + # + f"{self.info_dict['second']:02d}" return ret pass @@ -490,12 +496,7 @@ class Handheld(object): self.hhp.setMode(1) self.current_measure_time = self.getCurrentMeasureTimeFromInfoDict() - self.ymdhms = "20"+ str(self.info_dict['year']) + '_' \ - + str(self.info_dict['month']) + '_' \ - + str(self.info_dict['day']) + '_' \ - + str(self.info_dict['hour']) + '_' \ - + str(self.info_dict['minute']) + '_' \ - + str(self.info_dict['second']) + self.get_ymdhms() # self.output_path 定位到 /data/output 目录? self.output_path = OUTPUT_DIR.joinpath( self.ymdhms) @@ -624,6 +625,14 @@ class Handheld(object): self.hhb.write_buf(buf) pass + def get_ymdhms(self, ): + self.ymdhms = "20"+ f"{self.info_dict['year']:02d}" + '_' \ + + f"{self.info_dict['month']:02d}" + '_' \ + + f"{self.info_dict['day']:02d}" + '_' \ + + f"{self.info_dict['hour']:02d}" + '_' \ + + f"{self.info_dict['minute']:02d}" + '_' \ + + f"{self.info_dict['second']:02d}" + def getTimeFnameFromInfoDict(self,) : ymdhms = "20"+ str(self.info_dict['year']) + '_' \ + str(self.info_dict['month']) + '_' \