Skip to content

Commit 48e2567

Browse files
committed
add hardware header file
1 parent f23fb3e commit 48e2567

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

include/hardware/Motor/MotorGroup.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class MotorGroup : public Encoder {
3838
* }
3939
* @endcode
4040
*/
41-
MotorGroup(std::initializer_list<ReversibleSmartPort> ports, AngularVelocity outputVelocity);
41+
MotorGroup(const std::initializer_list<ReversibleSmartPort>& ports, AngularVelocity outputVelocity);
4242
/**
4343
* @brief MotorGroup copy constructor
4444
*

include/hardware/hardware.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
// don't worry about seemingly missing includes. They are included
4+
5+
#include "hardware/Encoder/ADIEncoder.hpp"
6+
#include "hardware/Encoder/V5RotationSensor.hpp"
7+
#include "hardware/IMU/V5InertialSensor.hpp"
8+
#include "hardware/Motor/MotorGroup.hpp"

src/hardware/Motor/MotorGroup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <mutex>
1111

1212
namespace lemlib {
13-
MotorGroup::MotorGroup(std::initializer_list<ReversibleSmartPort> ports, AngularVelocity outputVelocity)
13+
MotorGroup::MotorGroup(const std::initializer_list<ReversibleSmartPort>& ports, AngularVelocity outputVelocity)
1414
: m_outputVelocity(outputVelocity) {
1515
for (const auto port : ports) { m_motors.push_back({.port = port, .connectedLastCycle = true, .offset = 0_stDeg}); }
1616
}

0 commit comments

Comments
 (0)