<commit_before>import sys
from multiprocessing import Process, Queue, Manager
import comm.serial_interface

do_test_move = False
do_test_arm = True

def testPoly(sc, numSides=4, sideLength=1000, dir=1):
  turnAngle = dir * 360 / numSides
  
  for i in range(numSides):
    print "testPoly(): Command : botMove({0})".format(sideLength)
    response = sc.botMove(sideLength)
    print "testPoly(): Response: {0}".format(response)
    
    print "testPoly(): Command : botTurnRel({0})".format(turnAngle)
    response = sc.botTurnRel(turnAngle)
    print "testPoly(): Response: {0}".format(response)


def testArm(sc, arm):
  print "testArm(): Command : armDown({0})".format(arm)
  response = sc.armDown(arm)
  print "testArm(): Response: {0}".format(response)
  
  print "testArm(): Command : gripperOpen({0})".format(arm)
  response = sc.gripperOpen(arm)
  print "testArm(): Response: {0}".format(response)
  
  print "testArm(): Command : gripperClose({0})".format(arm)
  response = sc.gripperClose(arm)
  print "testArm(): Response: {0}".format(response)<commit_msg>Fixed comm test bug, now angles are correctly sent in 10ths of a degree.<commit_after>import sys
from multiprocessing import Process, Queue, Manager
import comm.serial_interface

do_test_move = False
do_test_arm = True

def testPoly(sc, numSides=4, sideLength=1000, dir=1):
  turnAngle = 10 * dir * 360 / numSides  # angle must be sent in 10ths of a degree
  
  for i in range(numSides):
    print "testPoly(): Command : botMove({0})".format(sideLength)
    response = sc.botMove(sideLength)
    print "testPoly(): Response: {0}".format(response)
    
    print "testPoly(): Command : botTurnRel({0})".format(turnAngle)
    response = sc.botTurnRel(turnAngle)
    print "testPoly(): Response: {0}".format(response)


def testArm(sc, arm):
  print "testArm(): Command : armDown({0})".format(arm)
  response = sc.armDown(arm)
  print "testArm(): Response: {0}".format(response)
  
  print "testArm(): Command : gripperOpen({0})".format(arm)
  response = sc.gripperOpen(arm)
  print "testArm(): Response: {0}".format(response)
  
  print "testArm(): Command : gripperClose({0})".format(arm)
  response = sc.gripperClose(arm)
  print "testArm(): Response: {0}".format(response)
{'fraction_non_alphanumeric': 0.15096025011165698, 'fraction_numerical': 0.01965163019205002, 'mean_word_length': 4.925925925925926, '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': '1407445', 'n_tokens_mistral': 768, 'n_tokens_neox': 744, 'n_words': 182}