Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 committed Mar 31, 2024
1 parent c3d3677 commit 2361a2f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 35 deletions.
30 changes: 15 additions & 15 deletions wpilibc/src/main/native/include/frc/simulation/LinearSystemSim.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,6 @@ class LinearSystemSim {
*/
double GetOutput(int row) const { return m_y(row); }

/**
* Returns the current input of the plant.
*
* @return The current input of the plant.
*/
const Vectord<Outputs>& GetInput() const { return m_u; }

/**
* Returns an element of the current input of the plant.
*
* @param row The row to return.
* @return An element of the current input of the plant.
*/
double GetInput(int row) const { return m_u(row); }

/**
* Sets the system inputs (usually voltages).
*
Expand All @@ -114,6 +99,21 @@ class LinearSystemSim {
ClampInput(m_u);
}

/**
* Returns the current input of the plant.
*
* @return The current input of the plant.
*/
const Vectord<Outputs>& GetInput() const { return m_u; }

/**
* Returns an element of the current input of the plant.
*
* @param row The row to return.
* @return An element of the current input of the plant.
*/
double GetInput(int row) const { return m_u(row); }

/**
* Sets the system state.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,33 +106,13 @@ public double getOutput(int row) {
return m_y.get(row, 0);
}

/**
* Returns the current input of the plant.
*
* @return The current input of the plant.
*/
public Matrix<Inputs, N1> getInput() {
return m_u;
}

/**
* Returns an element of the current input of the plant.
*
* @param row The row to return.
* @return An element of the current input of the plant.
*/
public double getInput(int row) {
return m_u.get(row, 0);
}

/**
* Sets the system inputs (usually voltages).
*
* @param u The system inputs.
*/
public void setInput(Matrix<Inputs, N1> u) {
this.m_u = clampInput(u);
m_u = clampInput(m_u);
}

/**
Expand Down Expand Up @@ -160,6 +140,25 @@ public void setInput(double... u) {
m_u = clampInput(m_u);
}

/**
* Returns the current input of the plant.
*
* @return The current input of the plant.
*/
public Matrix<Inputs, N1> getInput() {
return m_u;
}

/**
* Returns an element of the current input of the plant.
*
* @param row The row to return.
* @return An element of the current input of the plant.
*/
public double getInput(int row) {
return m_u.get(row, 0);
}

/**
* Sets the system state.
*
Expand Down

0 comments on commit 2361a2f

Please sign in to comment.