ソースを参照

modified modes&moves to always have an acceleration

replaced "constant speed" mode with "accelerate the faster you can to
constant speed"
driveMode is always 0 or 2, 1 disabled
Etienne Landon 7 年 前
コミット
fb9dcfeb57
2 ファイル変更73 行追加48 行削除
  1. 1 1
      OSCstepperCtl.pd
  2. 72 47
      kostepper.pd

+ 1 - 1
OSCstepperCtl.pd

@@ -7,7 +7,7 @@
 #X msg 590 173 devices;
 #X obj 112 299 s /fromOSC;
 #X obj 122 49 r /toOSC;
-#X obj 368 52 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 368 52 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
 #X obj 368 72 route 0 1;
 #X msg 368 134 close;

+ 72 - 47
kostepper.pd

@@ -381,17 +381,17 @@ CUE 3 \; /stepper/0/cue/3/move 0.0277778 \; /stepper/0/cue/3/setMaxSpeed
 #X connect 33 0 32 0;
 #X connect 34 0 33 1;
 #X restore 661 97 pd \$0-startposition;
-#N canvas 1 55 1063 712 \$0-modes&moves 0;
-#X obj 40 88 route 0 1;
+#N canvas 289 132 1211 848 \$0-modes&moves 1;
+#X obj 40 108 route 0 1;
 #X obj 40 44 r /stepper/\$1/manualDrive;
-#X obj 51 111 r /stepper/\$1/accMode;
-#X obj 40 65 t f f;
-#X obj 40 152 f;
-#X msg 65 198 2;
-#X obj 40 216 s /stepper/\$1/driveMode;
-#X obj 40 173 spigot;
-#X obj 73 153 == 0;
-#X text 75 16 SET DRIVE MODE;
+#X obj 51 131 r /stepper/\$1/accMode;
+#X obj 40 85 t f f;
+#X obj 40 172 f;
+#X msg 65 218 2;
+#X obj 40 236 s /stepper/\$1/driveMode;
+#X obj 40 193 spigot;
+#X obj 73 173 == 0;
+#X text 73 11 SET DRIVE MODE;
 #X obj 740 263 r /stepper/\$1/driveMode;
 #X obj 740 351 pack s f f;
 #X obj 797 326 f \$1;
@@ -404,7 +404,7 @@ CUE 3 \; /stepper/0/cue/3/move 0.0277778 \; /stepper/0/cue/3/setMaxSpeed
 #X obj 725 199 r /stepper/\$1/driveMode;
 #X obj 725 220 == 2;
 #X msg 642 255 setSpeed \$1;
-#X obj 51 132 == 0;
+#X obj 51 152 == 0;
 #X msg 740 284 driveMode \$1 \, setSpeed 0;
 #X text 696 14 MANUAL SPEED;
 #X obj 711 153 * 1;
@@ -440,31 +440,46 @@ CUE 3 \; /stepper/0/cue/3/move 0.0277778 \; /stepper/0/cue/3/setMaxSpeed
 #X obj 396 65 spigot 1;
 #X obj 396 184 spigot 1;
 #X obj 642 199 steps2camrot;
-#X obj 169 381 / 60;
-#X obj 169 363 r /stepper/\$1/setMaxSpeed;
-#X obj 54 465 list prepend;
-#X obj 134 443 r /stepper/\$1/driveMode;
-#X obj 146 343 r /stepper/\$1/move;
-#X obj 54 339 f \$1;
-#X obj 203 401 / 60;
-#X obj 203 383 r /stepper/\$1/acceleration;
-#X obj 54 443 pack f f f f;
-#X obj 54 484 route 0 1;
-#X obj 54 563 list;
-#X msg 79 538 move \$2 \$1 \, setSpeed \$3 \$1 \, getStatus \$1 \$1
+#X obj 663 492 / 60;
+#X obj 663 474 r /stepper/\$1/setMaxSpeed;
+#X obj 519 646 list prepend;
+#X obj 599 624 r /stepper/\$1/driveMode;
+#X obj 626 454 r /stepper/\$1/move;
+#X obj 519 450 f \$1;
+#X obj 701 512 / 60;
+#X obj 701 494 r /stepper/\$1/acceleration;
+#X obj 519 665 route 0 1;
+#X obj 519 754 list;
+#X obj 519 792 s /toOSC;
+#X msg 519 773 /\$1 \$3 \$2;
+#X obj 519 429 r /stepper/\$1/move/go;
+#X msg 519 685 acceleration \$4 \$1 \, maxSpeed \$3 \$1 \, move \$2
+\$1 \, getStatus \$1 \$1;
+#X obj 632 530 steps2camrot;
+#X text 543 407 MOVE MANAGEMENT;
+#X obj 594 510 steps2camrot;
+#X obj 557 472 steps2camrot;
+#X obj 44 319 r /stepper/\$1/manualDrive;
+#X obj 44 342 route 0 1;
+#X obj 63 378 r /stepper/\$1/accMode;
+#X msg 63 379 0;
+#X obj 44 407 f;
+#X obj 43 466 s /stepper/\$1/driveMode;
+#X msg 84 434 2;
+#X text 66 280 SET DRIVE MODE V2;
+#X text 43 293 Vconst -> accelerate AQAP;
+#X text 95 22 not used;
+#X msg 582 748 move \$2 \$1 \, setSpeed \$3 \$1 \, getStatus \$1 \$1
 ;
-#X obj 54 601 s /toOSC;
-#X msg 54 582 /\$1 \$3 \$2;
-#X obj 54 318 r /stepper/\$1/move/go;
-#X msg 54 504 acceleration \$4 \$1 \, maxSpeed \$3 \$1 \, move \$2
+#X msg 544 715 acceleration \$5 \$1 \, maxSpeed \$3 \$1 \, move \$2
 \$1 \, getStatus \$1 \$1;
-#X obj 134 419 steps2camrot;
-#X text 78 296 MOVE MANAGEMENT;
-#X obj 100 399 steps2camrot;
-#X obj 77 361 steps2camrot;
+#X obj 739 532 / 60;
+#X obj 670 550 steps2camrot;
+#X text 894 512 used if driveMode = 2;
+#X obj 739 514 r /stepper/\$1/accLimit;
+#X obj 519 594 pack 10 5000 1000 1000 1000;
 #X connect 0 0 4 0;
 #X connect 0 1 5 0;
-#X connect 1 0 3 0;
 #X connect 2 0 22 0;
 #X connect 3 0 0 0;
 #X connect 3 1 8 0;
@@ -516,25 +531,35 @@ CUE 3 \; /stepper/0/cue/3/move 0.0277778 \; /stepper/0/cue/3/setMaxSpeed
 #X connect 55 0 51 0;
 #X connect 56 0 47 0;
 #X connect 57 0 18 0;
-#X connect 58 0 76 1;
+#X connect 58 0 74 1;
 #X connect 59 0 58 0;
-#X connect 60 0 67 0;
+#X connect 60 0 66 0;
 #X connect 61 0 60 1;
-#X connect 62 0 77 1;
-#X connect 63 0 66 0;
-#X connect 64 0 74 1;
+#X connect 62 0 75 1;
+#X connect 63 0 92 0;
+#X connect 64 0 72 1;
 #X connect 65 0 64 0;
-#X connect 66 0 60 0;
-#X connect 67 0 73 0;
-#X connect 67 1 69 0;
-#X connect 68 0 71 0;
+#X connect 66 0 71 0;
+#X connect 66 1 87 0;
+#X connect 67 0 69 0;
 #X connect 69 0 68 0;
-#X connect 71 0 70 0;
-#X connect 72 0 63 0;
-#X connect 73 0 68 0;
-#X connect 74 0 66 3;
-#X connect 76 0 66 2;
-#X connect 77 0 66 1;
+#X connect 70 0 63 0;
+#X connect 71 0 67 0;
+#X connect 72 0 92 3;
+#X connect 74 0 92 2;
+#X connect 75 0 92 1;
+#X connect 76 0 77 0;
+#X connect 77 0 80 0;
+#X connect 77 1 82 0;
+#X connect 78 0 79 0;
+#X connect 79 0 80 1;
+#X connect 80 0 81 0;
+#X connect 82 0 81 0;
+#X connect 87 0 67 0;
+#X connect 88 0 89 1;
+#X connect 89 0 92 4;
+#X connect 91 0 88 0;
+#X connect 92 0 60 0;
 #X restore 661 117 pd \$0-modes&moves;
 #X connect 3 0 11 0;
 #X connect 11 0 10 0;