summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-02-13 17:14:24 +0000
committerComment <tim@gray.(none)>2013-02-13 17:14:24 +0000
commit3029adceb50e829c8f13d4c7b58da99f02078537 (patch)
treec359dc146e51356514973f54f953a8c5a0a70f15
parent913772a17b565986c9c2697f3f09da28f34cd149 (diff)
button coloursHEADmaster
-rwxr-xr-xdome_control.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/dome_control.py b/dome_control.py
index e1277b4..f2e286d 100755
--- a/dome_control.py
+++ b/dome_control.py
@@ -10,7 +10,7 @@ from socket import *
from pyfirmata import Arduino, util
-labels=["guide\nfocus\nin","guide\nfocus\nout","\n4","\n5","\n6","\n7","\nheat","\ndeHum","\nlight","flat\nfield","\n12","\n13"];
+labels=["guide\nfocus\nin","guide\nfocus\nout","\n4","\n5","\n6","\n7","\nheat","camera\n&\nteleskop","\nlight","flat\nfield","\n12","\n13"];
arduino=Arduino("/dev/ttyUSB0")
@@ -21,6 +21,11 @@ class arduinobtn(gtk.ToggleButton):
self.set_size_request(60,60)
self.connect("clicked", self.toggle, "click")
self.time=0
+ map = self.get_colormap()
+ color = map.alloc_color("red")
+ style = self.get_style().copy()
+ style.bg[gtk.STATE_ACTIVE] = color
+ self.set_style(style)
def toggle(self,widget,data):
arduino.digital[self.num].write(self.get_active())
if self.time>0.0 and self.get_active():