self.end_of_message = False
def log_symbol(self, distance, symbol, extra_info=""):
- logging.info("distance: %.2f Received \"%s\" %s", distance, symbol,
+ logging.info("distance: %.2f Received \"%s\"%s", distance, symbol,
extra_info)
def receive_character(self):
call_distance <= self.signalspace_time.max:
signal = self.morse_message.strip().split(' ')[-1]
character = self.translator.signal_to_character(signal)
- self.log_symbol(call_distance, ' ', "got \"%s\"" % character)
+ self.log_symbol(call_distance, ' ', " got \"%s\"" % character)
self.morse_message += " "
return
call_distance <= self.wordspace_time.max:
signal = self.morse_message.strip().split(' ')[-1]
character = self.translator.signal_to_character(signal)
- self.log_symbol(call_distance, '/', "got \"%s\"" % character)
+ self.log_symbol(call_distance, '/', " got \"%s\"" % character)
self.morse_message += " / "
return
if call_distance > self.eom_time.min:
signal = self.morse_message.strip().split(' ')[-1]
character = self.translator.signal_to_character(signal)
- self.log_symbol(call_distance, 'EOM', "got \"%s\"" % character)
+ self.log_symbol(call_distance, 'EOM', " got \"%s\"" % character)
self.end_of_message = True
self.previous_ring_time = -1
self.previous_call_time = -1