Import LinuxCNC source tree
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import hal
|
||||
|
||||
class HandlerClass:
|
||||
|
||||
def on_led_change(self,hal_led,data=None):
|
||||
'''
|
||||
the gladevcp.change led had a transition
|
||||
'''
|
||||
if hal_led.hal_pin.get():
|
||||
if self.halcomp["number"] > 0.0:
|
||||
self.change_text.set_label("Insert tool number %d" % (int(self.halcomp["number"])))
|
||||
else:
|
||||
self.change_text.set_label("Remove tool")
|
||||
else:
|
||||
self.change_text.set_label("No change requested")
|
||||
|
||||
def __init__(self, halcomp,builder,useropts):
|
||||
self.halcomp = halcomp
|
||||
self.change_text = builder.get_object("change-text")
|
||||
self.halcomp.newpin("number", hal.HAL_FLOAT, hal.HAL_IN)
|
||||
|
||||
def get_handlers(halcomp,builder,useropts):
|
||||
return [HandlerClass(halcomp,builder,useropts)]
|
||||
@@ -0,0 +1,19 @@
|
||||
# This is a component of LinuxCNC
|
||||
# Copyright 2011, 2012, 2013 Dewey Garrett <dgarrett@panix.com>,
|
||||
# Michael Haberler <git@mah.priv.at>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
from stdglue import *
|
||||
@@ -0,0 +1,20 @@
|
||||
# This is a component of LinuxCNC
|
||||
# Copyright 2011, 2013 Dewey Garrett <dgarrett@panix.com>, Michael
|
||||
# Haberler <git@mah.priv.at>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
import remap
|
||||
|
||||
Reference in New Issue
Block a user