add decoder for test mode

This commit is contained in:
Schrolli91 2021-01-09 09:24:10 +01:00
parent f3f188f93b
commit ef01fe51e8
No known key found for this signature in database
GPG key ID: 0AE96912A20E9F5F

View file

@ -51,6 +51,7 @@ from boswatch.utils import misc
from boswatch.inputSource.sdrInput import SdrInput from boswatch.inputSource.sdrInput import SdrInput
from boswatch.inputSource.lineInInput import LineInInput from boswatch.inputSource.lineInInput import LineInInput
from boswatch.inputSource.pulseaudioInput import PulseAudioInput from boswatch.inputSource.pulseaudioInput import PulseAudioInput
from boswatch.decoder.decoder import Decoder # for test mode
header.logoToLog() header.logoToLog()
header.infoToLog() header.infoToLog()
@ -105,7 +106,8 @@ try:
for testData in testFile: for testData in testFile:
if (len(testData.rstrip(' \t\n\r')) > 1) and ("#" not in testData[0]): if (len(testData.rstrip(' \t\n\r')) > 1) and ("#" not in testData[0]):
logging.info("Testdata: %s", testData.rstrip(' \t\n\r')) logging.info("Testdata: %s", testData.rstrip(' \t\n\r'))
inputQueue.put_nowait((testData.rstrip(' \t\n\r'), time.time())) bwPacket = Decoder.decode(testData.rstrip(' \t\n\r'))
inputQueue.put_nowait((bwPacket, time.time()))
logging.debug("finished reading testdata") logging.debug("finished reading testdata")
bwClient = TCPClient() bwClient = TCPClient()