Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 1 | package(default_visibility = ['//visibility:public']) |
| 2 | |
| 3 | load('/aos/build/queues', 'queue_library') |
| 4 | |
| 5 | cc_binary( |
| 6 | name = 'replay_drivetrain', |
| 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 | '//frc971/queues:gyro', |
| 15 | ], |
| 16 | ) |
| 17 | |
| 18 | queue_library( |
| 19 | name = 'drivetrain_queue', |
| 20 | srcs = [ |
| 21 | 'drivetrain.q', |
| 22 | ], |
| 23 | deps = [ |
| 24 | '//aos/common/controls:control_loop_queues', |
Austin Schuh | edbb64f | 2016-03-19 01:18:09 -0700 | [diff] [blame] | 25 | '//frc971/control_loops:queues', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 26 | ], |
| 27 | ) |
| 28 | |
| 29 | cc_library( |
| 30 | name = 'drivetrain_config', |
| 31 | hdrs = [ |
| 32 | 'drivetrain_config.h', |
| 33 | ], |
| 34 | deps = [ |
| 35 | '//frc971/control_loops:state_feedback_loop', |
| 36 | '//frc971:shifter_hall_effect', |
| 37 | ], |
| 38 | ) |
| 39 | |
| 40 | cc_library( |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 41 | name = 'gear', |
| 42 | hdrs = [ |
| 43 | 'gear.h', |
| 44 | ], |
| 45 | ) |
| 46 | |
| 47 | cc_library( |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 48 | name = 'ssdrivetrain', |
| 49 | srcs = [ |
| 50 | 'ssdrivetrain.cc', |
| 51 | ], |
| 52 | hdrs = [ |
| 53 | 'ssdrivetrain.h', |
| 54 | ], |
| 55 | deps = [ |
| 56 | ':drivetrain_queue', |
| 57 | ':drivetrain_config', |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 58 | ':gear', |
| 59 | '//aos/common/controls:control_loop', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 60 | '//aos/common/controls:polytope', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 61 | '//aos/common/logging:matrix_logging', |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 62 | '//aos/common/logging:queue_logging', |
| 63 | '//aos/common/messages:robot_state', |
| 64 | '//aos/common/util:log_interval', |
| 65 | '//aos/common/util:trapezoid_profile', |
| 66 | '//aos/common:math', |
| 67 | '//frc971/control_loops:coerce_goal', |
| 68 | '//frc971/control_loops:state_feedback_loop', |
| 69 | '//frc971:shifter_hall_effect', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 70 | ], |
| 71 | ) |
| 72 | |
| 73 | cc_library( |
| 74 | name = 'polydrivetrain', |
| 75 | srcs = [ |
| 76 | 'polydrivetrain.cc', |
| 77 | ], |
| 78 | hdrs = [ |
| 79 | 'polydrivetrain.h', |
| 80 | ], |
| 81 | deps = [ |
| 82 | ':drivetrain_queue', |
| 83 | ':drivetrain_config', |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 84 | ':gear', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 85 | '//aos/common/controls:polytope', |
| 86 | '//aos/common:math', |
| 87 | '//aos/common/messages:robot_state', |
| 88 | '//frc971/control_loops:state_feedback_loop', |
| 89 | '//frc971/control_loops:coerce_goal', |
| 90 | '//aos/common/util:log_interval', |
| 91 | '//aos/common/logging:queue_logging', |
| 92 | '//aos/common/logging:matrix_logging', |
| 93 | ], |
| 94 | ) |
| 95 | |
| 96 | cc_library( |
| 97 | name = 'drivetrain_lib', |
| 98 | srcs = [ |
| 99 | 'drivetrain.cc', |
| 100 | ], |
| 101 | hdrs = [ |
| 102 | 'drivetrain.h', |
| 103 | ], |
| 104 | deps = [ |
| 105 | ':drivetrain_queue', |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 106 | ':gear', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 107 | ':polydrivetrain', |
| 108 | ':ssdrivetrain', |
| 109 | '//aos/common/controls:control_loop', |
| 110 | '//frc971/queues:gyro', |
| 111 | '//aos/common/util:log_interval', |
| 112 | '//aos/common/logging:queue_logging', |
| 113 | '//aos/common/logging:matrix_logging', |
| 114 | ], |
| 115 | ) |
| 116 | |
| 117 | cc_test( |
| 118 | name = 'drivetrain_lib_test', |
| 119 | srcs = [ |
| 120 | 'drivetrain_lib_test.cc', |
| 121 | ], |
| 122 | deps = [ |
| 123 | '//aos/testing:googletest', |
| 124 | ':drivetrain_queue', |
| 125 | ':drivetrain_lib', |
| 126 | ':drivetrain_config', |
| 127 | '//aos/common/controls:control_loop_test', |
| 128 | '//frc971/control_loops:state_feedback_loop', |
| 129 | '//frc971/queues:gyro', |
| 130 | '//aos/common:queues', |
Comran Morshed | baf5784 | 2016-02-17 20:58:53 +0000 | [diff] [blame] | 131 | '//y2016:constants', |
| 132 | '//y2016/control_loops/drivetrain:polydrivetrain_plants', |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 133 | ], |
| 134 | ) |