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