Pārlūkot izejas kodu

stepper object cleaning

Etienne Landon 7 gadi atpakaļ
vecāks
revīzija
e589d09987
3 mainītis faili ar 372 papildinājumiem un 331 dzēšanām
  1. 41 34
      OSCstepperCtl.pd
  2. 325 291
      kostepper.pd
  3. 6 6
      steps2camrot.pd

+ 41 - 34
OSCstepperCtl.pd

@@ -1,4 +1,4 @@
-#N canvas 961 55 958 984 10;
+#N canvas 952 55 958 984 10;
 #N canvas 299 154 782 472 SerialOSC 0;
 #X obj 99 6 inlet;
 #X obj 99 332 outlet;
@@ -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 0
+#X obj 368 52 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
 #X obj 368 72 route 0 1;
 #X msg 368 134 close;
@@ -43,41 +43,46 @@
 #X connect 19 0 17 0;
 #X connect 20 0 2 0;
 #X coords 0 -1 1 1 85 60 1 300 50;
-#X restore 65 454 pd SerialOSC;
-#X obj 174 591 print OSCin;
-#X obj 172 457 r /fromOSC;
-#X obj 172 479 t a a;
-#X obj 172 570 spigot;
-#X msg 204 505 \$1;
-#X obj 204 527 == 3;
-#X msg 67 429 /home;
-#N canvas 221 565 792 428 syncControl 0;
-#X floatatom 42 238 5 0 0 0 - - -, f 5;
-#X floatatom 218 245 5 0 0 0 - - -, f 5;
-#X obj 23 19 unauthorized/grid grid1 200 -2 2 200 -2 2 1 0.01 0.01
-2 2 120 117;
-#X obj 23 270 t f f;
-#X obj 23 311 abs;
-#X obj 23 332 s /stepper/0/manualSpeed;
-#X obj 123 279 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+#X restore 614 354 pd SerialOSC;
+#X obj 723 491 print OSCin;
+#X obj 721 357 r /fromOSC;
+#X obj 721 379 t a a;
+#X obj 721 470 spigot;
+#X msg 753 405 \$1;
+#X obj 753 427 == 3;
+#X msg 616 329 /home;
+#N canvas 212 557 792 428 syncControl 0;
+#X floatatom 42 268 5 0 0 0 - - -, f 5;
+#X floatatom 218 275 5 0 0 0 - - -, f 5;
+#X obj 23 49 unauthorized/grid grid1 200 -2 2 200 -2 2 1 0.01 0.01
+2 2 120 147;
+#X obj 23 300 t f f;
+#X obj 23 341 abs;
+#X obj 23 362 s /stepper/0/manualSpeed;
+#X obj 123 309 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
-#X obj 70 287 > 0;
-#X obj 70 308 s /stepper/0/manualDirection;
-#X obj 242 275 t f f;
-#X obj 242 316 abs;
-#X obj 342 284 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 70 317 > 0;
+#X obj 70 338 s /stepper/0/manualDirection;
+#X obj 242 305 t f f;
+#X obj 242 346 abs;
+#X obj 342 314 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
 1;
-#X obj 289 292 > 0;
-#X obj 289 313 s /stepper/1/manualDirection;
-#X obj 242 337 s /stepper/1/manualSpeed;
-#X obj 240 21 tgl 15 0 empty empty MANUEL 17 7 0 10 -262144 -1 -1 0
+#X obj 289 322 > 0;
+#X obj 289 343 s /stepper/1/manualDirection;
+#X obj 242 367 s /stepper/1/manualSpeed;
+#X obj 240 51 tgl 15 0 empty empty MANUEL 17 7 0 10 -262144 -1 -1 0
 1;
-#X msg 241 62 \; /stepper/0/manualDrive \$1 \; /stepper/1/manualDrive
+#X msg 241 92 \; /stepper/0/manualDrive \$1 \; /stepper/1/manualDrive
 \$1;
-#X obj 572 46 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
--1;
-#X msg 572 66 \; /stepper/0/move/go bang \; /stepper/1/move/go bang
+#X obj 243 153 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 243 173 \; /stepper/0/move/go bang \; /stepper/1/move/go bang
 ;
+#X text 263 153 moveInSync;
+#X obj 243 213 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 263 213 STOP;
+#X msg 243 233 \; /stepper/0/stop bang \; /stepper/1/stop bang;
 #X connect 2 0 0 0;
 #X connect 2 0 3 0;
 #X connect 2 1 1 0;
@@ -94,9 +99,11 @@
 #X connect 12 0 13 0;
 #X connect 15 0 16 0;
 #X connect 17 0 18 0;
-#X restore 15 261 pd syncControl;
-#X obj 348 13 kostepper 1;
+#X connect 20 0 22 0;
+#X coords 0 -1 1 1 400 250 1 10 10;
+#X restore 470 707 pd syncControl;
 #X obj 12 13 kostepper 0;
+#X obj 13 253 kostepper 1;
 #X connect 2 0 3 0;
 #X connect 3 0 4 0;
 #X connect 3 1 5 0;

+ 325 - 291
kostepper.pd

@@ -3,19 +3,16 @@
 0;
 #X obj 85 277 cnv 15 130 100 empty empty MANUEL 2 8 0 14 -233017 -128992
 0;
-#X obj 220 172 cnv 15 180 150 empty empty Move 2 8 0 14 -233017 -128992
+#X obj 220 172 cnv 15 180 205 empty empty Move 2 8 0 14 -233017 -128992
 0;
-#X obj 103 19 r /fromOSC;
-#X floatatom 134 195 10 0 0 0 - /stepper/#1/pos/current /stepper/#1/pos/current
-, f 10;
+#X obj 65 9 r /fromOSC;
 #X floatatom 135 213 10 0 0 0 - - -, f 10;
 #X floatatom 135 231 10 0 0 0 - - -, f 10;
 #X floatatom 135 249 10 0 0 0 - - -, f 10;
-#X text 88 194 current;
 #X text 95 213 target;
 #X text 101 231 speed;
 #X text 83 249 maxspeed;
-#X obj 148 64 print stepper\$1;
+#X obj 110 54 print stepper\$1;
 #N canvas 1 55 450 300 filter\$1 0;
 #X obj 60 41 t a a;
 #X obj 92 89 == \$1;
@@ -29,8 +26,8 @@
 #X connect 2 0 5 0;
 #X connect 3 0 1 0;
 #X connect 4 0 0 0;
-#X restore 103 39 pd filter\$1;
-#N canvas 132 527 450 300 conversion 0;
+#X restore 65 29 pd filter\$1;
+#N canvas 123 519 450 300 conversion 0;
 #X obj 97 9 inlet;
 #X obj 97 30 unpack f f f f f;
 #X obj 97 94 outlet;
@@ -54,313 +51,350 @@
 #X connect 9 0 4 0;
 #X connect 10 0 5 0;
 #X connect 11 0 6 0;
-#X restore 103 106 pd conversion;
-#X obj 103 84 route /status /onTarget;
-#X obj 327 304 bng 15 250 50 0 empty empty done 17 7 0 10 -262144 -1
--1;
+#X restore 65 96 pd conversion;
+#X obj 65 74 route /status /onTarget;
 #X obj 180 282 vsl 12 60 0 2 0 0 /stepper/\$1/manualSpeed /stepper/\$1/manualSpeed
-speed -10 70 0 10 -262144 -1 -1 0 1;
+speed -10 70 0 10 -262144 -1 -1 5900 1;
 #X obj 105 344 hradio 15 1 0 2 /stepper/\$1/manualDirection /stepper/\$1/manualDirection
 direction -10 22 0 10 -262144 -1 -1 0;
-#X obj 328 276 bng 25 250 50 0 /stepper/\$1/move/go /stepper/\$1/move/go
+#X obj 270 175 bng 25 250 50 0 /stepper/\$1/move/go /stepper/\$1/move/go
 GO 6 13 0 10 -4034 -1 -1;
-#X obj 304 846 tof/menubutton 100 25 \$0-mbS \$0-mbR 1 grey90 black
+#X obj 1712 862 tof/menubutton 100 25 \$0-mbS \$0-mbR 1 grey90 black
 grey95 black 0 \, none \, test (autre copie).move \, test.move \, test (3e copie).move
 \, test (4e copie).move \, test (copie).move;
-#X obj 1412 397 list prepend add;
-#X obj 1412 418 list trim;
-#X obj 1408 297 ofGetPatchDirectory;
-#X obj 1408 222 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X obj 1486 706 list prepend add;
+#X obj 1486 727 list trim;
+#X obj 1482 606 ofGetPatchDirectory;
+#X obj 1482 531 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
 -1 -1;
-#X text 1429 222 get the list of file names in a directory.;
-#X msg 1409 345 symbol \$1/moves;
-#X symbolatom 1408 318 50 0 0 0 - - -, f 50;
-#X obj 1735 293 print;
-#X obj 1417 375 ofGetDirectoryFileNames move;
-#N canvas 448 266 906 607 \$0-osc 0;
-#X obj 47 13 kollabs/osc_bi \$2 /stepper/\$1/driveMode;
-#X obj 47 103 kollabs/osc_bi \$2 /stepper/\$1/move;
-#X obj 47 123 kollabs/osc_bi \$2 /stepper/\$1/moveTo;
-#X obj 47 183 kollabs/osc_bi \$2 /stepper/\$1/setSpeed;
-#X obj 47 203 kollabs/osc_bi \$2 /stepper/\$1/setMaxSpeed;
-#X obj 47 223 kollabs/osc_bi \$2 /stepper/\$1/acceleration;
-#X obj 47 33 kollabs/osc_bi \$2 /stepper/\$1/accMode;
-#X obj 47 53 kollabs/osc_bi \$2 /stepper/\$1/manualDrive;
-#X obj 47 -6 kollabs/osc_bi \$2 /stepper/\$1/updateStatus;
-#X obj 47 263 kollabs/osc_bi \$2 /stepper/\$1/sequences/list;
-#X obj 47 313 kollabs/osc_bi \$2 /stepper/\$1/pos/current;
-#X obj 47 333 kollabs/osc_bi \$2 /stepper/\$1/pos/current/deg;
-#X restore 1404 48 pd \$0-osc;
-#X obj 952 251 route 0 1;
-#X obj 952 207 r /stepper/\$1/manualDrive;
-#X obj 909 296 r /stepper/\$1/accMode;
-#X obj 952 228 t f f;
-#X obj 952 335 f;
-#X msg 977 271 2;
-#X obj 953 384 s /stepper/\$1/driveMode;
-#X obj 952 356 spigot;
-#X obj 1007 334 == 0;
+#X text 1503 531 get the list of file names in a directory.;
+#X msg 1483 654 symbol \$1/moves;
+#X symbolatom 1482 627 50 0 0 0 - - -, f 50;
+#X obj 1809 602 print;
+#X obj 1491 684 ofGetDirectoryFileNames move;
+#N canvas 421 242 906 607 \$0-osc 0;
+#X obj 44 54 kollabs/osc_bi \$2 /stepper/\$1/driveMode;
+#X obj 44 144 kollabs/osc_bi \$2 /stepper/\$1/move;
+#X obj 44 164 kollabs/osc_bi \$2 /stepper/\$1/moveTo;
+#X obj 44 224 kollabs/osc_bi \$2 /stepper/\$1/setSpeed;
+#X obj 44 244 kollabs/osc_bi \$2 /stepper/\$1/setMaxSpeed;
+#X obj 44 264 kollabs/osc_bi \$2 /stepper/\$1/acceleration;
+#X obj 44 74 kollabs/osc_bi \$2 /stepper/\$1/accMode;
+#X obj 44 94 kollabs/osc_bi \$2 /stepper/\$1/manualDrive;
+#X obj 44 35 kollabs/osc_bi \$2 /stepper/\$1/updateStatus;
+#X obj 44 304 kollabs/osc_bi \$2 /stepper/\$1/sequences/list;
+#X obj 44 354 kollabs/osc_bi \$2 /stepper/\$1/pos/current;
+#X obj 44 374 kollabs/osc_bi \$2 /stepper/\$1/pos/current/deg;
+#X obj 533 37 loadbang;
+#X obj 533 58 f \$1;
+#X msg 532 79 \; /stepper/\$1/accMode 0 \; /stepper/\$1/manualDrive
+0 \; /stepper/\$1/setSpeed 1 \; /stepper/\$1/setMaxSpeed 1 \; /stepper/\$1/acceleration
+1;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X restore 346 384 pd \$0-osc;
+#X obj 717 101 route 0 1;
+#X obj 717 57 r /stepper/\$1/manualDrive;
+#X obj 728 124 r /stepper/\$1/accMode;
+#X obj 717 78 t f f;
+#X obj 717 165 f;
+#X msg 742 211 2;
+#X obj 717 229 s /stepper/\$1/driveMode;
+#X obj 717 186 spigot;
+#X obj 750 166 == 0;
 #X obj 106 298 tgl 35 0 /stepper/\$1/manualDrive /stepper/\$1/manualDrive
 empty 17 7 0 10 -204800 -33289 -1 0 1;
-#X obj 364 176 tgl 15 0 /stepper/\$1/accMode empty 0/1 17 7 0 10 -262144
--1 -1 1 1;
-#X text 987 179 SET DRIVE MODE;
-#X obj 783 476 / 60;
-#X obj 783 453 r /stepper/\$1/setMaxSpeed;
-#X obj 89 626 r /stepper/\$1/driveMode;
-#X obj 659 602 list prepend;
-#X obj 89 714 pack s f f;
-#X obj 146 689 f \$1;
-#X obj 146 667 loadbang;
-#X obj 89 768 s /toOSC;
-#X msg 89 746 /\$1 \$3 \$2;
-#X obj 766 583 r /stepper/\$1/driveMode;
-#X text 108 602 SEND DRIVE MODE;
-#X obj 763 433 r /stepper/\$1/move;
-#X obj 651 518 f \$1;
-#X obj 335 579 / 60;
-#X obj 335 601 steps2camrot;
-#X obj 817 504 / 60;
-#X obj 817 481 r /stepper/\$1/acceleration;
-#X obj 659 579 pack f f f f;
-#X obj 659 643 route 0 1;
-#X obj 335 671 spigot;
-#X obj 368 629 r /stepper/\$1/driveMode;
-#X obj 368 650 == 2;
-#X msg 333 693 setSpeed \$1;
-#X obj 772 634 print;
-#X obj 909 317 == 0;
-#X msg 89 647 driveMode \$1 \, setSpeed 0;
-#X obj 224 303 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move /stepper/\$1/move
-tours 0 -8 0 10 -262144 -1 -1 0 256;
-#X obj 693 742 list;
-#X msg 690 704 move \$2 \$1 \, setSpeed \$3 \$1 \, getStatus \$1 \$1
+#X obj 365 264 tgl 12 0 /stepper/\$1/accMode empty 0/1 17 7 0 10 -262144
+-1 -1 0 1;
+#X text 752 29 SET DRIVE MODE;
+#X obj 544 490 / 60;
+#X obj 544 472 r /stepper/\$1/setMaxSpeed;
+#X obj 1340 272 r /stepper/\$1/driveMode;
+#X obj 429 574 list prepend;
+#X obj 1340 360 pack s f f;
+#X obj 1397 335 f \$1;
+#X obj 1397 313 loadbang;
+#X obj 1340 414 s /toOSC;
+#X msg 1340 392 /\$1 \$3 \$2;
+#X obj 509 552 r /stepper/\$1/driveMode;
+#X text 1360 256 SEND DRIVE MODE;
+#X obj 521 452 r /stepper/\$1/move;
+#X obj 429 448 f \$1;
+#X obj 1311 186 / 60;
+#X obj 578 510 / 60;
+#X obj 578 492 r /stepper/\$1/acceleration;
+#X obj 429 552 pack f f f f;
+#X obj 429 593 route 0 1;
+#X obj 1242 245 spigot;
+#X obj 1325 208 r /stepper/\$1/driveMode;
+#X obj 1325 229 == 2;
+#X msg 1242 264 setSpeed \$1;
+#X obj 728 145 == 0;
+#X msg 1340 293 driveMode \$1 \, setSpeed 0;
+#X obj 223 292 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move /stepper/\$1/move
+tours 48 8 0 10 -262144 -1 -1 0 256;
+#X obj 429 672 list;
+#X msg 454 647 move \$2 \$1 \, setSpeed \$3 \$1 \, getStatus \$1 \$1
 ;
-#X text 426 605 MANUAL SPEED;
-#X obj 335 555 * 1;
-#X obj 391 539 t b f;
-#X obj 362 496 route 0 1;
-#X msg 362 517 -1;
-#X msg 391 517 1;
-#X obj 362 470 r /stepper/\$1/manualDirection;
-#X obj 335 444 r /stepper/\$1/manualSpeed;
-#X obj 714 498 steps2camrot;
-#X obj 694 454 steps2camrot;
-#X obj 748 526 steps2camrot;
+#X text 1296 23 MANUAL SPEED;
+#X obj 1311 162 * 1;
+#X obj 1326 142 t b f;
+#X obj 1326 102 route 0 1;
+#X msg 1326 122 -1;
+#X msg 1355 122 1;
+#X obj 1326 76 r /stepper/\$1/manualDirection;
+#X obj 1311 51 r /stepper/\$1/manualSpeed;
 #X obj 168 359 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/manualSpeed /stepper/\$1/manualSpeed
-empty 0 -8 0 10 -262144 -1 -1 0 256;
-#X obj 295 177 vsl 12 60 0 2 0 0 /stepper/\$1/setMaxSpeed /stepper/\$1/setMaxSpeed
-speed -10 70 0 10 -262144 -1 -1 0 1;
-#X obj 283 254 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/setMaxSpeed /stepper/\$1/setMaxSpeed
-empty 0 -8 0 10 -262144 -1 -1 0 256;
-#X obj 345 177 vsl 12 60 0 2 0 0 /stepper/\$1/acceleration /stepper/\$1/acceleration
-acc -2 70 0 10 -262144 -1 -1 0 1;
-#X obj 333 254 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/acceleration
-/stepper/\$1/acceleration empty 0 -8 0 10 -262144 -1 -1 0 256;
-#X obj 227 842 cnv 15 180 100 empty empty presets 2 8 0 14 -233017
+empty 0 -8 0 10 -262144 -1 -1 2 256;
+#X obj 315 282 vsl 12 60 0 2 0 0 /stepper/\$1/setMaxSpeed /stepper/\$1/setMaxSpeed
+speed -10 70 0 10 -262144 -1 -1 2950 1;
+#X obj 303 359 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/setMaxSpeed /stepper/\$1/setMaxSpeed
+empty 0 -8 0 10 -262144 -1 -1 1 256;
+#X obj 365 282 vsl 12 60 0 2 0 0 /stepper/\$1/acceleration /stepper/\$1/acceleration
+acc -2 70 0 10 -233017 -233017 -195568 2950 1;
+#X obj 353 359 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/acceleration
+/stepper/\$1/acceleration empty 0 -8 0 10 -233017 -233017 -195568 1
+256;
+#X obj 1635 858 cnv 15 180 100 empty empty presets 2 8 0 14 -233017
 -128992 0;
-#X obj 320 55 r /stepper/\$1/accMode;
-#X obj 320 76 route 0 1;
-#X msg 320 95 color 10 10 20;
-#X msg 345 116 color 0 22 22;
 #X obj 197 175 bng 15 250 50 0 /stepper/\$1/updateStatus /stepper/\$1/updateStatus
 refresh -45 8 0 10 -262144 -1 -1;
-#X obj 89 449 r /stepper/\$1/updateStatus;
-#X obj 89 470 f \$1;
-#X msg 89 491 /getStatus \$1;
-#X obj 89 512 s /toOSC;
-#X msg 219 106 color 10 10 20;
-#X obj 355 276 tgl 25 0 empty empty empty 17 7 0 10 -233017 -233017
--195568 0 1;
-#X msg 228 123 color 14 14 14;
-#X text 1353 123 prise en compte du homing;
-#X text 1383 140 -> possibilité de placer le moteur en absolu sur
+#X obj 892 162 r /stepper/\$1/updateStatus;
+#X obj 892 183 f \$1;
+#X msg 892 204 /getStatus \$1;
+#X obj 892 225 s /toOSC;
+#X text 1427 432 prise en compte du homing;
+#X text 1457 449 -> possibilité de placer le moteur en absolu sur
 360° modulo;
-#X text 1387 155 -> utilisation facultative du point de départ d'un
+#X text 1461 464 -> utilisation facultative du point de départ d'un
 move;
-#X obj 693 788 s /toOSC;
-#X msg 693 766 /\$1 \$3 \$2;
-#X obj 651 414 r /stepper/\$1/move/go;
-#X obj 248 32 loadbang;
-#X obj 385 153 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
--1 -1;
-#X obj 428 320 f \$1;
-#X msg 428 341 /stop \$1;
-#X msg 659 673 acceleration \$4 \$1 \, maxSpeed \$3 \$1 \, move \$2
+#X obj 429 710 s /toOSC;
+#X msg 429 691 /\$1 \$3 \$2;
+#X obj 429 427 r /stepper/\$1/move/go;
+#X obj 720 343 loadbang;
+#X obj 298 175 bng 25 250 50 0 /stepper/\$1/stop /stepper/\$1/stop
+STOP 1 14 0 10 -258113 -1 -1;
+#X obj 892 75 f \$1;
+#X msg 892 96 /stop \$1;
+#X msg 429 613 acceleration \$4 \$1 \, maxSpeed \$3 \$1 \, move \$2
 \$1 \, getStatus \$1 \$1;
-#X obj 1408 242 t b b;
-#X obj 1413 476 s /stepper/\$1/sequences/list;
-#X obj 423 817 r /stepper/\$1/sequences/list;
-#X obj 640 52 stepperCue \$1 0;
-#X msg 1436 270 clear \, align 0 \, add none \, set 0;
-#X obj 640 152 stepperCue \$1 1;
+#X obj 1482 551 t b b;
+#X obj 1487 785 s /stepper/\$1/sequences/list;
+#X obj 1676 837 r /stepper/\$1/sequences/list;
+#X obj 72 703 stepperCue \$1 0;
+#X msg 1510 579 clear \, align 0 \, add none \, set 0;
+#X obj 72 803 stepperCue \$1 1;
 #X obj 83 127 s /stepper/\$1/pos/current;
-#X obj 1156 573 r /stepper/\$1/pos/current;
-#X obj 1156 594 * 360;
-#X obj 1156 615 mod 360;
-#X floatatom 1243 660 5 0 0 0 - - -, f 5;
-#X floatatom 1239 601 5 0 0 0 - - -, f 5;
-#X obj 224 213 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move/startPos
-/stepper/\$1/move/startPos startPos 0 -8 0 10 -262144 -1 -1 350 256
-;
-#X obj 225 232 bng 15 250 50 0 /stepper/\$1/move/gotoStart /stepper/\$1/move/gotoStart
+#X obj 895 459 r /stepper/\$1/pos/current;
+#X obj 895 478 * 360;
+#X floatatom 822 490 5 0 0 0 - - -, f 5;
+#X obj 339 227 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move/startPos
+/stepper/\$1/move/startPos startPos 0 -8 0 10 -262144 -1 -1 0 256;
+#X obj 277 233 bng 15 250 50 0 /stepper/\$1/move/gotoStart /stepper/\$1/move/gotoStart
 goto 17 7 0 10 -262144 -1 -1;
-#X obj 225 252 bng 15 250 50 0 /stepper/\$1/move/setStart /stepper/\$1/move/setStart
+#X obj 230 232 bng 15 250 50 0 /stepper/\$1/move/setStart /stepper/\$1/move/setStart
 set 17 7 0 10 -262144 -1 -1;
-#X obj 1131 655 f;
-#X obj 1131 547 r /stepper/\$1/move/setStart;
-#X obj 1107 746 r /stepper/\$1/move/gotoStart;
-#X obj 1131 697 s /stepper/\$1/move/startPos;
-#X obj 1444 586 r /stepper/\$1/move/startPos;
-#X obj 1422 633 -;
-#X obj 1444 606 t b f;
-#X text 1452 634 distance currentPos->startPos;
-#X obj 1324 683 moses 180;
-#X obj 1273 820 steps2camrot;
-#X obj 1384 704 - 360;
-#X text 1578 726 go backward \, quickest path;
-#X floatatom 1416 789 5 0 0 0 - - -, f 5;
-#X floatatom 1502 653 5 0 0 0 - - -, f 5;
-#X obj 1152 932 list;
-#X obj 1152 978 s /toOSC;
-#X msg 1152 956 /\$1 \$3 \$2;
-#X obj 1127 792 f \$1;
-#X obj 1324 768 / 360;
-#X obj 1134 853 pack 0 0 8000 0;
-#X msg 1140 889 driveMode 1 \$1 \, move \$2 \$1 \, setSpeed \$3 \$1
+#X obj 870 578 f;
+#X obj 870 440 r /stepper/\$1/move/setStart;
+#X obj 865 682 r /stepper/\$1/move/gotoStart;
+#X obj 870 597 s /stepper/\$1/move/startPos;
+#X obj 1169 461 r /stepper/\$1/move/startPos;
+#X obj 1145 502 -;
+#X obj 1169 481 t b f;
+#X text 1175 503 distance currentPos->startPos;
+#X obj 1145 562 moses 180;
+#X obj 1076 689 steps2camrot;
+#X obj 1196 583 - 360;
+#X text 1303 595 go backward \, quickest path;
+#X floatatom 1227 522 5 0 0 0 - - -, f 5;
+#X obj 865 761 list;
+#X obj 865 799 s /toOSC;
+#X msg 865 780 /\$1 \$3 \$2;
+#X obj 865 701 f \$1;
+#X obj 1145 670 / 360;
+#X obj 865 722 pack 0 0 8000 0;
+#X msg 865 742 driveMode 1 \$1 \, move \$2 \$1 \, setSpeed \$3 \$1
 \, getStatus \$1 \$1;
-#X obj 1156 638 s /stepper/\$1/pos/current/deg;
-#X obj 1418 565 r /stepper/\$1/pos/current/deg;
-#X obj 1354 662 abs;
-#X obj 198 195 nbx 3 14 -1e+37 1e+37 0 0 /stepper/\$1/pos/current/deg
-/stepper/\$1/pos/current/deg empty 0 -8 0 10 -262144 -1 -1 10 256;
-#X obj 1420 653 t f f;
-#X obj 1447 678 moses 0;
-#X floatatom 1324 789 5 0 0 0 - - -, f 5;
-#X msg 1447 699 360;
-#X msg 1477 698 -360;
-#X connect 3 0 13 0;
+#X obj 895 578 s /stepper/\$1/pos/current/deg;
+#X obj 1145 440 r /stepper/\$1/pos/current/deg;
+#X obj 1145 543 abs;
+#X obj 183 196 nbx 3 14 -1e+37 1e+37 0 0 /stepper/\$1/pos/current/deg
+/stepper/\$1/pos/current/deg empty 0 -8 0 10 -262144 -1 -1 0 256;
+#X obj 1145 522 t f f;
+#X obj 1172 607 moses 0;
+#X msg 1172 628 360;
+#X msg 1202 628 -360;
+#X obj 128 195 nbx 5 14 -1e+37 1e+37 0 0 /stepper/\$1/pos/current /stepper/\$1/pos/current
+current -45 7 0 10 -262144 -1 -1 0 256;
+#X obj 1242 208 steps2camrot;
+#X obj 475 508 steps2camrot;
+#X obj 452 470 steps2camrot;
+#X obj 509 528 steps2camrot;
+#X obj 895 497 t f f;
+#X obj 922 515 div 360;
+#X obj 922 536 * 360;
+#X obj 895 555 -;
+#X obj 223 308 nbx 4 14 -1e+37 1e+37 0 0 /stepper/\$1/move/deg /stepper/\$1/move/deg
+deg 48 8 0 10 -262144 -1 -1 0 256;
+#X obj 1073 56 r /stepper/\$1/move;
+#X obj 1073 77 * 360;
+#X obj 1073 96 s /stepper/\$1/move/deg;
+#X obj 1073 116 r /stepper/\$1/move/deg;
+#X obj 1073 156 s /stepper/\$1/move;
+#X obj 1073 137 / 360;
+#X obj 892 56 r /stepper/\$1/move;
+#X obj 892 116 s /toOSC;
+#X text 925 30 STOP;
+#X text 1082 30 MOVE DEGRES CONVERSION;
+#X text 909 144 STATUS;
+#X text 1011 414 START POSITION MANAGEMENT;
+#X text 453 405 MOVE MANAGEMENT;
+#X obj 153 97 s /stepper/\$1/pos/onTarget;
+#X obj 327 175 cnv 25 70 25 /stepper/\$1/runningGui /stepper/\$1/runningGui
+running 7 12 0 14 -260818 -258699 0;
+#X obj 720 402 s /stepper/\$1/runningGui;
+#X msg 778 332 color 14 13 13 \, label running \, label_pos 7 12;
+#X msg 720 384 color 10 11 20 \, label idle \, label_pos 17 12;
+#X obj 720 364 r /stepper/\$1/pos/onTarget;
+#X obj 778 313 r /stepper/#1/move/go;
+#X obj 795 293 r /stepper/\$1/move/gotoStart;
+#X text 966 261 GUI COLORS;
+#X obj 1071 287 r /stepper/\$1/accMode;
+#X obj 1071 308 route 0 1;
+#X msg 1071 327 color 10 10 20;
+#X msg 1096 348 color 0 22 22;
+#X obj 1071 381 s /stepper/\$1/accGUI;
+#X obj 436 264 r /stepper/\$1/accGUI;
+#X text 227 212 Position depart;
+#X text 225 263 Reglages mouvement;
+#X connect 3 0 11 0;
+#X connect 11 0 10 0;
+#X connect 11 0 13 0;
+#X connect 12 1 103 0;
+#X connect 12 2 4 0;
+#X connect 12 3 5 0;
+#X connect 12 4 6 0;
 #X connect 13 0 12 0;
-#X connect 13 0 15 0;
-#X connect 14 1 118 0;
-#X connect 14 2 5 0;
-#X connect 14 3 6 0;
-#X connect 14 4 7 0;
-#X connect 15 0 14 0;
-#X connect 15 1 16 0;
-#X connect 16 0 98 0;
-#X connect 19 0 100 0;
-#X connect 21 0 22 0;
-#X connect 22 0 113 0;
+#X connect 13 1 161 0;
+#X connect 18 0 19 0;
+#X connect 19 0 98 0;
+#X connect 20 0 23 0;
+#X connect 20 0 24 0;
+#X connect 21 0 97 0;
 #X connect 23 0 26 0;
-#X connect 23 0 27 0;
-#X connect 24 0 112 0;
-#X connect 26 0 29 0;
-#X connect 29 0 21 0;
-#X connect 29 0 28 0;
-#X connect 31 0 35 0;
+#X connect 26 0 18 0;
+#X connect 26 0 25 0;
+#X connect 28 0 32 0;
+#X connect 28 1 33 0;
+#X connect 29 0 31 0;
+#X connect 30 0 62 0;
+#X connect 31 0 28 0;
 #X connect 31 1 36 0;
-#X connect 32 0 34 0;
-#X connect 33 0 67 0;
-#X connect 34 0 31 0;
-#X connect 34 1 39 0;
-#X connect 35 0 38 0;
-#X connect 36 0 37 0;
-#X connect 38 0 37 0;
-#X connect 39 0 38 1;
-#X connect 43 0 80 1;
-#X connect 44 0 43 0;
-#X connect 45 0 68 0;
-#X connect 46 0 61 0;
-#X connect 47 0 51 0;
-#X connect 48 0 47 2;
-#X connect 49 0 48 0;
-#X connect 51 0 50 0;
-#X connect 52 0 46 1;
-#X connect 54 0 81 1;
-#X connect 55 0 60 0;
-#X connect 56 0 57 1;
-#X connect 57 0 62 0;
-#X connect 58 0 82 1;
-#X connect 59 0 58 0;
-#X connect 60 0 46 0;
-#X connect 61 0 111 0;
-#X connect 61 1 71 0;
-#X connect 62 0 65 0;
-#X connect 63 0 64 0;
-#X connect 64 0 62 1;
-#X connect 65 0 47 0;
-#X connect 67 0 35 0;
-#X connect 68 0 47 0;
-#X connect 70 0 105 0;
-#X connect 71 0 70 0;
-#X connect 73 0 56 0;
-#X connect 74 0 73 0;
-#X connect 74 1 73 1;
-#X connect 75 0 76 0;
-#X connect 75 1 77 0;
-#X connect 76 0 74 0;
-#X connect 77 0 74 0;
-#X connect 78 0 75 0;
-#X connect 79 0 73 0;
-#X connect 80 0 60 2;
-#X connect 81 0 60 1;
-#X connect 82 0 60 3;
-#X connect 89 0 90 0;
-#X connect 90 0 91 0;
-#X connect 90 1 92 0;
-#X connect 91 0 86 0;
-#X connect 92 0 86 0;
+#X connect 32 0 35 0;
+#X connect 33 0 34 0;
+#X connect 35 0 34 0;
+#X connect 36 0 35 1;
+#X connect 40 0 140 1;
+#X connect 41 0 40 0;
+#X connect 42 0 63 0;
+#X connect 43 0 57 0;
+#X connect 44 0 48 0;
+#X connect 45 0 44 2;
+#X connect 46 0 45 0;
+#X connect 48 0 47 0;
+#X connect 49 0 43 1;
+#X connect 51 0 141 1;
+#X connect 52 0 56 0;
+#X connect 53 0 139 1;
+#X connect 54 0 142 1;
+#X connect 55 0 54 0;
+#X connect 56 0 43 0;
+#X connect 57 0 96 0;
+#X connect 57 1 66 0;
+#X connect 58 0 61 0;
+#X connect 59 0 60 0;
+#X connect 60 0 58 1;
+#X connect 61 0 44 0;
+#X connect 62 0 32 0;
+#X connect 63 0 44 0;
+#X connect 65 0 90 0;
+#X connect 66 0 65 0;
+#X connect 68 0 53 0;
+#X connect 69 0 68 0;
+#X connect 69 1 68 1;
+#X connect 70 0 71 0;
+#X connect 70 1 72 0;
+#X connect 71 0 69 0;
+#X connect 72 0 69 0;
+#X connect 73 0 70 0;
+#X connect 74 0 68 0;
+#X connect 82 0 83 0;
+#X connect 83 0 84 0;
+#X connect 84 0 85 0;
+#X connect 90 0 89 0;
+#X connect 91 0 52 0;
+#X connect 92 0 165 0;
 #X connect 94 0 95 0;
-#X connect 95 0 96 0;
-#X connect 96 0 97 0;
-#X connect 98 0 99 0;
-#X connect 100 0 99 0;
-#X connect 105 0 104 0;
-#X connect 106 0 55 0;
-#X connect 107 0 98 0;
-#X connect 107 0 41 0;
-#X connect 108 0 109 0;
-#X connect 109 0 110 0;
-#X connect 110 0 50 0;
-#X connect 111 0 70 0;
-#X connect 112 0 23 0;
-#X connect 112 1 116 0;
-#X connect 114 0 20 0;
-#X connect 116 0 113 0;
-#X connect 119 0 120 0;
-#X connect 120 0 121 0;
-#X connect 120 0 123 0;
-#X connect 121 0 122 0;
-#X connect 121 0 127 1;
-#X connect 121 0 148 0;
-#X connect 127 0 130 0;
-#X connect 128 0 127 0;
-#X connect 129 0 144 0;
-#X connect 131 0 133 0;
-#X connect 132 0 140 0;
-#X connect 132 0 152 0;
-#X connect 133 0 132 0;
-#X connect 133 1 132 1;
-#X connect 135 0 145 0;
-#X connect 135 0 139 0;
+#X connect 95 0 155 0;
+#X connect 96 0 65 0;
+#X connect 97 0 20 0;
+#X connect 97 1 101 0;
+#X connect 99 0 17 0;
+#X connect 101 0 98 0;
+#X connect 104 0 105 0;
+#X connect 105 0 143 0;
+#X connect 110 0 113 0;
+#X connect 111 0 110 0;
+#X connect 112 0 126 0;
+#X connect 114 0 116 0;
+#X connect 115 0 122 0;
+#X connect 115 0 134 0;
+#X connect 116 0 115 0;
+#X connect 116 1 115 1;
+#X connect 118 0 127 0;
+#X connect 118 1 120 0;
+#X connect 119 0 128 1;
+#X connect 120 0 127 0;
+#X connect 123 0 125 0;
+#X connect 125 0 124 0;
+#X connect 126 0 128 0;
+#X connect 127 0 119 1;
+#X connect 128 0 129 0;
+#X connect 129 0 123 0;
+#X connect 131 0 115 0;
+#X connect 132 0 118 0;
+#X connect 134 0 132 0;
+#X connect 134 1 135 0;
+#X connect 135 0 136 0;
 #X connect 135 1 137 0;
-#X connect 136 0 146 1;
-#X connect 137 0 145 0;
-#X connect 137 0 139 0;
-#X connect 141 0 143 0;
-#X connect 143 0 142 0;
-#X connect 144 0 146 0;
-#X connect 145 0 154 0;
-#X connect 145 0 136 1;
-#X connect 146 0 147 0;
-#X connect 147 0 141 0;
-#X connect 149 0 132 0;
-#X connect 150 0 135 0;
-#X connect 152 0 150 0;
-#X connect 152 1 153 0;
-#X connect 153 0 155 0;
-#X connect 153 1 156 0;
-#X connect 155 0 145 1;
-#X connect 156 0 145 1;
+#X connect 136 0 127 1;
+#X connect 137 0 127 1;
+#X connect 139 0 58 0;
+#X connect 140 0 56 2;
+#X connect 141 0 56 1;
+#X connect 142 0 56 3;
+#X connect 143 0 146 0;
+#X connect 143 1 144 0;
+#X connect 144 0 145 0;
+#X connect 145 0 146 1;
+#X connect 146 0 106 0;
+#X connect 146 0 130 0;
+#X connect 146 0 110 1;
+#X connect 148 0 149 0;
+#X connect 149 0 150 0;
+#X connect 151 0 153 0;
+#X connect 153 0 152 0;
+#X connect 154 0 94 0;
+#X connect 164 0 163 0;
+#X connect 165 0 163 0;
+#X connect 166 0 165 0;
+#X connect 167 0 164 0;
+#X connect 168 0 164 0;
+#X connect 170 0 171 0;
+#X connect 171 0 172 0;
+#X connect 171 1 173 0;
+#X connect 172 0 174 0;
+#X connect 173 0 174 0;
+#X connect 175 0 78 0;
+#X connect 175 0 79 0;
 #X coords 0 -1 1 1 325 230 1 80 150;

+ 6 - 6
steps2camrot.pd

@@ -1,4 +1,4 @@
-#N canvas 593 81 450 300 10;
+#N canvas 584 73 450 300 10;
 #X obj 96 72 inlet;
 #X obj 179 42 loadbang;
 #X msg 179 64 200;
@@ -14,13 +14,13 @@
 #X obj 350 131 pack f f;
 #X obj 350 101 t b f;
 #X obj 286 154 *;
-#X obj 179 86 * 16;
 #X obj 286 192 i;
 #X text 149 255 single output \, conversion direction is choosen via
 input;
+#X obj 179 86 * 8;
 #X connect 0 0 8 0;
 #X connect 1 0 2 0;
-#X connect 2 0 15 0;
+#X connect 2 0 17 0;
 #X connect 4 0 14 0;
 #X connect 8 0 3 0;
 #X connect 9 0 8 1;
@@ -30,6 +30,6 @@ input;
 #X connect 11 1 10 1;
 #X connect 13 0 12 0;
 #X connect 13 1 12 1;
-#X connect 14 0 16 0;
-#X connect 15 0 9 0;
-#X connect 16 0 3 0;
+#X connect 14 0 15 0;
+#X connect 15 0 3 0;
+#X connect 17 0 9 0;