Skip to content

Commit

Permalink
Merge pull request #56 from ArtificialQualia/dev
Browse files Browse the repository at this point in the history
fixes for v2.5.1
  • Loading branch information
ArtificialQualia committed Oct 19, 2019
2 parents 2826021 + 53dae26 commit 0346f79
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion InstallerSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{

[Files]
Source: "dist\PELD\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "README.md"; DestDir: "{app}"; Flags: isreadme
Source: "LICENSE"; DestDir: "{app}"

[Icons]
Expand Down
9 changes: 5 additions & 4 deletions PyEveLiveDPS/animate.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def updateFleetWindow(self, fleetWindow):
toDelete = []
for pilot, entries in pilots.items():
average = (np.sum(entries["historical"])*(1000/self.interval))/self.arrayLength
if category != 'aggregate' and max(entries["yValues"]) == 0 and average == 0 and pilot != 'you':
if category != 'aggregate' and max(entries["yValues"]) == 0 and average == 0 and pilot != fleetWindow.characterName:
toDelete.append(pilot)
entries["yValues"] = entries["yValues"][1:]
entries["yValues"] = np.append(entries["yValues"], average)
Expand Down Expand Up @@ -254,6 +254,7 @@ def changeSettings(self):
self.graph.graphFigure.canvas.draw()

# reset fleet data
characterName = self.mainWindow.fleetWindow.characterName
if self.dataQueue:
self.fleetData = {
'aggregate': {
Expand All @@ -271,19 +272,19 @@ def changeSettings(self):
}
},
'dpsOut': {
'you': {
characterName: {
'historical': historicalTemplate.copy(),
'yValues': yValuesTemplate.copy()
}
},
'dpsIn': {
'you': {
characterName: {
'historical': historicalTemplate.copy(),
'yValues': yValuesTemplate.copy()
}
},
'logiOut': {
'you': {
characterName: {
'historical': historicalTemplate.copy(),
'yValues': yValuesTemplate.copy()
}
Expand Down
10 changes: 4 additions & 6 deletions PyEveLiveDPS/fleetWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self, mainWindow):
tk.Toplevel.__init__(self)
self.baseWindow = BaseWindow(self)
self.mainWindow = mainWindow
self.characterName = None
self.characterName = ''
self.minsize(200,150)

self.mainFrame = tk.Frame(self, background="black")
Expand Down Expand Up @@ -301,8 +301,6 @@ def processRecieveQueue(self, recieveQueue, fleetData, arrayLength):
entryType = fleetEntry['category']
amount = fleetEntry['entry']['amount']
pilot = fleetEntry['entry']['owner']
if pilot == self.characterName:
pilot = 'you'
#enemy = fleetEntry['entry']['pilotName']
fleetData['aggregate'][entryType]['historical'][-1] += amount
if pilot not in fleetData[entryType]:
Expand All @@ -329,7 +327,7 @@ def displayFleetData(self, fleetData):
line = lines[rank]
color = self.calculateColor(categoryColor, rank)

if pilot == 'you':
if pilot == self.characterName:
# remove special 'you' line
youTopThree = True
graph.basicLine(yValues, categoryColor, lines[3], '')
Expand All @@ -339,9 +337,9 @@ def displayFleetData(self, fleetData):
if highest > highestAverage:
highestAverage = highest
if not youTopThree:
yValues = fleetData[category]['you']['yValues']
yValues = fleetData[category][self.characterName]['yValues']
graph.basicLine(yValues, categoryColor+'70', lines[3], ':')
tops.append('you')
tops.append(self.characterName)
graph.subplot.legend(lines, tops, loc='upper left', fontsize='x-small', framealpha=0.5).set_zorder(100)
graph.readjust(highestAverage)
topValue = fleetData[category][tops[0]]['yValues'][-1]
Expand Down
2 changes: 2 additions & 0 deletions PyEveLiveDPS/socketManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def on_connect(self):
logger.info('Connected websocket to ' + _sockMgr.server)

def on_disconnect(self):
_sockMgr.socket.disconnect()
logger.info('Websocket disconnected from ' + _sockMgr.server)

def on_client_registered(self, *args):
Expand All @@ -77,6 +78,7 @@ def on_peld_error(self, data):
webbrowser.open(self.server + self.loginArgs)
while self.running:
try:
self.registered = False
self.socket = socketio.Client(ssl_verify=False)
self.socket.register_namespace(Namespace('/client'))
self.socket.connect(self.server, namespaces=['/client'])
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ watchdog==0.8.3
git+git://github.com/miguelgrinberg/python-engineio@51da0be#egg=python-engineio
python-socketio==4.3.1
requests==2.21.0
websocket-client==0.56.0

0 comments on commit 0346f79

Please sign in to comment.