Skip to content

Commit

Permalink
Remove message handling from the tracklogs module
Browse files Browse the repository at this point in the history
  • Loading branch information
M4rtinK committed Jan 2, 2022
1 parent b88f88a commit c802ad0
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions modules/mod_tracklog.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,48 +91,6 @@ def firstTime(self):
# eq, due to modRana or device crashing
self._rescueLogs()

def handleMessage(self, message, messageType, args):
if message == "startLogging":
self.log.info("starting track logging")
# start a new log
if not self.loggingEnabled:
self.startLogging(self.get('logNameEntry', ""))
# or resume an existing one
elif self.loggingEnabled == True & self.loggingPaused == True:
self.log.info("resuming track logging")
self.loggingPaused = False

elif message == "pauseLogging":
self.pauseLogging()

elif message == "stopLogging":
self.log.info("stopping track logging")
self.stopLogging()

elif message == 'nameInput':
entry = self.m.get('textEntry', None)
if entry is None:
self.log.error("error, text entry module is not loaded")
return
entryText = ""
logNameEntry = self.get('logNameEntry', None)
if logNameEntry:
entryText = logNameEntry
entry.entryBox(self, 'logNameEntry', 'Write tracklog name', entryText)

elif message == 'clearTrace':
self.clearTrace()

elif message == 'setupColorMenu':
m = self.m.get('showTracklogs', None)
if m:
m.setupChooseDistColorMenu('tracklog', '|tracklog:colorFromRegister|set:menu:None')

elif message == 'colorFromRegister':
# set the color from the color register
colorName = self.get('distinctColorRegister', 'blue')
self.traceColor = colorName

def startLogging(self, name="", logType='gpx'):
"""Start a new log file
Expand Down

0 comments on commit c802ad0

Please sign in to comment.