Merge branch 'master' of github.com:jamesbowman/i2cdriver
This commit is contained in:
commit
b839aa1d5d
36
README.md
36
README.md
|
@ -5,8 +5,9 @@
|
|||
I2CDriver is a tool for controlling any I2C device from your PC's USB port,
|
||||
and can also monitor and capture I2C traffic.
|
||||
It connects as a standard USB serial device, so there are no drivers to install.
|
||||
The serial protocol is [very simple](/protocol.md),
|
||||
and there are included drivers for
|
||||
On the main site
|
||||
[i2cdriver.com](https://i2cdriver.com),
|
||||
there are drivers for
|
||||
|
||||
* Windows/Mac/Linux GUI
|
||||
* Windows/Mac/Linux command-line
|
||||
|
@ -18,28 +19,43 @@ and there are included drivers for
|
|||
Full documentation is at
|
||||
[i2cdriver.com](http://i2cdriver.com).
|
||||
|
||||
How to release
|
||||
--------------
|
||||
For developers: How to make a release
|
||||
-------------------------------------
|
||||
|
||||
To release Python:
|
||||
|
||||
rm -rf dist/*
|
||||
python setup.py dist
|
||||
twine upload/dist/*
|
||||
rm -rf dist/*
|
||||
python setup.py sdist
|
||||
twine upload dist/*
|
||||
|
||||
To build the Windows installer:
|
||||
To build the Windows installer, you first need to build the two executables
|
||||
``i2ccl.exe`` and ``i2cgui.exe`` then use an NSIS script to create the installer.
|
||||
|
||||
On Linux cross-compile ``i2ccl``:
|
||||
|
||||
cd c
|
||||
make -f win32/Makefile
|
||||
|
||||
On Windows build the GUI exeutable:
|
||||
On Windows first make sure that you can run the GUI on the command-line, e.g.
|
||||
|
||||
python python\samples\i2cgui.py
|
||||
|
||||
(You may need to install i2cdriver, wxPython and pySerial).
|
||||
|
||||
Then build the GUI executable using ``pyinstaller``:
|
||||
|
||||
cd python\samples
|
||||
pyinstaller --onefile --windowed --icon=../../images/i2cdriver.ico i2cgui.py
|
||||
|
||||
This builds the executable in ``python\samples\dist\i2cgui.exe``.
|
||||
|
||||
The Windows installer is built with NSIS (Nullsoft Scriptable Install System). Download and install it.
|
||||
|
||||
Copy the two executables ``i2ccl.exe`` and ``i2cgui.exe`` into ``nsis/``.
|
||||
|
||||
Then build the installer with NSIS:
|
||||
|
||||
cd nsis
|
||||
go.bat
|
||||
"C:\Program Files\NSIS\makensis.exe" i2cdriver.nsi
|
||||
|
||||
The script ``go.bat`` in ``nsis`` has an example complete flow.
|
||||
|
|
|
@ -4,7 +4,7 @@ import time
|
|||
import struct
|
||||
from collections import OrderedDict
|
||||
|
||||
__version__ = '0.0.3'
|
||||
__version__ = '0.0.4'
|
||||
|
||||
PYTHON2 = (sys.version_info < (3, 0))
|
||||
|
||||
|
|
|
@ -85,6 +85,10 @@ class Frame(wx.Frame):
|
|||
wx.Frame.__init__(self, None, -1, "I2CDriver")
|
||||
|
||||
self.bold = self.GetFont().Bold()
|
||||
self.addrfonts = [
|
||||
self.GetFont(),
|
||||
self.bold
|
||||
]
|
||||
|
||||
self.label_serial = wx.StaticText(self, label = "-", style = wx.ALIGN_RIGHT)
|
||||
self.label_voltage = wx.StaticText(self, label = "-", style = wx.ALIGN_RIGHT)
|
||||
|
@ -113,7 +117,7 @@ class Frame(wx.Frame):
|
|||
r.Bind(wx.EVT_RADIOBUTTON, self.choose_addr)
|
||||
return r
|
||||
self.heat = {i:addrbutton("%02X" % i) for i in range(8, 112)}
|
||||
devgrid = wx.GridSizer(8, 14, 8)
|
||||
devgrid = wx.GridSizer(8, wx.Size(4, 6))
|
||||
for i,l in sorted(self.heat.items()):
|
||||
devgrid.Add(l)
|
||||
|
||||
|
@ -321,10 +325,10 @@ class Frame(wx.Frame):
|
|||
l = self.heat[i]
|
||||
if s:
|
||||
l.SetForegroundColour((0,0,0))
|
||||
l.SetFont(self.bold)
|
||||
l.SetFont(self.addrfonts[1])
|
||||
else:
|
||||
l.SetForegroundColour((160,) * 3)
|
||||
l.SetFont(self.GetFont())
|
||||
l.SetFont(self.addrfonts[0])
|
||||
if i == self.addr:
|
||||
self.no_addr()
|
||||
l.Enable(s)
|
||||
|
|
Loading…
Reference in New Issue