diff --git a/freedata-nsis-config.nsi b/freedata-nsis-config.nsi index ced5ad91..7dfc39de 100644 --- a/freedata-nsis-config.nsi +++ b/freedata-nsis-config.nsi @@ -53,7 +53,7 @@ Section "FreeData Server" SEC01 doneBackup: ; Add your application files here - File /r "modem\server.dist\*" + File /r "freedata-server\server.dist\*" ; Restore the original "config.ini" if it was backed up IfFileExists $INSTDIR\freedata-server\config.ini.bak restoreConfig @@ -93,7 +93,7 @@ Section "FreeData x64 GUI" SEC02 SetOutPath $INSTDIR\freedata-gui ; Add GUI files here - File /r "gui\release\win-unpacked\*" + File /r "freedata-gui\release\win-unpacked\*" ; Create a shortcut on the desktop for the GUI CreateShortCut "$DESKTOP\FreeDATA GUI.lnk" "$INSTDIR\freedata-gui\freedata.exe" diff --git a/freedata-server/codec2.py b/freedata-server/codec2.py index 4c732e6d..29c12b52 100644 --- a/freedata-server/codec2.py +++ b/freedata-server/codec2.py @@ -101,7 +101,6 @@ else: files = [] api = None -print(files) for file in files: try: api = ctypes.CDLL(file) diff --git a/freedata-server/frame_handler.py b/freedata-server/frame_handler.py index 0bbe6bd8..90b6f9e5 100644 --- a/freedata-server/frame_handler.py +++ b/freedata-server/frame_handler.py @@ -101,8 +101,9 @@ class FrameHandler(): if "session_id" in frame: activity["session_id"] = frame["session_id"] - if "AWAY_FROM_KEY" in frame["flag"]: - activity["away_from_key"] = frame["flag"]["AWAY_FROM_KEY"] + if "flag" in frame: + if "AWAY_FROM_KEY" in frame["flag"]: + activity["away_from_key"] = frame["flag"]["AWAY_FROM_KEY"] self.states.add_activity(activity) @@ -121,6 +122,11 @@ class FrameHandler(): distance_km = distance_dict['kilometers'] distance_miles = distance_dict['miles'] + away_from_key = False + if "flag" in self.details['frame']: + if "AWAY_FROM_KEY" in self.details['frame']["flag"]: + away_from_key = self.details['frame']["flag"]["AWAY_FROM_KEY"] + helpers.add_to_heard_stations( frame['origin'], dxgrid, @@ -131,7 +137,7 @@ class FrameHandler(): self.states.heard_stations, distance_km=distance_km, # Pass the kilometer distance distance_miles=distance_miles, # Pass the miles distance - away_from_key=self.details['frame']["flag"]["AWAY_FROM_KEY"] + away_from_key=away_from_key ) def make_event(self): diff --git a/tools/run-tests.sh b/tools/run-tests.sh index b24bdbd9..2d99e0fb 100755 --- a/tools/run-tests.sh +++ b/tools/run-tests.sh @@ -1,3 +1,3 @@ -npm test --prefix gui +npm test --prefix freedata-gui python -m unittest discover tests