Code Monkey home page Code Monkey logo

tu-rp1210's Introduction

TU-RP1210

A repository with sample source code for the American Trucking Association's Technology and Maintenance Council (TMC) RP1210 Windows Communication API

This is a PyQt5 project, which means it inherits the GPLv3 license with exceptions.

The program makes use of the ctypes library in Python to connect to the RP1210 DLL driver files.

The icons used in the program are from https://icons8.com/.

ExampleScreenshot.PNG

Installation

Install Python 3.6. It may work with other versions, but hasn't been tested yet.

The Python package for this repository is available on pip.

pip install TURP1210

or you can clone this repository and use setup tools to install. From the command prompt:

python setup.py install

This will install an module in your site-packages and copy over all the necessary files.

The demo program will enable you to import and run the module. Running a program base on the TURP1210 module is as simple as:

import TURP1210 
from TURP1210.TU_RP1210 import *
from PyQt5.QtCore import QCoreApplication

class ExampleGUI(TURP1210.TU_RP1210.TU_RP1210):
    def __init__(self):
        super(ExampleGUI,self).__init__()

app = QApplication(sys.argv)
execute = ExampleGUI()
sys.exit(app.exec_())

Packaging

open a command prompt (cmd) that has the python path ready to go. In the GitHub\TURP1210 directory (or wherever you saved the file) we will perform the following actions.

  1. Check dependencies and create an up to date requirements.txt file by running

pipreqs /path/to/project

or

pipreqs --force ./ if you are already in the GitHub\TURP1210 directory

If this doesn't work, try pip install pipreqs first.

  1. Remove the setup utilities, if they are in requirements.txt

  2. Build a wheel

python setup.py bdist_wheel

  1. Upload to PiPy

twine upload dist/*

If you get HTTPError: 400 Client Error: File already exists. for url: https://upload.pypi.org/legacy/, then make sure you update the version number in setup.py. You'll have to delete the old dist directory and try steps 2 and 3 again.

  1. In git, commit and do a pull request to the master branch on GitHub.

  2. Make an executable distribution by running python createFreeze.py build

  3. Test the executable by running build\exe.win32-3.6\TU_RP1210.exe

  4. Add a version tag in GitHub.

  5. Use the version tag and create a zip file with the executable. For example, TU_RP1210-1.0.2.zip

  6. Upload the zip file to GitHub. Anyone with Windows 7 or above should be able to extract this file and run the TU_RP1210.exe file. This program requires an installed RP1210 Vehicle Diagnostics Adapter, like a DG Technologies DPA5.

Acknowledgements

This material is based upon work supported by the National Science Foundation under Grant No. 1715409.

tu-rp1210's People

Contributors

jeremydaily avatar jeremy-daily avatar jmaag15 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.