From 98bb38c0ce75f77477c180aea4ded92b70c149db Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Fri, 1 Nov 2013 07:59:48 -0500 Subject: [PATCH] Integer Radio ID Incoding Radio ID may now be encoded as a decimal integer in the .cfg file -- previously it had to be in hex. --- dmrlink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmrlink.py b/dmrlink.py index c045189..06b675e 100644 --- a/dmrlink.py +++ b/dmrlink.py @@ -136,7 +136,7 @@ for section in config.sections(): 'TS1_LINK': config.getboolean(section, 'TS1_LINK'), 'TS2_LINK': config.getboolean(section, 'TS2_LINK'), 'AUTH_ENABLED': config.getboolean(section, 'AUTH_ENABLED'), - 'RADIO_ID': (config.get(section, 'RADIO_ID').rjust(8,'0')).decode('hex'), + 'RADIO_ID': hex(int(config.get(section, 'RADIO_ID')))[2:].rjust(8,'0').decode('hex'), 'PORT': config.getint(section, 'PORT'), 'ALIVE_TIMER': config.getint(section, 'ALIVE_TIMER'), 'AUTH_KEY': (config.get(section, 'AUTH_KEY').rjust(40,'0')).decode('hex'),