Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 1 | package(default_visibility = ['//visibility:public']) |
| 2 | |
| 3 | load('/aos/build/queues', 'queue_library') |
| 4 | |
| 5 | cc_binary( |
Brian Silverman | 3505ef9 | 2015-12-12 17:23:38 -0500 | [diff] [blame] | 6 | name = 'replay_drivetrain', |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 7 | srcs = [ |
| 8 | 'replay_drivetrain.cc', |
| 9 | ], |
| 10 | deps = [ |
| 11 | ':drivetrain_queue', |
| 12 | '//aos/common/controls:replay_control_loop', |
| 13 | '//aos/linux_code:init', |
| 14 | ], |
| 15 | ) |
| 16 | |
| 17 | queue_library( |
| 18 | name = 'drivetrain_queue', |
| 19 | srcs = [ |
| 20 | 'drivetrain.q', |
| 21 | ], |
| 22 | deps = [ |
| 23 | '//aos/common/controls:control_loop_queues', |
| 24 | ], |
| 25 | ) |
| 26 | |
| 27 | cc_library( |
| 28 | name = 'polydrivetrain_plants', |
| 29 | srcs = [ |
| 30 | 'polydrivetrain_dog_motor_plant.cc', |
| 31 | 'drivetrain_dog_motor_plant.cc', |
| 32 | 'polydrivetrain_cim_plant.cc', |
| 33 | ], |
| 34 | hdrs = [ |
| 35 | 'polydrivetrain_dog_motor_plant.h', |
| 36 | 'drivetrain_dog_motor_plant.h', |
| 37 | 'polydrivetrain_cim_plant.h', |
| 38 | ], |
| 39 | deps = [ |
| 40 | '//frc971/control_loops:state_feedback_loop', |
| 41 | ], |
| 42 | ) |
| 43 | |
Campbell Crowley | 9c3ecfd | 2015-12-31 17:04:30 -0800 | [diff] [blame^] | 44 | genrule( |
| 45 | name = 'genrule_drivetrain', |
| 46 | visibility = ['//visibility:private'], |
| 47 | cmd = '$(location //y2014_bot3/control_loops/python:drivetrain) $(OUTS)', |
| 48 | tools = [ |
| 49 | '//y2014_bot3/control_loops/python:drivetrain', |
| 50 | ], |
| 51 | outs = [ |
| 52 | 'drivetrain_dog_motor_plant.h', |
| 53 | 'drivetrain_dog_motor_plant.cc', |
| 54 | ], |
| 55 | ) |
| 56 | |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 57 | cc_library( |
| 58 | name = 'drivetrain_lib', |
| 59 | hdrs = [ |
| 60 | 'drivetrain.h', |
| 61 | ], |
| 62 | srcs = [ |
| 63 | 'drivetrain.cc', |
| 64 | ], |
| 65 | deps = [ |
| 66 | ':polydrivetrain_plants', |
| 67 | ':drivetrain_queue', |
| 68 | '//aos/common/controls:control_loop', |
| 69 | '//aos/common/controls:polytope', |
| 70 | '//frc971/control_loops:state_feedback_loop', |
| 71 | '//frc971/control_loops:coerce_goal', |
| 72 | '//frc971/queues:gyro', |
| 73 | '//aos/common/logging:queue_logging', |
| 74 | '//aos/common/logging:matrix_logging', |
| 75 | '//aos/common:math', |
| 76 | '//aos/common/util:log_interval', |
| 77 | '//frc971:shifter_hall_effect', |
| 78 | ], |
| 79 | ) |
| 80 | |
| 81 | cc_test( |
| 82 | name = 'drivetrain_lib_test', |
| 83 | srcs = [ |
| 84 | 'drivetrain_lib_test.cc', |
| 85 | ], |
| 86 | deps = [ |
| 87 | '//aos/testing:googletest', |
| 88 | ':drivetrain_queue', |
| 89 | ':drivetrain_lib', |
| 90 | '//aos/common/controls:control_loop_test', |
| 91 | '//frc971/control_loops:state_feedback_loop', |
| 92 | '//frc971/queues:gyro', |
| 93 | '//aos/common:queues', |
| 94 | '//aos/common/network:team_number', |
| 95 | ], |
| 96 | ) |
| 97 | |
| 98 | cc_binary( |
Brian Silverman | 3505ef9 | 2015-12-12 17:23:38 -0500 | [diff] [blame] | 99 | name = 'drivetrain', |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 100 | srcs = [ |
| 101 | 'drivetrain_main.cc', |
| 102 | ], |
| 103 | deps = [ |
| 104 | ':drivetrain_lib', |
| 105 | ':drivetrain_queue', |
| 106 | '//aos/linux_code:init', |
| 107 | ], |
| 108 | ) |