[chirp_devel] Adding a New Driver
What is the correct way to add a new driver?
What I did was put it in the \chirp\drivers folder and then did "hg add". This seemed to do what I "think" I want but when I execute "run_all_test.bat" I don't think the new file is tested.
Jim KC9HI
What I did was put it in the \chirp\drivers folder and then did "hg add". This seemed to do what I "think" I want but when I execute "run_all_test.bat" I don't think the new file is tested.
Yep, that's right. In order to get tested, you also need to have a (properly-named) image in tests/images. That's how it knows not to hit the live drivers, since there is no image.
You don't actually need to hg-add it until you want to submit, FWIW. Just being in the tree and having an image is enough. Assuming you put the @directory.register magic on the new class, right?
--Dan
You don't actually need to hg-add it until you want to submit, FWIW. Just being in the tree and having an image is enough. Assuming you put the @directory.register magic on the new class, right?
Like this, or something more?
@directory.register class AnyToneTERMN8RRadio(chirp_common.CloneModeRadio, chirp_common.ExperimentalRadio): """AnyTone TERMN-8R""" VENDOR = "AnyTone" MODEL = "TERMN-8R"
My plans is to have the driver file named "anytone_ht.py". Is that correct?
I also have an image file that I can provide for the TERMN-8R radio and the OBLTR-8R radio. What is the correct way to name them. I should attach them to the corresponding issue, right?
Jim
Jim KC9HI
Like this, or something more?
@directory.register class AnyToneTERMN8RRadio(chirp_common.CloneModeRadio, chirp_common.ExperimentalRadio): """AnyTone TERMN-8R""" VENDOR = "AnyTone" MODEL = "TERMN-8R"
Yep, this plus an image file in the right spot should make the tests run.
My plans is to have the driver file named "anytone_ht.py". Is that correct?
Sure, that's fine.
I also have an image file that I can provide for the TERMN-8R radio and the OBLTR-8R radio. What is the correct way to name them. I should attach them to the corresponding issue, right?
Based on the above, the file should be:
tests/images/AnyTone_TERMN-8R.img
There is a way to get them to properly encode in the patch file, but it's not obvious I think. So, feel free to attach them to the issue, or just send them to the list as attachments after the patch.
Thanks!
--Dan
Based on the above, the file should be:
tests/images/AnyTone_TERMN-8R.img
I did this for the TERMN-8R and the OBLTR-8R
The OBLTR-8R passes all tests. The TERMN-8R failed.
C:\Users\Root\chirp.hg\tests>python run_tests -d AnyTone_TERMN-8R DEBUG: CHIRP 0.3.0dev on WinVista/7 (Python 2.7.3) DEBUG: verbosity=50 AnyTone TERMN-8R Detect ←[1;41m FAILED:←[0m Failed to detect AnyTone TERMN-8R Settings ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R Clone ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R Edges ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R BruteForce ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R CopyAll ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R Banks ←[1;32mSKIPPED:←[0m Banks not supported ---------------------------------------------------------------------- Results: TOTAL : 7 FAILED : 1 SKIPPED: 1 PASSED : 5 CRASHED: 0
What would it not be detecting so I can "fix" it?
Thanks, Jim
On Thu, Apr 2, 2015 at 7:45 PM, Jim Unroe rock.unroe@gmail.com wrote:
Based on the above, the file should be:
tests/images/AnyTone_TERMN-8R.img
I did this for the TERMN-8R and the OBLTR-8R
The OBLTR-8R passes all tests. The TERMN-8R failed.
C:\Users\Root\chirp.hg\tests>python run_tests -d AnyTone_TERMN-8R DEBUG: CHIRP 0.3.0dev on WinVista/7 (Python 2.7.3) DEBUG: verbosity=50 AnyTone TERMN-8R Detect ←[1;41m FAILED:←[0m Failed to detect AnyTone TERMN-8R Settings ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R Clone ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R Edges ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R BruteForce ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R CopyAll ←[1;32m PASSED:←[0m All tests AnyTone TERMN-8R Banks ←[1;32mSKIPPED:←[0m Banks not supported
Results: TOTAL : 7 FAILED : 1 SKIPPED: 1 PASSED : 5 CRASHED: 0
What would it not be detecting so I can "fix" it?
I figure it out. Doh!
Jim KC9HI
participants (2)
-
Dan Smith
-
Jim Unroe