-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChooChooChoo.vex
1 lines (1 loc) · 18 KB
/
ChooChooChoo.vex
1
./___ThIsisATemPoRaRyFiLE___.json 000666 000000 000000 0000040462 13427521643 017172 0 ustar 00 000000 000000 13427521643 13427521643 {"title":"ChooChooChoo","description":"I like trains...","version":"0.0.1","icon":"USER000x.bmp","competition":true,"files":{"robot-config.h":"dXNpbmcgbmFtZXNwYWNlIHZleDsKdmV4OjpicmFpbiBCcmFpbjsKdmV4Ojptb3RvciBUd29CYXIgKHZleDo6UE9SVDEsIHZleDo6Z2VhclNldHRpbmc6OnJhdGlvMThfMSx0cnVlKTsKdmV4Ojptb3RvciBGbHl3aGVlbDEgKHZleDo6UE9SVDksIHZleDo6Z2VhclNldHRpbmc6OnJhdGlvMThfMSx0cnVlKTsKdmV4Ojptb3RvciBGbHl3aGVlbDIgKHZleDo6UE9SVDEwLCB2ZXg6OmdlYXJTZXR0aW5nOjpyYXRpbzE4XzEsZmFsc2UpOwp2ZXg6Om1vdG9yIExvYWRlciAodmV4OjpQT1JUMTEsIHZleDo6Z2VhclNldHRpbmc6OnJhdGlvMThfMSxmYWxzZSk7CnZleDo6bW90b3IgTGVmdERyaXZlICh2ZXg6OlBPUlQxNCwgdmV4OjpnZWFyU2V0dGluZzo6cmF0aW8xOF8xLGZhbHNlKTsKdmV4Ojptb3RvciBSaWdodERyaXZlICh2ZXg6OlBPUlQxNSwgdmV4OjpnZWFyU2V0dGluZzo6cmF0aW8xOF8xLHRydWUpOwp2ZXg6Om1vdG9yIEludGFrZSAodmV4OjpQT1JUMTYsIHZleDo6Z2VhclNldHRpbmc6OnJhdGlvMThfMSxmYWxzZSk7CnZleDo6c29uYXIgQmFsbENoZWNrZXIoIEJyYWluLlRocmVlV2lyZVBvcnQuQyk7CnZleDo6Y29udHJvbGxlciBDb250cm9sbGVyMTsKdmV4Ojpjb21wZXRpdGlvbiBDb21wZXRpdGlvbjs=","main.cpp":"I2luY2x1ZGUgInJvY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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNlciBDb250cm9sIFRhc2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCgp2b2lkIHVzZXJjb250cm9sKCB2b2lkICkgewogICAgCiAgICB3aGlsZSh0cnVlKXsKICAgICAgCiAgICAgICAgY29sdW1uID0gZHJhd1RyYWluKGNvbHVtbik7IC8vIGRyYXcgdHJhaW4KICAgICAgICBjaGVja0xvYWRlcigpOyAvL3B1bGwgYmFsbHMgdXAgdG8gdG9wCiAgICAgICAgCiAgICAgICAgaWYoQ29udHJvbGxlcjEuQXhpczMudmFsdWUoKSA+IDEwKXsgLy80IGJhciBnb2luZyB1cAogICAgICAgICAgICBtb3ZlQXJtVXAoNSw0NSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoQ29udHJvbGxlcjEuQXhpczMudmFsdWUoKSA8IC0xMCl7IC8vNCBiYXIgZ29pbmcgZG93bgogICAgICAgICAgICBtb3ZlQXJtRG93big1LDQ1KTsKICAgICAgICB9ICAKICAgICAgICBlbHNlIGlmKENvbnRyb2xsZXIxLkF4aXMyLnZhbHVlKCkgPiAxNSl7IC8vZHJpdmUgZm9yd2FyZHMKICAgICAgICAgICAgbW92ZUZvcndhcmRzKDUsQ29udHJvbGxlcjEuQXhpczIudmFsdWUoKSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoQ29udHJvbGxlcjEuQXhpczIudmFsdWUoKSA8IC0xNSl7IC8vZHJpdmUgYmFja3dhcmRzCiAgICAgICAgICAgIG1vdmVCYWNrd2FyZHMoNSxDb250cm9sbGVyMS5BeGlzMi52YWx1ZSgpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZihDb250cm9sbGVyMS5BeGlzMS52YWx1ZSgpIDwgLTE1KXsgLy90dXJuIGxlZnQKICAgICAgICAgICAgdHVybkxlZnQoNSxDb250cm9sbGVyMS5BeGlzMS52YWx1ZSgpKTsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZihDb250cm9sbGVyMS5BeGlzMS52YWx1ZSgpID4gMTUpeyAvL3R1cm4gcmlnaHQKICAgICAgICAgICAgdHVyblJpZ2h0KDUsQ29udHJvbGxlcjEuQXhpczEudmFsdWUoKSk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoQ29udHJvbGxlcjEuQnV0dG9uQS5wcmVzc2luZygpID09IHRydWUpeyAvL2ZpcmUgYSBiYWxsCiAgICAgICAgICAgIGZseXdoZWVsU3RhdHVzID0gZmlyZUFCYWxsKCk7CiAgICAgICAgICAgIHRhc2s6OnNsZWVwKDMwMCk7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoQ29udHJvbGxlcjEuQnV0dG9uQi5wcmVzc2luZygpID09IHRydWUpeyAvL3R1cm5zIHRoZSBpbnRha2Ugb24gb3Igb2ZmCiAgICAgICAgICAgIGlmKGludGFrZVN0YXR1cyA9PSB0cnVlKXsKICAgICAgICAgICAgICAgIGludGFrZVN0YXR1cyA9IHR1cm5JbnRha2VPZmYoKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlewogICAgICAgICAgICAgICAgaW50YWtlU3RhdHVzID0gdHVybkludGFrZU9uKCk7ICAgICAgICAgICAgICAgIAogICAgICAgICAgICB9CiAgICAgICAgICAgIHRhc2s6OnNsZWVwKDMwMCk7IC8vcGFzdWUgdGhlIGZ1bmN0aW9uIHRvIHN0b3AgZG91YmxlIHByZXNzaW5nCiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoQ29udHJvbGxlcjEuQnV0dG9uWC5wcmVzc2luZygpKXsgLy9wbGFjZSBhIGNhcCBvbnRvIGEgcG9zdAogICAgICAgIC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AsdmVsb2NpdHlVbml0czo6cGN0KTsKICAgICAgICAgICAgCiAgICAgICAgICAgIC8vbW92ZSB0aGUgY2hhc3NpcyBhbmQgNCBiYXIKICAgICAgICAgICAgTGVmdERyaXZlLnNwaW4oZGlyZWN0aW9uVHlwZTo6ZndkKTsKICAgICAgICAgICAgUmlnaHREcml2ZS5zcGluKGRpcmVjdGlvblR5cGU6OmZ3ZCk7IAogICAgICAgICAgICBUd29CYXIuc3BpbihkaXJlY3Rpb25UeXBlOjpyZXYpOwogICAgICAgICAgICAgICAKICAgICAgICAgICAgLy9kZWxheSBmb3IgMjUwIG1pbGxpc2Vjb25kcwogICAgICAgICAgICB0YXNrOjpzbGVlcCgyNTApOwogICAgICAgICAgICAKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgZWxzZXsKICAgICAgICAgICAgaGFsdE1vdG9ycyhmbHl3aGVlbFN0YXR1cyxpbnRha2VTdGF0dXMpOwogICAgICAgIH0KICAgICAgICAKICAgfQp9CgoKLy8KLy8gTWFpbiB3aWxsIHNldCB1cCB0aGUgY29tcGV0aXRpb24gZnVuY3Rpb25zIGFuZCBjYWxsYmFja3MuCi8vCmludCBtYWluKCkgewogICAgCiAgICAvL1J1biB0aGUgcHJlLWF1dG9ub21vdXMgZnVuY3Rpb24uIAogICAgcHJlX2F1dG9uKCk7CiAgICAKICAgIC8vU2V0IHVwIGNhbGxiYWNrcyBmb3IgYXV0b25vbW91cyBhbmQgZHJpdmVyIGNvbnRyb2wgcGVyaW9kcy4KICAgIENvbXBldGl0aW9uLmF1dG9ub21vdXMoIGF1dG9ub21vdXMgKTsKICAgIENvbXBldGl0aW9uLmRyaXZlcmNvbnRyb2woIHVzZXJjb250cm9sICk7CgogICAgLy9QcmV2ZW50IG1haW4gZnJvbSBleGl0aW5nIHdpdGggYW4gaW5maW5pdGUgbG9vcC4gICAgICAgICAgICAgICAgICAgICAgICAKICAgIHdoaWxlKDEpIHsKICAgICAgdmV4Ojp0YXNrOjpzbGVlcCgxMDApOy8vU2xlZXAgdGhlIHRhc2sgZm9yIGEgc2hvcnQgYW1vdW50IG9mIHRpbWUgdG8gcHJldmVudCB3YXN0ZWQgcmVzb3VyY2VzLgogICAgfSAgICAKICAgICAgIAp9"},"device":{"slot":1,"type":"vexV5"},"language":{"name":"vc++"},"components":[{"name":"LeftDrive","class":"vex::motor","port":"14","left":736,"top":164,"type":"motor","data":{"gears":200,"reversed":false}},{"name":"RightDrive","class":"vex::motor","port":"15","left":861,"top":246,"type":"motor","data":{"gears":200,"reversed":true}},{"name":"Flywheel2","class":"vex::motor","port":"10","left":596,"top":427,"type":"motor","data":{"gears":200,"reversed":false}},{"name":"Intake","class":"vex::motor","port":"16","left":111,"top":238,"type":"motor","data":{"gears":200,"reversed":false}},{"name":"Flywheel1","class":"vex::motor","port":"9","left":470,"top":340,"type":"motor","data":{"gears":200,"reversed":true}},{"name":"Loader","class":"vex::motor","port":"11","left":228,"top":311,"type":"motor","data":{"gears":200,"reversed":false}},{"name":"Controller1","class":"vex::controller","left":466,"top":1,"type":"controller"},{"name":"BallChecker","class":"vex::sonar","port":"C","left":129,"top":471,"type":"sonar"},{"name":"BallChecker","class":"vex::sonar","port":"D","left":129,"top":471,"type":"sonar"},{"name":"TwoBar","class":"vex::motor","port":"1","left":640,"top":227,"type":"motor","data":{"gears":200,"reversed":true}}]}