diff --git a/visualiser/graphs/graph10000.dot b/visualiser/graphs/graph10000.dot deleted file mode 100644 index 4601a71..0000000 --- a/visualiser/graphs/graph10000.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=invis,label="",color=invis] - fan_two [shape=circle, style=filled, fillcolor=invis,label="",color=invis] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=invis,label="",color=invis] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=invis] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/graphs/graph10001.dot b/visualiser/graphs/graph10001.dot deleted file mode 100644 index 1f87e09..0000000 --- a/visualiser/graphs/graph10001.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=green,label="",color=green] - fan_two [shape=circle, style=filled, fillcolor=invis,label="",color=invis] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=invis,label="",color=invis] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=invis] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/graphs/graph10002.dot b/visualiser/graphs/graph10002.dot deleted file mode 100644 index 410f6f3..0000000 --- a/visualiser/graphs/graph10002.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=green,label="",color=green] - fan_two [shape=circle, style=filled, fillcolor=blue,label="",color=blue] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=invis,label="",color=invis] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=invis] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/graphs/graph10003.dot b/visualiser/graphs/graph10003.dot deleted file mode 100644 index 10f0864..0000000 --- a/visualiser/graphs/graph10003.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=green,label="",color=green] - fan_two [shape=circle, style=filled, fillcolor=blue,label="",color=blue] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=yellow,label="",color=yellow] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=invis] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/graphs/graph10004.dot b/visualiser/graphs/graph10004.dot deleted file mode 100644 index 5c8d303..0000000 --- a/visualiser/graphs/graph10004.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=green,label="",color=green] - fan_two [shape=circle, style=filled, fillcolor=blue,label="",color=blue] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=yellow,label="",color=yellow] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=green] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/graphs/graph10005.dot b/visualiser/graphs/graph10005.dot deleted file mode 100644 index 10f0864..0000000 --- a/visualiser/graphs/graph10005.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=green,label="",color=green] - fan_two [shape=circle, style=filled, fillcolor=blue,label="",color=blue] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=yellow,label="",color=yellow] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=invis] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/graphs/graph10006.dot b/visualiser/graphs/graph10006.dot deleted file mode 100644 index 48637e3..0000000 --- a/visualiser/graphs/graph10006.dot +++ /dev/null @@ -1,37 +0,0 @@ -graph { - fan_one [shape=circle, style=filled, fillcolor=green,label="",color=green] - fan_two [shape=circle, style=filled, fillcolor=blue,label="",color=blue] - radio_one [shape=invtrapezium,style=filled,fillcolor=invis,label="",color=invis] - lamp_one [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - lamp_two [shape=cylinder,style=filled,fillcolor=invis,label="",color=invis] - printer_one [shape=box,style=filled,fillcolor=yellow,label="",color=yellow] - printer_two [shape=box,style=filled,fillcolor=invis,label="",color=invis] - - fan_one -- fan_two [color=magenta] - fan_one -- radio_one [color=invis] - fan_one -- lamp_one [color=invis] - fan_one -- lamp_two [color=invis] - fan_one -- printer_one [color=invis] - fan_one -- printer_two [color=invis] - - fan_two -- radio_one [color=invis] - fan_two -- lamp_one [color=invis] - fan_two -- lamp_two [color=invis] - fan_two -- printer_one [color=invis] - fan_two -- printer_two [color=invis] - - radio_one -- lamp_one [color=invis] - radio_one -- lamp_two [color=invis] - radio_one -- printer_one [color=invis] - radio_one -- printer_two [color=invis] - - lamp_one -- lamp_two [color=invis] - lamp_one -- printer_one [color=invis] - lamp_one -- printer_two [color=invis] - - lamp_two -- printer_one [color=invis] - lamp_two -- printer_two [color=invis] - - printer_one -- printer_two [color=invis] -# 63 "/root/Applications/listeningdaemon/visualiser/main.dot" -} diff --git a/visualiser/main.dot b/visualiser/main.dot index 68f26fa..071408d 100644 --- a/visualiser/main.dot +++ b/visualiser/main.dot @@ -1,11 +1,13 @@ graph { - fan_one [shape=circle, style=filled, fillcolor=FAN_ONE,label="",color=FAN_ONE] - fan_two [shape=circle, style=filled, fillcolor=FAN_TWO,label="",color=FAN_TWO] - radio_one [shape=invtrapezium,style=filled,fillcolor=RADIO_ONE,label="",color=RADIO_ONE] - lamp_one [shape=cylinder,style=filled,fillcolor=LAMP_ONE,label="",color=LAMP_ONE] - lamp_two [shape=cylinder,style=filled,fillcolor=LAMP_TWO,label="",color=LAMP_TWO] - printer_one [shape=box,style=filled,fillcolor=PRINTER_ONE,label="",color=PRINTER_ONE] - printer_two [shape=box,style=filled,fillcolor=PRINTER_TWO,label="",color=PRINTER_TWO] + bgcolor="linen" + + fan_one [shape=circle, style=filled, fillcolor=FAN_ONE,label="",color=FAN_ONE_GESTURE] + fan_two [shape=circle, style=filled, fillcolor=FAN_TWO,label="",color=FAN_TWO_GESTURE] + radio_one [shape=invtrapezium,style=filled,fillcolor=RADIO_ONE,label="",color=RADIO_ONE_GESTURE] + lamp_one [shape=cylinder,style=filled,fillcolor=LAMP_ONE,label="",color=LAMP_ONE_GESTURE] + lamp_two [shape=cylinder,style=filled,fillcolor=LAMP_TWO,label="",color=LAMP_TWO_GESTURE] + printer_one [shape=box,style=filled,fillcolor=PRINTER_ONE,label="",color=PRINTER_ONE_GESTURE] + printer_two [shape=box,style=filled,fillcolor=PRINTER_TWO,label="",color=PRINTER_TWO_GESTURE] fan_one -- fan_two [color=FAN_ONE_FAN_TWO] fan_one -- radio_one [color=FAN_ONE_RADIO_ONE] diff --git a/visualiser/svgs/graph10000.svg b/visualiser/svgs/graph10000.svg deleted file mode 100644 index c71ec02..0000000 --- a/visualiser/svgs/graph10000.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/svgs/graph10001.svg b/visualiser/svgs/graph10001.svg deleted file mode 100644 index 2296d0c..0000000 --- a/visualiser/svgs/graph10001.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/svgs/graph10002.svg b/visualiser/svgs/graph10002.svg deleted file mode 100644 index 4399575..0000000 --- a/visualiser/svgs/graph10002.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/svgs/graph10003.svg b/visualiser/svgs/graph10003.svg deleted file mode 100644 index edbf59c..0000000 --- a/visualiser/svgs/graph10003.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/svgs/graph10004.svg b/visualiser/svgs/graph10004.svg deleted file mode 100644 index e922a2b..0000000 --- a/visualiser/svgs/graph10004.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/svgs/graph10005.svg b/visualiser/svgs/graph10005.svg deleted file mode 100644 index edbf59c..0000000 --- a/visualiser/svgs/graph10005.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/svgs/graph10006.svg b/visualiser/svgs/graph10006.svg deleted file mode 100644 index 6eb50db..0000000 --- a/visualiser/svgs/graph10006.svg +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - -fan_one - - - - -fan_two - - - - -fan_one--fan_two - - - - -radio_one - - - - -fan_one--radio_one - - - - -lamp_one - - - - - -fan_one--lamp_one - - - - -lamp_two - - - - - -fan_one--lamp_two - - - - -printer_one - - - - -fan_one--printer_one - - - - -printer_two - - - - -fan_one--printer_two - - - - -fan_two--radio_one - - - - -fan_two--lamp_one - - - - -fan_two--lamp_two - - - - -fan_two--printer_one - - - - -fan_two--printer_two - - - - -radio_one--lamp_one - - - - -radio_one--lamp_two - - - - -radio_one--printer_one - - - - -radio_one--printer_two - - - - -lamp_one--lamp_two - - - - -lamp_one--printer_one - - - - -lamp_one--printer_two - - - - -lamp_two--printer_one - - - - -lamp_two--printer_two - - - - -printer_one--printer_two - - - - diff --git a/visualiser/visualiser.el b/visualiser/visualiser.el index 4602367..ea7ba1a 100644 --- a/visualiser/visualiser.el +++ b/visualiser/visualiser.el @@ -19,7 +19,8 @@ ;; colors ;; (defconst on-color "black" "The default color for objects which are active") (defconst off-color "invis" "The default color for objects which are not active") -(defvar colors '("black" "red" "green" "blue" "magenta" "yellow" "orange" "purple" "cyan") +(defvar gesture-color "black" "color to outline objects involved in a gesture") +(defvar colors '("red" "green" "blue" "magenta" "yellow" "orange" "purple" "cyan") "colors for the nodes and edges to choose from") @@ -33,6 +34,15 @@ (defvar printer-one-color off-color) (defvar printer-two-color off-color) +(defvar fan-one-gesture-color fan-one-color) +(defvar fan-two-gesture-color fan-two-color) +(defvar radio-one-gesture-color radio-one-color) +(defvar lamp-one-gesture-color lamp-one-color) +(defvar lamp-two-gesture-color lamp-two-color) +(defvar printer-one-gesture-color printer-one-color) +(defvar printer-two-gesture-color printer-two-color) + + ;;; edges ;; default colors (defvar fan-one-fan-two-color off-color) @@ -160,6 +170,16 @@ and ultimately turn into a .gif" "-DLAMP_TWO=" lamp-two-color " " "-DPRINTER_ONE=" printer-one-color " " "-DPRINTER_TWO=" printer-two-color " " + + "-DFAN_ONE_GESTURE=" fan-one-gesture-color " " + "-DFAN_TWO_GESTURE=" fan-two-gesture-color " " + "-DRADIO_ONE_GESTURE=" radio-one-gesture-color " " + "-DLAMP_ONE_GESTURE=" lamp-one-gesture-color " " + "-DLAMP_TWO_GESTURE=" lamp-two-gesture-color " " + "-DPRINTER_ONE_GESTURE=" printer-one-gesture-color " " + "-DPRINTER_TWO_GESTURE=" printer-two-gesture-color " " + + "-DFAN_ONE_FAN_TWO=" fan-one-fan-two-color " " "-DFAN_ONE_RADIO_ONE=" fan-one-radio-one-color " " "-DFAN_ONE_LAMP_ONE=" fan-one-lamp-one-color " " @@ -214,6 +234,21 @@ and ultimately turn into a .gif" (set (intern (concat from-object "-" to-object "-color")) off-color) (set (intern (concat to-object "-" from-object "-color")) off-color)) (format-graph)))) + +;; (illuminate-gesture '("main" "gesture" "printer" "one") "0") +;; (illuminate-gesture '("main" "gesture" "printer" "one") "x") +(defun illuminate-gesture (topic payload) + "Function to illuminate the outlines of nodes on the graph" + nil + nil + (setq on-color (elt colors (random (length colors)))) + (let ((payload (string-limit payload 1))) + (let ((gesture-object (string-join (list (elt topic 2) (elt topic 3)) "-"))) + (message "Gesturing towards: %s" gesture-object) + (if (string-equal payload "0") + (set (intern (concat gesture-object "-gesture-color")) off-color) + (set (intern (concat gesture-object "-gesture-color")) gesture-color)) + (format-graph)))) (defun illuminate-nodes (topic payload) "Function to illuminate the nodes on the graph, a decision tree" @@ -276,12 +311,11 @@ and ultimately turn into a .gif" ;; (message "Topic: %s. Payload %s" topic payload) (cond ((member "transform" topic) (illuminate-edges topic (car payload))) + ((and (member "main" topic) (member "gesture" topic)) + (illuminate-gesture topic (car payload))) ((member "main" topic) (illuminate-nodes topic (car payload))) - ;; ((member "gesture" topic) - ;; (display-gesture)) )))))) (format-graph) -;; (start-process-shell-command "browser" nil (concat "firefox " working-directory "main.html --kiosk")) (mqtt-start-consumer)