Name big motor controller files appropriately
These won't be shared with fet12, little, or any future motor
controllers, so give them unique names.
Change-Id: I9e1cadea16792e676744f4fd39d68bbf82ed15b5
diff --git a/motors/BUILD b/motors/BUILD
index 0a63da0..50a4bce 100644
--- a/motors/BUILD
+++ b/motors/BUILD
@@ -1,23 +1,6 @@
load("//motors:macros.bzl", "hex_from_elf")
load("//tools:environments.bzl", "mcu_cpus")
-cc_binary(
- name = "medium_salsa.elf",
- srcs = [
- "medium_salsa.cc",
- ],
- restricted_to = mcu_cpus,
- deps = [
- ":motor",
- ":motor_controls",
- ":util",
- "//motors/core",
- "//motors/peripheral:adc",
- "//motors/peripheral:can",
- "//motors/usb:legacy",
- ],
-)
-
cc_library(
name = "motor",
srcs = [
@@ -39,11 +22,6 @@
],
)
-hex_from_elf(
- name = "medium_salsa",
- restricted_to = mcu_cpus,
-)
-
cc_library(
name = "util",
hdrs = [
@@ -122,23 +100,6 @@
],
)
-cc_library(
- name = "motor_controls",
- srcs = [
- "motor_controls.cc",
- ],
- hdrs = [
- "motor_controls.h",
- ],
- restricted_to = mcu_cpus,
- deps = [
- ":math",
- ":motor",
- "//motors/peripheral:configuration",
- "//third_party/eigen",
- ],
-)
-
cc_binary(
name = "button_board.elf",
srcs = [
diff --git a/motors/big/BUILD b/motors/big/BUILD
new file mode 100644
index 0000000..8ce81f1
--- /dev/null
+++ b/motors/big/BUILD
@@ -0,0 +1,41 @@
+load("//motors:macros.bzl", "hex_from_elf")
+load("//tools:environments.bzl", "mcu_cpus")
+
+cc_binary(
+ name = "medium_salsa.elf",
+ srcs = [
+ "medium_salsa.cc",
+ ],
+ restricted_to = mcu_cpus,
+ deps = [
+ ":motor_controls",
+ "//motors:motor",
+ "//motors:util",
+ "//motors/core",
+ "//motors/peripheral:adc",
+ "//motors/peripheral:can",
+ "//motors/usb:legacy",
+ ],
+)
+
+hex_from_elf(
+ name = "medium_salsa",
+ restricted_to = mcu_cpus,
+)
+
+cc_library(
+ name = "motor_controls",
+ srcs = [
+ "motor_controls.cc",
+ ],
+ hdrs = [
+ "motor_controls.h",
+ ],
+ restricted_to = mcu_cpus,
+ deps = [
+ "//motors:math",
+ "//motors:motor",
+ "//motors/peripheral:configuration",
+ "//third_party/eigen",
+ ],
+)
diff --git a/motors/medium_salsa.cc b/motors/big/medium_salsa.cc
similarity index 99%
rename from motors/medium_salsa.cc
rename to motors/big/medium_salsa.cc
index 0b9d89d..dc9d0a8 100644
--- a/motors/medium_salsa.cc
+++ b/motors/big/medium_salsa.cc
@@ -4,9 +4,9 @@
#include <atomic>
+#include "motors/big/motor_controls.h"
#include "motors/core/time.h"
#include "motors/motor.h"
-#include "motors/motor_controls.h"
#include "motors/peripheral/adc.h"
#include "motors/peripheral/can.h"
#include "motors/usb/usb_serial.h"
diff --git a/motors/motor_controls.cc b/motors/big/motor_controls.cc
similarity index 99%
rename from motors/motor_controls.cc
rename to motors/big/motor_controls.cc
index 029f98d..6a625bf 100644
--- a/motors/motor_controls.cc
+++ b/motors/big/motor_controls.cc
@@ -1,4 +1,4 @@
-#include "motors/motor_controls.h"
+#include "motors/big/motor_controls.h"
#include "motors/peripheral/configuration.h"
diff --git a/motors/motor_controls.h b/motors/big/motor_controls.h
similarity index 100%
rename from motors/motor_controls.h
rename to motors/big/motor_controls.h
diff --git a/motors/python/BUILD b/motors/python/BUILD
index 299f4d2..408f3cd 100644
--- a/motors/python/BUILD
+++ b/motors/python/BUILD
@@ -1,7 +1,7 @@
py_binary(
- name = "phase_current",
+ name = "big_phase_current",
srcs = [
- "phase_current.py",
+ "big_phase_current.py",
],
restricted_to = ["//tools:k8"],
deps = [
diff --git a/motors/python/phase_current.py b/motors/python/big_phase_current.py
similarity index 100%
rename from motors/python/phase_current.py
rename to motors/python/big_phase_current.py