<commit_before>import lcm
import time
import RPi.GPIO as GPIO
from lilylcm import L15Anchor
from lilylcm import L06Depth

#Setup
lc = lcm.LCM()
servoChannel = 17
GPIO.setmode(GPIO.BOARD)
GPIO.setup(servoChannel,GPIO.OUT)
pwm = GPIO.GPIO.PWM(servoChannel,60) #Serov only need 60 Hz
pwm.start(0) #Default Position


#Take in Servo Value from LCM and drive the Servo
def servo_handler(channel, data): #Taking Servo Value 
    msg = L15Anchor.decode(data)
    pwm.ChangeDutyCycle(msg.value*100/255.0)

#Read in Depth Sensor and publish depth to LCM
def depth_publish():
    ##TODO readIn
    msg = L06Depth()
    lc.publish("POD_Depth",L06Depth.encode(msg))


subscription = lc.subscribe("POD_Anchor",servo_handler)
print 'Depth Module Started'

while True:
    try:
        lc.handle()
        depth_publish()
    except KeyboardInterrupt:
        break


#Tear Down
print 'Depth Module Exited.'
lc.unsubscribe(subscription)<commit_msg>changes in anchor data<commit_after>import lcm
import time
import RPi.GPIO as GPIO
from lilylcm import L15Anchor
from lilylcm import L06Depth

#Setup
lc = lcm.LCM()
servoChannel = 25
GPIO.setmode(GPIO.BCM)
GPIO.setup(servoChannel,GPIO.OUT)
pwm = GPIO.PWM(servoChannel,60) #Serov only need 60 Hz
pwm.start(0) #Default Position


#Take in Servo Value from LCM and drive the Servo
def servo_handler(channel, data): #Taking Servo Value 
    msg = L15Anchor.decode(data)
    pwm.ChangeDutyCycle(msg.value*100/255.0)

#Read in Depth Sensor and publish depth to LCM
def depth_publish():
    ##TODO readIn
    msg = L06Depth()
    lc.publish("POD_Depth",L06Depth.encode(msg))
    print L06Depth.encode(msg)


subscription = lc.subscribe("POD_Anchor",servo_handler)
print 'Depth Module Started'

while True:
    try:
        #lc.handle()
        depth_publish()
	lc.handle()
    except KeyboardInterrupt:
        break


#Tear Down
print 'Depth Module Exited.'
lc.unsubscribe(subscription)
{'fraction_non_alphanumeric': 0.09618400418191322, 'fraction_numerical': 0.026136957658128592, 'mean_word_length': 4.243835616438356, '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': '6475115', 'n_tokens_mistral': 706, 'n_tokens_neox': 662, 'n_words': 183}