<commit_before>#!/usr/bin/python
# Copyright [2015], [<NAME>]
# Distributed under the terms of the BSD 3-Clause License
#
#
# ROV_SRS_Main
#
#
# Overview:	The main runtime script to handle SRS Control.
#
# Authors:	<NAME> (2015)
#

import ROV_SRS_Library as ROV

def main():
	"""Translates RC Controller Input to appropriate actuator signals.
	
	This function utilizes a set of initial variable values to setup
	desired functionality parameters (e.g. actuator stroke length), then
	enters a polling loop to continually check the state of the input
	signals. Upon proper conditions being met, changes in these inputs
	cause the program to enter and iterate through one of three state
	machines (one for each of the actuators on board the SRS).
	
	Args:
		N/A
	
	Returns:
		N/A
	"""
<commit_msg>Add "ROV_SRS_Main.py"<commit_after>#!/usr/bin/python
# Copyright [2015], [<NAME>]
# Distributed under the terms of the BSD 3-Clause License
#
#
# ROV_SRS_Main
#
#
# Overview:	The main runtime script to handle SRS Control.
#
# Authors:	<NAME> (2015)
#

import ROV_SRS_Library as ROV
import Adafruit_BBIO.GPIO as GPIO
import Adafruit_BBIO.PWM as PWM

# Define Module-level Constants.
#
# Refer to the "Adafruit_BBIO" documentation regarding acceptable naming
# formats for Pins.

# General Program Constants.
PULSE_NUM_AVG = 5			# Number of Pulses to average before state transitions.
PULSE_WID_HI = 0.002		# Input Pulse Width (70 Hz, 14% Duty Cycle) [msec].
PULSE_WID_LO = 0.001		# Input Pulse Width (70 Hz, 7% Duty Cycle) [msec].
PULSE_WID_TOL = 0.00025		# Tolerance on Pulse Width Deviations [msec].
PULSE_WID_LIM = 0.014		# Upper Limit on Pulse Widths (70 Hz, 1 Period) [msec].

# Linear Actuator related Constants.
LIN_IN1 = "P8_12"		# Pin for Input PWM from RC Controller.
LIN_ENA = "P9_16"		# Pin for Output High Enable Signal.
LIN_OUT1 = "P9_14"		# Pin for Output High/Low to Driver CH1.
LIN_OUT2 = "P9_12"		# Pin for Output High/Low to Driver CH2.

def main():
	"""Translates RC Controller Input to appropriate actuator signals.
	
	This function utilizes a set of initial variable values to setup
	desired functionality parameters (e.g. actuator stroke length), then
	enters a polling loop to continually check the state of the input
	signals. Upon proper conditions being met, changes in these inputs
	cause the program to enter and iterate through one of three state
	machines (one for each of the actuators on board the SRS).
	
	Args:
		N/A
	
	Returns:
		N/A
	"""
	
	# Define Constant parameters.
{'fraction_non_alphanumeric': 0.0784313725490196, 'fraction_numerical': 0.025610244097639057, 'mean_word_length': 4.070993914807302, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5062299', 'n_tokens_mistral': 914, 'n_tokens_neox': 807, 'n_words': 336}