Ejemplo n.º 1
0
 def __init__(self):
   super(ActionController, self).__init__()
   GZ.clock_ena(GZ.GZ_CLK_5MHz, 180)
   self.spi = spidev.SpiDev()
   self.spi.open(0,1)
   self.lastTime = int(round(time.time() * 1000))
   self.actionList = []
   self.active = True
   self.gate = threading.Condition()
Ejemplo n.º 2
0
#
#  gz_test.py
#  
#  Copyright 2013  guzunty
#  
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#  
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#  
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.
#  
# You need to have built and installed the GZ Guzunty Python extension
# module in gzlib using: "sudo python setup.py install"
#  

import GZ

GZ.clock_ena(GZ.GZ_CLK_5MHz, 0x7f) # Turn on a slow clock
raw_input("Press any key to stop test.")
GZ.clock_dis()