You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each call to this function with positional arguments will generate a new
28
-
header entry into the log file.
27
+
Ideally this function should be called a single time, before any data is
28
+
logged, to configure the data table header once.
29
29
30
-
If the program starts and a log file already exists it will compare the
31
-
labels set up by this function call to the last headers declared in the
32
-
file. If the headers are different it will add a new header entry at the
33
-
end of the file.
30
+
If a log file already exists when the program starts, or if this function
31
+
is called multiple times, it will check the labels already defined in the
32
+
log file. If this function call contains any new labels not already
33
+
present, it will generate a new header row with the additional columns.
34
34
35
-
:param *args: A positional argument for each log header.
36
-
:param timestamp: The timestamp unit that will be automatically added as the first column in every row.
37
-
Setting this argument to ``None`` disables the timestamp. Pass the ``log.MILLISECONDS``, ``log.SECONDS``, , ``log.MINUTES``, ``log.HOURS`` or ``log.DAYS`` values defined by this module. An invalid value will throw an exception.
35
+
By default the first column contains a timestamp for each row. The time
36
+
unit can be selected via the timestamp argument.
37
+
38
+
:param *labels: Any number of positional arguments, each corresponding to an entry in the log header.
39
+
:param timestamp: Select the timestamp unit that will be automatically added as the first column in every row. Timestamp values can be one of ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` or ``None`` to disable the timestamp. The default value is ``log.SECONDS``.
:return: The history as a tuple, most recent last.
97
106
"""
98
107
...
108
+
109
+
defset_range(value: int) ->None:
110
+
"""Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g.
111
+
112
+
Example: ``accelerometer.set_range(8)``
113
+
114
+
:param value: New range for the accelerometer, an integer in ``g``.
0 commit comments