11"""將資料記錄到您的 micro:bit V2。"""
22from typing import Literal , Optional , Union , overload
33MILLISECONDS = 1
4- """毫秒時間郵戳格式 。"""
4+ """毫秒時間戳記格式 。"""
55SECONDS = 10
6- """秒時間郵戳格式 。"""
6+ """秒時間戳記格式 。"""
77MINUTES = 600
8- """分鐘時間郵戳格式 """
8+ """分鐘時間戳記格式 """
99HOURS = 36000
10- """小時時間郵戳格式 。"""
10+ """小時時間戳記格式 。"""
1111DAYS = 864000
12- """天時間郵戳格式 。"""
12+ """天時間戳記格式 。"""
1313
1414def set_labels (* args : str , timestamp : Optional [Literal [1 , 10 , 36000 , 864000 ]]= SECONDS ) -> None :
15- """設定記錄檔案標頭 。
15+ """設定紀錄檔案標頭 。
1616
1717Example: ``log.set_labels('x', 'y', 'z', timestamp=log.MINUTES)``
1818
@@ -24,9 +24,9 @@ labels set up by this function call to the last headers declared in the
2424file. If the headers are different it will add a new header entry at the
2525end of the file.
2626
27- :param *args: 各記錄標頭的位置引數 。
27+ :param *args: 各紀錄標頭的位置引數 。
2828:param timestamp: (時間戳記) 將自動新增為每列第一行的時間郵戳單元。
29- 將此引數設定為 ``None``,則會停用時間郵戳 。傳遞此模組定義的 ``log.MILLISECONDS``、``log.SECONDS``、``log.MINUTES``、``log.HOURS`` 或 ``log.DAYS`` 值。無效值將擲回例外狀況。"""
29+ 將此引數設定為 ``None``,則會停用時間戳記 。傳遞此模組定義的 ``log.MILLISECONDS``、``log.SECONDS``、``log.MINUTES``、``log.HOURS`` 或 ``log.DAYS`` 值。無效值將擲回例外狀況。"""
3030 ...
3131
3232@overload
@@ -44,12 +44,12 @@ entry to be added to the log with the extra label.
4444Labels previously specified and not present in this function call will be
4545skipped with an empty value in the log row.
4646
47- :param log_data: 若要記錄為字典的資料,每個標頭都有一個金鑰 。"""
47+ :param log_data: 若要記錄為字典的資料,每個標頭都有一把金鑰 。"""
4848 ...
4949
5050@overload
5151def add (** kwargs : Union [str , int , float ]) -> None :
52- """使用關鍵字引數將資料行新增至紀錄中 。
52+ """使用關鍵字引數,將資料列新增至紀錄中 。
5353
5454Example: ``log.add(temp=temperature())``
5555
@@ -71,16 +71,16 @@ Example: ``log.delete()``
7171To add the log headers the ``set_labels`` function has to be called again
7272after this.
7373
74- :param full: 選擇從快取記憶體中刪除資料的「完整」抹除格式 。
75- 如果設定為 ``False`` 則會使用「快速」方法,該方法會使資料無效,而不是執行較慢的完全抹除 。"""
74+ :param full: 選擇從快閃存放裝置中移除資料的「完全」清除格式 。
75+ 如果設定為 ``False``, 則會使用「快速」方法,該方法會使資料無效,而不是執行較慢的完全清除 。"""
7676 ...
7777
7878def set_mirroring (serial : bool ):
79- """將資料記錄活動鏡像到序列輸出 。
79+ """將資料紀錄活動鏡像到序列輸出 。
8080
8181Example: ``log.set_mirroring(True)``
8282
8383Mirroring is disabled by default.
8484
85- :param serial: 傳遞 ``True`` 將資料記錄活動鏡像到序列輸出 ,``False`` 則停用鏡像。"""
85+ :param serial: 傳遞 ``True`` 將資料紀錄活動鏡像到序列輸出 ,``False`` 則停用鏡像。"""
8686 ...
0 commit comments