Fixed drivetrain hall effects to use the dual hall effect setup.
diff --git a/bbb_cape/src/cape/data_struct.h b/bbb_cape/src/cape/data_struct.h
index debef38..4aa2a10 100644
--- a/bbb_cape/src/cape/data_struct.h
+++ b/bbb_cape/src/cape/data_struct.h
@@ -86,8 +86,10 @@
int32_t shooter_position, pusher_distal_posedge_position,
pusher_proximal_posedge_position;
- uint16_t left_drive_hall;
- uint16_t right_drive_hall;
+ uint16_t low_left_drive_hall;
+ uint16_t high_left_drive_hall;
+ uint16_t low_right_drive_hall;
+ uint16_t high_right_drive_hall;
uint16_t battery_voltage;
diff --git a/bbb_cape/src/cape/robot_comp.c b/bbb_cape/src/cape/robot_comp.c
index 57e3d66..ad4f45b 100644
--- a/bbb_cape/src/cape/robot_comp.c
+++ b/bbb_cape/src/cape/robot_comp.c
@@ -118,8 +118,10 @@
void robot_fill_packet(struct DataStruct *packet) {
packet->main.left_drive = encoder_read(6);
packet->main.right_drive = encoder_read(5);
- packet->main.left_drive_hall = analog_get(7);
- packet->main.right_drive_hall = analog_get(0);
+ packet->main.low_left_drive_hall = analog_get(7);
+ packet->main.low_right_drive_hall = analog_get(0);
+ packet->main.high_left_drive_hall = analog_get(6);
+ packet->main.high_right_drive_hall = analog_get(1);
packet->main.ultrasonic_pulse_length = ultrasonic_pulse_length;