aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fans-help.pd46
-rw-r--r--fans.pd24
-rw-r--r--smc-help.pd4
-rw-r--r--smc.c2
4 files changed, 42 insertions, 34 deletions
diff --git a/fans-help.pd b/fans-help.pd
index aaf2856..c349fcf 100644
--- a/fans-help.pd
+++ b/fans-help.pd
@@ -1,4 +1,4 @@
-#N canvas 735 22 560 421 10;
+#N canvas 469 22 560 421 10;
#X obj 4 -17 cnv 15 550 40 empty \$0-pddp.cnv.header fans 3 12 0 18
-241536 -1 0;
#X obj 3 189 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlet 15 12 0 13
@@ -22,7 +22,6 @@
#X obj 470 6 pddp/pddplink http://wiki.puredata.info/en/apple/fans
-text pdpedia: fans;
#X msg 146 48 bang;
-#X obj 73 73 metro 250;
#X obj 73 54 tgl 15 0 empty empty empty 0 -6 0 10 -204786 -1 -1 0 1
;
#X text 183 46 output sensor values;
@@ -31,30 +30,37 @@
#X obj 146 101 apple/fans;
#X text 15 6 description: query the system fans in Apples;
#X text 94 201 bang - output all data about all fans;
-#X obj 485 -14 apple/fans;
-#X floatatom 146 153 5 0 0 0 - - -;
-#X floatatom 180 153 5 0 0 0 - - -;
-#X floatatom 215 153 5 0 0 0 - - -;
+#X floatatom 146 147 5 0 0 0 - - -;
+#X floatatom 180 147 5 0 0 0 - - -;
+#X floatatom 215 147 5 0 0 0 - - -;
#X obj 173 75 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144 -1
--1 0;
+-1 1;
#X text 302 73 choose a specific fan;
#X text 94 221 float - output all data about a specific fan;
-#X obj 146 131 route F0Ac F0Mn F0Mx F0Sf F0Tg;
-#X floatatom 252 153 5 0 0 0 - - -;
-#X floatatom 287 153 5 0 0 0 - - -;
+#X floatatom 249 147 5 0 0 0 - - -;
+#X floatatom 284 147 5 0 0 0 - - -;
#X obj 72 309 cnv 17 3 20 empty \$0-pddp.cnv.let.1 1 5 9 0 16 -228856
-162280 0;
#X text 103 280 messages with the values of the various data;
#X text 104 306 messages with status information;
#X text 94 241 symbol - output a specific data about a specific fan
;
-#X connect 6 0 11 0;
-#X connect 7 0 11 0;
-#X connect 8 0 7 0;
-#X connect 11 0 21 0;
-#X connect 18 0 11 0;
-#X connect 21 0 15 0;
-#X connect 21 1 16 0;
-#X connect 21 2 17 0;
-#X connect 21 3 22 0;
-#X connect 21 4 23 0;
+#X floatatom 318 147 5 0 0 0 - - -;
+#X obj 146 125 route F0Ac F0Mn F0Mx F0Mt F0Sf F0Tg F0ID;
+#X obj 73 73 metro 2000;
+#X obj 485 -14 apple/fans;
+#X obj 356 147 moocow/string2any;
+#X obj 356 170 pddp/print;
+#X connect 6 0 10 0;
+#X connect 7 0 27 0;
+#X connect 10 0 26 0;
+#X connect 16 0 10 0;
+#X connect 26 0 13 0;
+#X connect 26 1 14 0;
+#X connect 26 2 15 0;
+#X connect 26 3 19 0;
+#X connect 26 4 20 0;
+#X connect 26 5 25 0;
+#X connect 26 6 29 0;
+#X connect 27 0 10 0;
+#X connect 29 0 30 0;
diff --git a/fans.pd b/fans.pd
index a66215b..b4107f9 100644
--- a/fans.pd
+++ b/fans.pd
@@ -1,15 +1,15 @@
-#N canvas 421 265 450 300 10;
+#N canvas 421 265 470 381 10;
#X obj 164 29 inlet;
-#X obj 146 263 outlet;
-#X obj 197 263 outlet;
+#X obj 146 343 outlet;
+#X obj 197 343 outlet;
#X obj 26 112 route FNum;
-#X msg 116 119 F\$1Ac;
-#X msg 157 119 F\$1Mn;
-#X msg 200 119 F\$1Mx;
-#X msg 241 119 F\$1Sf;
-#X msg 283 119 F\$1Tg;
+#X msg 106 119 F\$1Ac;
+#X msg 147 119 F\$1Mn;
+#X msg 230 119 F\$1Mx;
+#X msg 271 119 F\$1Sf;
+#X msg 313 119 F\$1Tg;
#X obj 146 229 apple/smc;
-#X obj 338 120 symbol FNum;
+#X msg 408 119 FNum;
#N canvas 0 22 450 300 gen 0;
#X obj 92 9 inlet;
#X obj 93 270 outlet;
@@ -28,6 +28,8 @@
#X connect 6 1 5 0;
#X restore 26 133 pd gen fnums;
#X obj 164 51 route float bang;
+#X msg 188 119 F\$1Mt;
+#X msg 358 119 F\$1ID;
#X connect 0 0 12 0;
#X connect 3 0 11 0;
#X connect 4 0 9 0;
@@ -45,4 +47,8 @@
#X connect 12 0 6 0;
#X connect 12 0 7 0;
#X connect 12 0 8 0;
+#X connect 12 0 13 0;
+#X connect 12 0 14 0;
#X connect 12 1 10 0;
+#X connect 13 0 9 0;
+#X connect 14 0 9 0;
diff --git a/smc-help.pd b/smc-help.pd
index 045174e..47da881 100644
--- a/smc-help.pd
+++ b/smc-help.pd
@@ -50,8 +50,6 @@ pdpedia: apple/smc;
#X text 102 241 keys - output all available keys in the right outlet
;
#X text 16 34 get data:;
-#X msg 216 70 FNum;
-#X msg 279 73 F2Ac;
#X connect 5 0 9 0;
#X connect 9 0 13 0;
#X connect 9 0 15 0;
@@ -60,5 +58,3 @@ pdpedia: apple/smc;
#X connect 17 0 9 0;
#X connect 18 0 9 0;
#X connect 21 0 9 0;
-#X connect 28 0 9 0;
-#X connect 29 0 9 0;
diff --git a/smc.c b/smc.c
index dde7dd3..fe042d7 100644
--- a/smc.c
+++ b/smc.c
@@ -318,7 +318,7 @@ static void smc_symbol(t_smc* x, t_symbol* key)
UInt32 i;
t_atom output_list[val.dataSize];
for (i = 0; i < val.dataSize; i++)
- SETFLOAT(&output_atom + i, (unsigned char) val.bytes[i]);
+ SETFLOAT(output_list + i, (unsigned char) val.bytes[i]);
outlet_anything(x->data_outlet, gensym(val.key),
val.dataSize, output_list);
}