<commit_before>import sys, time, logging, getch
from cops_and_robots.Cop import Cop

logger = logging.getLogger('moveTest')
logger.addHandler(logging.StreamHandler()) #output to console
logging.basicConfig(level=logging.DEBUG)

cop = Cop('Deckard')
OPCODE = cop.OPCODE
ser = cop.ser

ser.write(chr(OPCODE['start']) + chr(OPCODE['full']))

step = 100
cop.speed = 0
cop.radius = cop.MAX_RADIUS
x = 'a'

keymap = {  '.' : cop.faster,
			',' : cop.slower,
			'w' : cop.forward,
			's' : cop.backward,
			'a' : cop.left,
			'd' : cop.right,
			' ' : cop.stop }

tstep = 0.5

while x != 'z':
	x = getch.getch()
	keymap[x]( () if x ~= ('.' | ',') else (step))
	logging.info('char: %s',x)
	logging.info('speed: %d mm/s',cop.speed)
	logging.info('radius: %d mm/s',cop.radius)

	cmd = cop.move()
	ser.write(cmd)
	time.sleep(tstep)

ser.close()
<commit_msg>Fixed non-step function input<commit_after>import sys, time, logging, getch
from cops_and_robots.Cop import Cop

logger = logging.getLogger('moveTest')
logger.addHandler(logging.StreamHandler()) #output to console
logging.basicConfig(level=logging.DEBUG)

cop = Cop('Deckard')
OPCODE = cop.OPCODE
ser = cop.ser

ser.write(chr(OPCODE['start']) + chr(OPCODE['full']))

step = 100
cop.speed = 0
cop.radius = cop.MAX_RADIUS
x = 'a'

keymap = {  '.' : cop.faster,
			',' : cop.slower,
			'w' : cop.forward,
			's' : cop.backward,
			'a' : cop.left,
			'd' : cop.right,
			' ' : cop.stop }

tstep = 0.5

while x != 'z':
	x = getch.getch()
	keymap[x]( () if x != ('.' | ',') else (step))
	logging.info('char: %s',x)
	logging.info('speed: %d mm/s',cop.speed)
	logging.info('radius: %d mm/s',cop.radius)

	cmd = cop.move()
	ser.write(cmd)
	time.sleep(tstep)

ser.close()

{'fraction_non_alphanumeric': 0.19847775175644028, 'fraction_numerical': 0.00702576112412178, 'mean_word_length': 3.92507204610951, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3382811', 'n_tokens_mistral': 734, 'n_tokens_neox': 690, 'n_words': 141}