Skip to content

Commit 78db6ff

Browse files
committed
release: update document
1 parent 67170e5 commit 78db6ff

File tree

3 files changed

+68
-15
lines changed

3 files changed

+68
-15
lines changed

HISTORY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# History
22

33
---
4-
## 2.6.0 / TBD
5-
- [INS401] Support the new device.
4+
## 2.6.0 / 2021-10-11
5+
- [INS401] Support communication with ethernet 100base-t1 protocol.
66

77
## 2.5.0 / 2021-07-02
88
- [DMU] Support firmware upgrade.

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A message communication tool for OpenIMU, OpenRTK and other devices of Aceinna
99
## Steps
1010

1111
### 1. Start the tool
12-
There are 2 ways to run the tool
12+
There are 3 ways to run the tool
1313

1414
#### Prepare
1515
1. Install the dependency library. It is better to create a virtual environment before to do it.
@@ -43,12 +43,24 @@ $ pyinstaller build.spec
4343
```
4444

4545
##### Run
46-
```
46+
```bash
4747
$ cd dist
4848
$ ./ans-devices
4949
```
5050

51-
##### Startup Arguments
51+
#### C. From pip
52+
53+
##### Install
54+
```bash
55+
$ pip install openimu
56+
```
57+
58+
##### Run
59+
```
60+
$ openimu
61+
```
62+
63+
#### Startup Arguments
5264
You can specify some arguments while run the tool
5365

5466
Arguments:
@@ -153,21 +165,33 @@ Aceinna Device could be connected with your PC via UART or LAN. The supported in
153165

154166

155167
## Parse Tool
156-
There is a log parse tool integrated in. It could parse OpenRTK and RTK330LA log from data folder. Assgin `parse` to start it.
157-
158-
Example
159-
```bash
160-
$ ans-devices parse
161-
```
168+
There is a log parse tool integrated in. It could parse `OpenRTK`, `RTK330LA`, `IN S401` raw data log from data folder. Assgin `parse` to start it.
162169

163-
Arguments:
170+
### Arguments:
164171

165172
| Name | Type | Default | Description |
166173
| - | :-: | :-: | - |
167174
| -t | String | 'openrtk' | Switch work mode. Value should be one of `openrtk`,`rtkl`,`ins401` |
168175
| -p | String | '.' | Value should be a valid path. It could be the container folder of log files |
169176
| -i | Number | 5 | INS kml rate(hz) |
170177

178+
### Example
179+
180+
Run from source code
181+
```bash
182+
$ python main.py parse
183+
```
184+
185+
Work as execution file
186+
```bash
187+
$ ans-devices parse
188+
```
189+
190+
Run from pip
191+
```bash
192+
$ openimu parse
193+
```
194+
171195
## Changelogs and Release Notes
172196

173197
Please refer to [HISTORY.md](HISTORY.md "Change History")

setup.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,44 @@ def load_json_file_path_under_setting_folder():
2121
json_file_paths = []
2222
setting_root_path = os.path.join(os.getcwd(), 'src', 'aceinna', 'setting')
2323
for root, dirs, files in os.walk(setting_root_path):
24-
json_file = next((item for item in files if item.__contains__('.json')), None)
24+
json_file = next(
25+
(item for item in files if item.__contains__('.json')), None)
2526
if not json_file:
2627
continue
2728

28-
json_file_path = os.path.join(root.replace(setting_root_path,'setting'), json_file)
29+
json_file_path = os.path.join(root.replace(
30+
setting_root_path, 'setting'), json_file)
2931
json_file_paths.append(json_file_path)
3032

3133
return json_file_paths
3234

35+
36+
def load_libraries():
37+
file_paths = []
38+
setting_root_path = os.path.join(os.getcwd(), 'src', 'aceinna', 'libs')
39+
for root, dirs, files in os.walk(setting_root_path):
40+
for item in files:
41+
lib_file = item if item.__contains__(
42+
'.dll') or item.__contains__('.so') else None
43+
if not lib_file:
44+
continue
45+
46+
file_path = os.path.join(root.replace(
47+
setting_root_path, 'libs'), lib_file)
48+
file_paths.append(file_path)
49+
50+
return file_paths
51+
52+
53+
def load_resources():
54+
resources = []
55+
json_files = load_json_file_path_under_setting_folder()
56+
lib_files = load_libraries()
57+
resources.extend(json_files)
58+
resources.extend(lib_files)
59+
return resources
60+
61+
3362
PACKAGE_DESCRIPTION = "Aceinna Navigation System Open Devices Library"
3463

3564
INSTALL_REQUIRES = [
@@ -55,7 +84,7 @@ def load_json_file_path_under_setting_folder():
5584
packages=find_packages("src", exclude=['test', 'tests']),
5685
package_dir={"": "src"},
5786
package_data={
58-
'aceinna': load_json_file_path_under_setting_folder()
87+
'aceinna': load_resources()
5988
},
6089
classifiers=[
6190
"Environment :: Console",

0 commit comments

Comments
 (0)