Add instructions on generating new Ping device type
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start with generate/generate-python.py and the example files under lib/ping-protocol/src/definitions and generate, then verify the documented commands for copying ping1d.json and ping1d.py.in and running the generator. Done means a normal user can follow the instructions to create pinghf files and import brping.pinghf in Python.
Written by the indexing model from the issue text.
Description
There are some users interested in extending Ping-Protocol to support other devices with new messages. I just tested what it would take for a normal user to do that and here are instructions:
Copy message definitions and template from a similar device.
cd lib/ping-protocol/src/definitions
cp ping1d.json pinghf.json
cd ../../../../generate
cp ping1d.py.in pinghf.py.in
Open generate-python.py and add the following to the end:
definitionFile = "%s/pinghf.json" % definitionPath
templateFile = "%s/pinghf.py.in" % templatePath
f = open("%s/pinghf.py" % args.output_directory, "w")
f.write(g.generate(definitionFile, templateFile, {"structToken": struct_token}))
f.close()
Generate the new files:
python3 generate/generate-python.py --output-directory brping
Now in python3 you can from brping import pinghf.
- Dominant language
- Python
- Stars
- 60
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bluerobotics/ping-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bluerobotics/ping-python#141 · 2 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
bluerobotics/ping-python#171 ·
-
set sound speed Open
bluerobotics/ping-python#169 · 2 comments · 1 assignee ·
-
Code after return Open
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
bluerobotics/ping-python#167 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
bluerobotics/ping-python#159 ·
All issues in bluerobotics/ping-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
learningequality/ricecooker#747 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/glTF-Blender-IO#2769 ·