Skip to content

Commit 10c5673

Browse files
committed
[settings] added docs
1 parent 12e9a50 commit 10c5673

File tree

7 files changed

+128
-1
lines changed

7 files changed

+128
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Downloading
2+
===========
3+
4+
The settings are saved by iterating over a set collection of parameter names.
5+
Any particular instrument might not respond to the query of any of the
6+
parameters (e.g. a total station will not respond to queries regarding the
7+
digital level settings). These settings are marked empty, and later cleaned up
8+
before the config file is saved to disk.
9+
10+
It is possible to save the default values for the parameters, that the
11+
instrument did not respond to. In this case, the config file might need to be
12+
manually cleaned of the irrelevant or unwanted settings.
13+
14+
Examples
15+
--------
16+
17+
.. code-block:: shell
18+
:caption: Saving only applicable GeoCom settings
19+
20+
iman download settings COM1 geocom tps_settings.json
21+
22+
.. code-block:: shell
23+
:caption: Saving to YAML format in a file without extension
24+
25+
iman download settings -f yaml COM1 geocom tps_settings
26+
27+
.. code-block:: shell
28+
:caption: Saving all settings including defaults of not applicable ones
29+
30+
iman download settings --defaults COM1 geocom tps_settings.json
31+
32+
Usage
33+
-----
34+
35+
.. click:: instrumentman.settings:cli_download
36+
:prog: iman download settings

docs/commands/settings/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
:icon: material/cog
2+
3+
Settings
4+
========
5+
6+
For different measurements, different instrument settings might be required.
7+
The settings commands can be used to save the settings to the config file,
8+
and later load them back as necessary.
9+
10+
.. toctree::
11+
:maxdepth: 1
12+
13+
download
14+
validate
15+
upload

docs/commands/settings/upload.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Uploading
2+
=========
3+
4+
Once a config file is created (either manually, or saved from the instrument),
5+
the parameters can be uploaded back to the instrument. The config file must
6+
have a valid structure, or the upload will be refused.
7+
8+
The config file can either be in JSON, YAML or TOML format, but regardless,
9+
the structure must follow the required schema.
10+
11+
.. note::
12+
13+
Configs can be validated before upload with the validation command.
14+
15+
Examples
16+
--------
17+
18+
.. code-block:: json
19+
:caption: Total station ATR and target setting
20+
21+
{
22+
"protocol": "geocom",
23+
"settings": [
24+
{
25+
"subsystem": "aut",
26+
"options": {
27+
"atr": true
28+
}
29+
},
30+
{
31+
"subsystem": "bap",
32+
"options": {
33+
"target_type": "REFLECTOR",
34+
"prizm_type": "MINI"
35+
}
36+
}
37+
]
38+
}
39+
40+
41+
.. code-block:: json
42+
:caption: DNA normal staff direction with meter units
43+
44+
{
45+
"protocol": "gsidna",
46+
"settings": [
47+
{
48+
"subsystem": "settings",
49+
"options": {
50+
"distance_unit": "METER",
51+
"staff_mode": false
52+
}
53+
}
54+
]
55+
}
56+
57+
Usage
58+
-----
59+
60+
.. click:: instrumentman.settings:cli_upload
61+
:prog: iman upload settings
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Validation
2+
==========
3+
4+
An instrument settings file must have a valid structure, or the upload will be
5+
refused. The schema file is available in the
6+
`GitHub repository <https://github.com/MrClock8163/Instrumentman/blob/main/src/instrumentman/settings/schema_settings.json>`_.
7+
8+
Usage
9+
-----
10+
11+
.. click:: instrumentman.settings:cli_validate
12+
:prog: iman validate settings
13+

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Content
4444
commands/protocoltest/index
4545
commands/files/index
4646
commands/jobs/index
47+
commands/settings/index
4748

4849
Indices
4950

docs/latexindex.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ Applications
2929
commands/protocoltest/index
3030
commands/files/index
3131
commands/jobs/index
32+
commands/settings/index

src/instrumentman/settings/save.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def download_settings_gsidna(
183183
"delay": 0,
184184
"autooff": "SLEEP",
185185
"display_heater": False,
186-
"curvature_correction": True,
186+
"curvature_correction": False,
187187
"staff_mode": False,
188188
"format": "GSI8",
189189
"code_recording": "BEFORE"

0 commit comments

Comments
 (0)