forked from MaslowCNC/GroundControl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
groundcontrol.kv
executable file
·1989 lines (1902 loc) · 61.7 KB
/
groundcontrol.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#:kivy 1.9.1
#<Widget>:
#This can be used to create boxes around each widget to clarify positioning issues. It is only for debug
# canvas.after:
# Line:
# rectangle: self.x+1,self.y+1,self.width-1,self.height-1
# dash_offset: 5
# dash_length: 3
<ButtonTemplate>:
GridLayout:
cols: 1
size: root.size
pos: root.pos
Button:
border: (2, 2, 2, 2)
background_normal: root.btnBackground # The background when the button is not pressed
background_down: root.btnBackgroundDown # The background when the button is pressed
on_press: root.internal_on_press()
on_release: root.internal_on_release()
Label:
text: root.textColor + root.text + '[/color]'
markup: True
pos: (root.pos[0] + (root.width - self.width)/2, root.pos[1] + (root.height-self.height)/2)
<ScreenControls>:
actionsBtn:actionsBtn
settingsBtn:settingsBtn
backgroundBtn:backgroundBtn
BoxLayout:
orientation: 'horizontal'
pos: (0, root.height - dp(60))
size_hint: (.4,None)
height: dp(60)
ButtonTemplate:
text: "Actions"
funcToCallOnRelease: root.show_actions
id: actionsBtn
ButtonTemplate:
text: "Settings"
funcToCallOnRelease: root.openSettings
id: settingsBtn
ButtonTemplate:
text: "Background"
funcToCallOnRelease: root.open_background
id: backgroundBtn
<GcodeCanvas>:
scatterObject:scatterObject
scatterInstance:scatterInstance
positionIndicator:positionIndicator
targetIndicator:targetIndicator
ScatterPlane:
do_rotation: False
id: scatterInstance
Label:
id: scatterObject
text: ""
PositionIndicator:
id: positionIndicator
PositionIndicator:
id: targetIndicator
MenuSpawner:
timeout: 1
menu_args:
dict(
creation_direction=1,
radius=10,
creation_timeout=.2,
choices=[
dict(text='[color=3333ff]Move Here[/color]', markup = True, index=1),
dict(text='Position Text Placeholder' , markup = True, index=2),
dict(text='[color=3333ff]Set Home[/color]' , markup = True, index=3),
dict(text='[color=3333ff]Mark Here[/color]', markup = True, index=4)])
<FrontPage>:
textconsole:textconsole
moveDistInput:moveDistInput
moveSpeedInput:moveSpeedInput
gcodecanvas:gcodecanvas
screenControls:screenControls
holdBtn:holdBtn
macro1Btn:macro1Btn
macro2Btn:macro2Btn
upLeftArrow:upLeftArrow
upArrow:upArrow
upRightArrow:upRightArrow
leftArrow:leftArrow
homeBtn:homeBtn
rightArrow:rightArrow
downLeftArrow:downLeftArrow
downArrow:downArrow
downRightArrow:downRightArrow
zAxisBtn:zAxisBtn
unitsBtn:unitsBtn
defHomeBtn:defHomeBtn
zLeft:zLeft
zRight:zRight
oneLeft:oneLeft
oneRight:oneRight
run:run
stopBtn:stopBtn
goTo:goTo
GcodeCanvas:
id: gcodecanvas
BoxLayout:
orientation: 'vertical'
pos: root.width - dp(300), dp(0)
GridLayout:
cols: 4
size_hint: None, None
width:dp(300)
height: dp(60*4)
#disabled: not app.data.connectionStatus
ButtonTemplate:
id: upLeftArrow
funcToCallOnPress: root.upLeft
ButtonTemplate:
id: upArrow
funcToCallOnPress: root.up
ButtonTemplate:
id: upRightArrow
funcToCallOnPress: root.upRight
ButtonTemplate:
id: macro1Btn
text: "Macro 1"
funcToCallOnPress: lambda:root.macro(1)
ButtonTemplate:
id: leftArrow
funcToCallOnPress: root.left
ButtonTemplate:
id: homeBtn
funcToCallOnPress: root.home
ButtonTemplate:
id: rightArrow
funcToCallOnPress: root.right
ButtonTemplate:
id: macro2Btn
text: "Macro 2"
funcToCallOnPress: lambda:root.macro(2)
ButtonTemplate:
id: downLeftArrow
funcToCallOnPress: root.downLeft
ButtonTemplate:
id: downArrow
funcToCallOnPress: root.down
ButtonTemplate:
id: downRightArrow
funcToCallOnPress: root.downRight
ButtonTemplate:
id: zAxisBtn
disabled: app.data.uploadFlag == 1 #zAxisPopup can change units... don't let it be popped during a move!
text: 'Z-Axis'
funcToCallOnPress: root.zAxisPopup
Label:
id: moveSpeedInput
color: .476, .476, .476,1
text: 'Dist To \nMove:'
multiline: False
ButtonTemplate:
id: moveDistInput
text: '100'
multiline: False
funcToCallOnPress: lambda:root.textInputPopup(self)
ButtonTemplate:
text: root.units
funcToCallOnPress: root.switchUnits
id: unitsBtn
ButtonTemplate:
text: 'Define\nHome'
funcToCallOnPress: root.moveOrigin
id: defHomeBtn
GridLayout:
cols: 3
size_hint: None, None
width: dp(300)
height: dp(60)
#disabled: not app.data.connectionStatus
ButtonTemplate:
id: run
funcToCallOnPress: root.startRun
ButtonTemplate:
id: holdBtn
secretText: "HOLD"
funcToCallOnPress: root.pause
ButtonTemplate:
id: stopBtn
funcToCallOnPress: root.stopRun
GridLayout:
cols: 5
size_hint: None, None
width: dp(300)
height: dp(30)
#disabled: not app.data.connectionStatus
ButtonTemplate:
text: "<Z"
funcToCallOnPress: lambda:root.moveGcodeZ(-1)
id: zLeft
ButtonTemplate:
text: "<1"
funcToCallOnPress: lambda:root.moveGcodeIndex(-1)
id: oneLeft
ButtonTemplate:
id: goTo
#text: 'GoTo'
funcToCallOnPress: root.gotoLinePopup
ButtonTemplate:
text: "1>"
funcToCallOnPress: lambda:root.moveGcodeIndex(1)
id: oneRight
ButtonTemplate:
text: "Z>"
funcToCallOnPress: lambda:root.moveGcodeZ(1)
id: zRight
BoxLayout:
orentation: 'horizontal'
size_hint: None, None
width: dp(300)
height: dp(70)
#disabled: not app.data.connectionStatus
GridLayout:
cols: 2
Label:
text: ' X :'
color: .476, .476, .476,1
Label:
text: root.xReadoutPos
color: .476, .476, .476,1
Label:
text: ' Y : '
color: .476, .476, .476,1
Label:
text: root.yReadoutPos
color: .476, .476, .476,1
Label:
text: ' Z : '
color: .476, .476, .476,1
Label:
text: root.zReadoutPos
color: .476, .476, .476,1
Label:
text: ' Vel : '
color: .476, .476, .476,1
Label:
text: root.ReadoutVel
color: .476, .476, .476,1
GridLayout:
cols: 1
Label:
text: "Percent Complete/Line:"
font_size: '11sp'
color: .476, .476, .476,1
Label:
text: root.percentComplete
color: .476, .476, .476,1
Label:
text: root.gcodeLineNumber
color: .476, .476, .476,1
Label:
text: root.gcodeVel
color: .476, .476, .476,1
Label:
text: root.connectionStatus
size_hint: None, None
width: dp(300)
height: dp(30)
disabled: False
color: .476, .476, .476,1
ScrollableLabel:
id: textconsole
size: dp(300), root.height - dp(430)
text: root.consoleText
size_hint: None, None
ScreenControls:
id: screenControls
size_hint: (1, 1)
<ViewMenu>:
cols:1
size: root.size
pos: root.pos
Label:
text: "View"
Button:
text: 'Open File'
on_press: root.openFile()
disabled: app.data.uploadFlag == 1
Button:
text: 'Update Gcode'
on_release: root.reloadGcode()
disabled: app.data.uploadFlag == 1
Button:
text: 'View Gcode'
disabled: False
on_press: root.show_gcode()
Button:
text: 'Clear Gcode'
disabled: False
on_press: root.clear_gcode()
Button:
text: 'Reset View'
disabled: False
on_press: app.frontpage.gcodecanvas.centerCanvas()
on_release: root.resetView()
<RunMenu>:
GridLayout:
cols: 1
size: root.size
pos: root.pos
Label:
text: "Run"
Button:
text: 'Quit Ground Control'
on_release: root.closeGC()
Button:
text: 'Return To Center'
on_release: root.returnToCenter()
#disabled: not app.data.connectionStatus
Button:
text: 'Zero Z'
disabled: True
Button:
text: 'Auto Zero Z'
disabled: True
<ScrollableLabel>:
Label:
size_hint_y: None
height: self.texture_size[1]
text_size: self.width, None
text: root.text
color: .476, .476, .476,1
<ConnectMenu>:
GridLayout:
cols: 1
size: root.size
pos: root.pos
Label:
text: "Connect"
Button:
text: 'Connect'
on_press: root.connect()
Spinner:
id: ports
text: "Ports"
values: root.COMports
on_text: root.setPort(ports.text)
Button:
text: 'Update List'
on_press: root.updatePorts()
<Diagnostics>:
GridLayout:
rows: 2
size: root.size
pos: root.pos
Label:
text: "Diagnostic features"
GridLayout:
cols: 3
#disabled: not app.data.connectionStatus
Button:
text: 'Test Motors/Encoders'
on_press: root.testMotors()
Button:
text: 'Calibrate'
on_release: root.calibrateMachine()
Button:
text: 'Set Chain Length - Automatic'
on_release: root.calibrateChainLengths()
Button:
text: 'Manual Calibration'
on_release: root.manualCalibration()
Button:
text: 'About'
on_release: root.about()
Spinner:
id: advancedOptions
text: "Advanced"
values: ["Set Chain Length - Manual", "Wipe EEPROM", "Simulation", "Load Calibration Benchmark Test", "Run Triangular Test Cut Pattern", "Reset settings to defaults", "Compute chain calibration factors"]
on_text: root.advancedOptionsFunctions(advancedOptions.text)
<OtherFeatures>:
connectmenu:connectmenu
viewmenu:viewmenu
diagnostics:diagnostics
runmenu:runmenu
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
padding:2
spacing:0
ViewMenu:
id: viewmenu
RunMenu:
id: runmenu
ConnectMenu:
id: connectmenu
BoxLayout:
orientation: 'vertical'
padding:2
spacing:0
Diagnostics:
id: diagnostics
Button:
text: "Close"
size_hint_y: .15
on_release: root.close()
<SoftwareSettings>:
<PositionIndicator>:
size: 50, 50
canvas:
Color:
rgb: root.color
Line:
circle:
(self.center_x-self.width/2, self.center_y-self.height/2, min(self.width, self.height)/ 2)
Line:
circle:
(self.center_x-self.width/2, self.center_y-self.height/2, self.positionErrorRadius)
Line:
circle:
(self.center_x-self.width/2, self.center_y-self.height/2, .5)
Line:
points: (self.x-self.width/2, self.y-self.height/2, self.width/2+self.x, self.height/2+self.y)
Line:
points: (self.x-self.width/2, self.height/2+self.y, self.width/2+self.x, self.y-self.height/2)
<NotificationPopup>:
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
ScrollableLabel:
text: root.text
BoxLayout:
size_hint_y: None
height: dp(60)
Button:
text: "Continue"
on_release: root.continueOn()
<ScrollableTextPopup>:
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
ScrollableLabel:
text: root.text
BoxLayout:
size_hint_y: None
height: dp(60)
Button:
text: "Close"
on_release: root.cancel()
<PageableTextPopup>:
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
ScrollableLabel:
text: root.text
BoxLayout:
size_hint_y: None
height: dp(30)
Button:
text: "Prev"
on_release: root.prev()
Button:
text: "Next"
on_release: root.next()
Button:
text: "Close"
on_release: root.cancel()
<SaveDialog>:
text_input: text_input
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
FileChooserListView:
id: filechooser
on_selection: text_input.text = self.selection and self.selection[0] or ''
TextInput:
id: text_input
size_hint_y: None
height: dp(30)
multiline: False
BoxLayout:
size_hint_y: None
height: dp(30)
Button:
text: "Cancel"
on_release: root.cancel()
Button:
text: "Save"
on_release: root.save(filechooser.path, text_input.text)
<TouchNumberInput>:
textInput:textInput
unitsBtn:unitsBtn
cols: 1
size: root.size
pos: root.pos
GridLayout:
cols: 2
size_hint_y:.25
TextInput:
size_hint_x:.8
font_size: self.height - 5
id:textInput
disabled: True
Button:
size_hint_x: .2
text: 'MM'
id: unitsBtn
on_release: root.switchUnits()
GridLayout:
cols: 3
Button:
text: "1"
on_release: root.addText("1")
Button:
text: "2"
on_release: root.addText("2")
Button:
text: "3"
on_release: root.addText("3")
Button:
text: "4"
on_release: root.addText("4")
Button:
text: "5"
on_release: root.addText("5")
Button:
text: "6"
on_release: root.addText("6")
Button:
text: "7"
on_release: root.addText("7")
Button:
text: "8"
on_release: root.addText("8")
Button:
text: "9"
on_release: root.addText("9")
Button:
text: "."
on_release: root.addText(".")
Button:
text: "0"
on_release: root.addText("0")
Button:
text: "Done"
on_release: root.done()
<ZAxisPopupContent>:
distBtn:distBtn
unitsBtn:unitsBtn
cols: 1
size: root.size
pos: root.pos
GridLayout:
cols: 3
GridLayout:
size_hint_x: ".75sp"
cols: 4
rows: 4
Label:
text: ""
size_hint_y: 0.2
Label:
size_hint_y: 0.2
Label:
text: "Relative"
size_hint_y: 0.2
Label:
text: "Absolute"
size_hint_y: 0.2
Button:
text: "%.3f"%app.data.zStepSizeVal
id: distBtn
on_release: root.setDist()
Button:
text: "MM"
on_release: root.units()
id: unitsBtn
Button:
text: "Raise"
on_release: root.zOut()
GridLayout:
cols:1
rows:2
Button:
text: "Plunge to\n-"+root.distBtn.text
halign: "center"
on_release: root.goThere()
Button:
text: "Save and\nRaise to\nTraverse"
halign: "center"
on_release: root.zUp()
Button:
text: "Done"
on_release: root.close()
GridLayout:
cols: 1
rows: 2
Button:
text: "Define Zero"
on_release: root.zero()
Button:
size_hint_y: 0.2
text: "Touch Zero"
on_release: root.touchZero()
disabled: False
Button:
text: "Lower"
on_release: root.zIn()
GridLayout:
cols:1
rows:2
Button:
text: "Go to Zero"
on_release: root.zToZero()
Button:
text: root.zCutLabel
halign: "center"
disabled: root.zPopDisable
on_release: root.zToCut()
Label:
text: ""
size_hint_y: 0.2
GridLayout:
size_hint_x: ".25sp"
cols: 1
rows: 1
Button:
text: "Stop!"
# font_size: '48sp'
# color: [1,0,0,1]
on_release: root.stopZMove()
#calibration widgets
<CalibrationTemplate>:
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: "Text about what to do in this step"
size_hint_x: leftCol
GridLayout:
cols: 2
Image:
source: "./Documentation/Calibrate Machine Dimensions/Set Z Height.jpg"
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Button:
text: "Thing one"
Button:
text: 'Thing two'
Label:
<CalibrationFrameWidget>:
cFrameWidgetSpace:cFrameWidgetSpace
cols: 1
size: root.size
pos: root.pos
GridLayout:
rows: 2
width: root.width
height: root.height
id: cFrameWidgetSpace
GridLayout:
cols: 3
size_hint_y: .1
Button:
text: "Back"
on_release: root.back()
Button:
text: "Skip"
on_release: root.loadNextStep()
Button:
text: "Quit"
on_release: root.on_Exit()
<SetChainLengthsFrameWidget>:
cFrameWidgetSpace:cFrameWidgetSpace
cols: 1
size: root.size
pos: root.pos
GridLayout:
rows: 2
width: root.width
height: root.height
id: cFrameWidgetSpace
GridLayout:
cols: 3
size_hint_y: .1
Button:
text: "Back"
on_release: root.back()
Button:
text: "Skip"
on_release: root.loadNextStep()
Button:
text: "Quit"
on_release: root.on_Exit()
<Intro>:
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: 'This walk-through will guide you through the process of calibrating your Maslow Machine. \n\nYou can move forward and backwards through the walk-through at any time using the Back and Skip buttons\n\nYou can also skip this process entirely and enter your machine dimensions in the Settings window\n\nYour feedback on how to improve this process is more than welcome\n\nClick Begin to start. '
text_size: self.size
valign: 'middle'
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Label:
text: 'The controls you will need for each step will be on here on the right'
text_size: self.size
Button:
text: "Begin"
on_release: root.finished()
Label:
<ChooseKinematicsType>:
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: "Now we're going to select the way the chains attach to the sled. There are currently two options. \n\nThe \"Quadrilateral\" system attaches the chains to the two stationary metal L brackets as shown in the left picture.\nThis is currently the default option. \n\nThe \"Triangular\" system attaches the chains to a system of either linkages or bearings which let the ends of the chains\nrotate around the router bit as shown in the picture on the right.\n\n Please choose an option on the right."
size_hint_x: leftCol
text_size: self.size
valign: 'middle'
GridLayout:
cols: 2
Image:
source: "./Documentation/Calibrate Machine Dimensions/Quadrilateral Kinematics.jpg"
Image:
source: "./Documentation/Calibrate Machine Dimensions/Triangular Kinematics.jpg"
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Button:
text: 'Quadrilateral'
on_release: root.setKinematicsTypeQuad()
Button:
text: 'Triangular'
on_release: root.setKinematicsTypeTri()
Label:
<ChooseChainOverSprocketDirection>:
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: "Now we're going to select the direction in which the chains pass over the sprocket.\n\nDo your chains come from the top of the sprocket and connect to the sled as shown in the picture on the left\nor come from the bottom of the sprocket to connect to the machine as shown in the picture on the right?"
size_hint_x: leftCol
text_size: self.size
valign: 'middle'
GridLayout:
cols: 2
Image:
source: "./Documentation/Calibrate Machine Dimensions/Chain off top.jpg"
Image:
source: "./Documentation/Calibrate Machine Dimensions/Chain off bottom.jpg"
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Button:
text: 'Top'
on_release: root.setChainToTop()
Button:
text: 'Bottom'
on_release: root.setChainToBottom()
Label:
<ComputeCalibrationSteps>
cols: 1
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: "The correct calibration procedure for your machine is being generated...please wait"
size_hint_x: leftCol
text_size: self.size
valign: 'middle'
GridLayout:
cols: 1
<RemoveChains>:
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: 'Now we need to remove the chains from the machine so that we can put them back on\nin the correct direction for your bottom feeding configuration.\n\nRemove the chain from the sprocket, then press Next'
text_size: self.size
valign: 'middle'
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Button:
text: "Next"
on_release: root.loadNextStep()
Label:
<ReviewMeasurements>:
cols: 2
width: root.width
height: root.height
measurementsReadout:measurementsReadout
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: ""
size_hint_x: leftCol
id: measurementsReadout
text_size: self.size
valign: 'middle'
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Button:
text: "Looks Good!"
on_release: root.loadNextStep()
Label:
<TriangularCalibration>:
cutBtnT:cutBtnT
horzMeasureT1:horzMeasureT1
horzMeasureT2:horzMeasureT2
vertMeasureT1:vertMeasureT1
bitDiameterT:bitDiameterT
enterValuesT:enterValuesT
unitsBtnT:unitsBtnT
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: "To refine these measurements we're going to cut a test shape. The test shape consists of five cuts.\n\nCuts 1 and 2 will be short vertical cuts in the upper left and right corners of the work area.\nCuts 3 and 4 will be short vertical cuts in the lower left and right corners of the work area.\nCut 5 will be a short horizontal cut attached to cut 2.\n\nBased on the distances between these cuts we can dial in the machine settings.\n\nFor the first measurement, measure from the left edge of cut 1 to the left edge of cut 2.\n\nFor the second measurement, measure from the left edge of cut 3 to the left edge of cut 4.\n\nFor the third measurement, measure from the top edge of the work area to the top edge of cut 5.\n\nEnter the diameter of the bit used to make the cuts (1/4\" = 6.35 mm).\n\nThe more accurate your measurements, the more accurate your machine will be.\n\nPress Cut Test Pattern to begin."
text_size: self.size
valign: 'middle'
GridLayout:
cols: 2
Image:
source: "./Documentation/Calibrate Machine Dimensions/Test Shape Preview Triangular.jpg"
size_hint_x: 0.5
Label:
text: root.triangularCalText
size_hint_x: 0.5
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Label:
text: "Measurement\nBetween Cuts 1 and 2:"
halign: "center"
TextInput:
id: horzMeasureT1
disabled: True
Label:
text: "Measurement\nBetween Cuts 3 and 4:"
halign: "center"
TextInput:
id: horzMeasureT2
disabled: True
Label:
text: "Measurement\nWork Area Top to Cut 5:"
halign: "center"
TextInput:
id: vertMeasureT1
disabled: True
Label:
text: "Bit Diameter:"
halign: "center"
TextInput:
id: bitDiameterT
disabled: False
Button:
text: "Units: mm"
on_release: root.switchUnitsT()
id: unitsBtnT
disabled: False
Button:
text: "Enter Values"
halign: "center"
on_release: root.enterTestPaternValuesTriangular()
id: enterValuesT
disabled: True
Button:
text: "Cut Test\nPattern"
halign: "center"
id: cutBtnT
on_release: root.cutTestPaternTriangular()
Button:
text: "Stop\nCut"
halign: "center"
on_release: root.stopCut()
background_color: (1,.2,.2,1)
Label:
<ComputeChainCorrectionFactors>:
selfText:selfText
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label:
text: "placeholder text"
id: selfText
text_size: self.size
valign: 'middle'
GridLayout:
cols: 1
size_hint_x: rightCol
Label:
Button:
text: "Looks\nGood"
halign: "center"
on_release: root.loadNextStep()
id: enterValues
Label:
<EnterDistanceBetweenMotors>:
motorsDist:motorsDist
unitsBtnT:unitsBtn
cols: 2
width: root.width
height: root.height
GridLayout:
cols: 1
size_hint_x: leftCol
Label: