Compare commits
No commits in common. "ecac90373c79c56836323b570e76e22861572983" and "a26852bf14c6b56e6241510f559d1b3ee9f81cfe" have entirely different histories.
ecac90373c
...
a26852bf14
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,8 +2,6 @@
|
|||||||
*.py[oc]
|
*.py[oc]
|
||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
_buildid.py
|
|
||||||
|
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Luftdaten.info Flashing Tool (v{version})</string>
|
<string>Luftdaten.info Flashing Tool</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@ -279,19 +279,6 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>12</number>
|
<number>12</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="buildLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><b>Luftdaten.info Flashing Tool</b><br/>Build {build_id}</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -311,6 +298,19 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Luftdaten.info Flashing Tool</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -11,7 +11,6 @@ import logging
|
|||||||
import requests
|
import requests
|
||||||
from esptool import ESPLoader
|
from esptool import ESPLoader
|
||||||
|
|
||||||
import luftdatentool
|
|
||||||
from luftdatentool.qtvariant import QtGui, QtCore, QtWidgets
|
from luftdatentool.qtvariant import QtGui, QtCore, QtWidgets
|
||||||
from luftdatentool.utils import QuickThread
|
from luftdatentool.utils import QuickThread
|
||||||
from luftdatentool.workers import PortDetectThread, FirmwareListThread, \
|
from luftdatentool.workers import PortDetectThread, FirmwareListThread, \
|
||||||
@ -88,21 +87,6 @@ class MainWindow(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
|
|||||||
def on_work_error(self, message):
|
def on_work_error(self, message):
|
||||||
self.statusbar.showMessage(message)
|
self.statusbar.showMessage(message)
|
||||||
|
|
||||||
@property
|
|
||||||
def version(self):
|
|
||||||
return luftdatentool.__version__
|
|
||||||
|
|
||||||
@property
|
|
||||||
def build_id(self):
|
|
||||||
try:
|
|
||||||
from luftdatentool._buildid import commit, builddate
|
|
||||||
except ImportError:
|
|
||||||
import datetime
|
|
||||||
commit = 'devel'
|
|
||||||
builddate = datetime.datetime.now().strftime('%Y%m%d')
|
|
||||||
|
|
||||||
return '{}-{}/{}'.format(self.version, commit, builddate)
|
|
||||||
|
|
||||||
def i18n_init(self, locale):
|
def i18n_init(self, locale):
|
||||||
"""Initializes i18n to specified QLocale"""
|
"""Initializes i18n to specified QLocale"""
|
||||||
|
|
||||||
@ -113,13 +97,6 @@ class MainWindow(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
|
|||||||
self.app.installTranslator(self.translator)
|
self.app.installTranslator(self.translator)
|
||||||
self.retranslateUi(self)
|
self.retranslateUi(self)
|
||||||
|
|
||||||
def retranslateUi(self, win):
|
|
||||||
super(MainWindow, self).retranslateUi(win)
|
|
||||||
|
|
||||||
win.setWindowTitle(win.windowTitle().format(
|
|
||||||
version=self.version))
|
|
||||||
win.buildLabel.setText(win.buildLabel.text().format(
|
|
||||||
build_id=self.build_id))
|
|
||||||
def populate_versions(self, files):
|
def populate_versions(self, files):
|
||||||
"""Loads available firmware versions into versionbox widget"""
|
"""Loads available firmware versions into versionbox widget"""
|
||||||
|
|
||||||
|
@ -2,16 +2,6 @@
|
|||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
import subprocess
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
commit = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode('utf-8')
|
|
||||||
builddate = datetime.datetime.now().strftime('%Y%m%d')
|
|
||||||
|
|
||||||
with open('luftdatentool/_buildid.py', 'w') as fd:
|
|
||||||
fd.write('''# This file is autogenerated in luftdaten-tool.spec file
|
|
||||||
commit = "{commit}"
|
|
||||||
builddate = "{builddate}"'''.format(commit=commit, builddate=builddate))
|
|
||||||
|
|
||||||
a = Analysis(['luftdaten-tool.py'],
|
a = Analysis(['luftdaten-tool.py'],
|
||||||
pathex=['.'],
|
pathex=['.'],
|
||||||
|
@ -1 +0,0 @@
|
|||||||
__version__ = '0.2'
|
|
@ -17,11 +17,11 @@ class PortDetectThread(QuickThread):
|
|||||||
def target(self):
|
def target(self):
|
||||||
"""Checks list of available ports and emits signal when necessary"""
|
"""Checks list of available ports and emits signal when necessary"""
|
||||||
|
|
||||||
ports = None
|
ports = []
|
||||||
while True:
|
while True:
|
||||||
new_ports = serial.tools.list_ports.comports()
|
new_ports = serial.tools.list_ports.comports()
|
||||||
|
|
||||||
if ports is None or [p.name for p in ports] != [p.name for p in new_ports]:
|
if [p.name for p in ports] != [p.name for p in new_ports]:
|
||||||
self.portsUpdate.emit(new_ports)
|
self.portsUpdate.emit(new_ports)
|
||||||
|
|
||||||
time.sleep(self.interval)
|
time.sleep(self.interval)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user