Skip to content

Commit

Permalink
Fixed up v0.1.0 for windows to work
Browse files Browse the repository at this point in the history
removed manufacturer check

for gStrength pyserial device, manufacturer reads as adafruit on mac and microsoft on windows
Reorganized and added icons for windows


had to move cli back up a level


Updated icon for windows


Added taskbar/startbar icon for windows

updated version number
  • Loading branch information
nsbruce committed Jan 14, 2021
1 parent 58cb1d2 commit 7d401ba
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 14 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Fingrrs Desktop
Application to plot serial input for Win/Mac/Linux with emphasis on specific devices

Application to plot and interact serial input for Win/Mac/Linux. Built for strength assessments and testing.

## Devices

Currently supports the [ExSurgo](https://exsurgo.tech/) gStrength V1 over USB but with a minor additions to the [known_devices](fingrrs_desktop/fingrrs_desktop/known_devices.py) file can support most serial devices!
4 changes: 0 additions & 4 deletions build.sh

This file was deleted.

1 change: 1 addition & 0 deletions fingrrs_desktop/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller --name="Fingrrs Desktop" --onefile --windowed --icon=..\graphics\icon-windows.ico cli.py
1 change: 1 addition & 0 deletions fingrrs_desktop/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller --name 'Fingrrs Desktop' --onefile --hidden-import cmath --windowed --icon ../graphics/icon-mac.icns cli.py
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def setup_timers(self):
def setup_UI(self):
# Window properties
self.setWindowTitle("Fingrrs Desktop")
self.resize(1400,800) # This works though
self.resize(1400,800)
self.setWindowIcon(QtGui.QIcon('../../graphics/icon.png'))

# Setup group for session control buttons
session_ctrl_group = QtGui.QGroupBox('Device controls')
Expand Down Expand Up @@ -250,7 +251,7 @@ def refresh_available_devices(self):
newly_availably_devices=[]
for avail_dev in sd.get_available_devices():
for known_dev in kd.all_known_devices:
if known_dev['preferred_port_type'] in avail_dev.device and known_dev['manufacturer']==avail_dev.manufacturer:
if known_dev['preferred_port_type'] in avail_dev.hwid:# and known_dev['manufacturer']==avail_dev.manufacturer:
newly_availably_devices.append(known_dev)
#TODO if not a known device, offer ability to set baud etc. Will need generic known dev item
if self.available_devices != newly_availably_devices:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __gStrength_line_parser__(line):
'name': 'gStrength V1',
'baud': 115200,
'timeout': None,
'preferred_port_type': 'usb',
'preferred_port_type': 'USB',
# 'preferred_port_type': 'Bluetooth',
'cmd_stop': bytes(b'w'),
'cmd_zero': bytes(b't'),
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

def print_available_devices():
print("Available devices:")
for port, desc, hwid in sorted(serial.tools.list_ports.comports()):
for device, desc, hwid in sorted(serial.tools.list_ports.comports()):
#TODO check if this is the same for windows
if desc=='n/a' and hwid=='n/a':
continue
else:
print("{}: {} [{}]".format(port, desc, hwid))
print("{}: {} [{}]".format(device, desc, hwid))

def get_available_devices():
return [x for x in serial.tools.list_ports.comports() if x.hwid!='n/a' and x.description!='n/a']
Expand All @@ -29,13 +29,13 @@ def __init__(self, mydev):
self.buffer=None

def get_port(self, preferred_port_type_str):
# ports=[port for port, desc, hwid in sorted(serial.tools.list_ports.comports())]
# ports=[port for ports, desc, hwid in sorted(serial.tools.list_ports.comports())]
# for port in ports:
# if preferred_port_type_str in port:
# if preferred_port_type_str in device:
# return port
#TODO handle if port isn't in there
for port, desc, hwid in sorted(serial.tools.list_ports.comports()):
if preferred_port_type_str in port:
if preferred_port_type_str in hwid:
return port

def __setup_connection__(self):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py → fingrrs_desktop/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
setup(
name="Fingrrs Deskop",
version="0.1.0",
version="0.1.1",
description="Test your Fingrrs!",
long_description=README,
long_description_content_type="text/markdown",
Expand Down
File renamed without changes.
File renamed without changes.
Binary file added graphics/icon-windows.ico
Binary file not shown.
Binary file added graphics/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7d401ba

Please sign in to comment.