Fix typo in ADXL sim double creation (#2332)

Sets m_simY to the virtual Y acceleration.
This commit is contained in:
Vasista Vovveti
2020-02-04 22:15:25 -06:00
committed by GitHub
parent c165dc5e50
commit 29c82527a5
6 changed files with 12 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -98,7 +98,7 @@ public class ADXL345_I2C implements Accelerometer, Sendable, AutoCloseable {
if (m_simDevice != null) {
m_simRange = m_simDevice.createEnum("Range", true, new String[] {"2G", "4G", "8G", "16G"}, 0);
m_simX = m_simDevice.createDouble("X Accel", false, 0.0);
m_simX = m_simDevice.createDouble("Y Accel", false, 0.0);
m_simY = m_simDevice.createDouble("Y Accel", false, 0.0);
m_simZ = m_simDevice.createDouble("Z Accel", false, 0.0);
}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -89,7 +89,7 @@ public class ADXL345_SPI implements Accelerometer, Sendable, AutoCloseable {
if (m_simDevice != null) {
m_simRange = m_simDevice.createEnum("Range", true, new String[] {"2G", "4G", "8G", "16G"}, 0);
m_simX = m_simDevice.createDouble("X Accel", false, 0.0);
m_simX = m_simDevice.createDouble("Y Accel", false, 0.0);
m_simY = m_simDevice.createDouble("Y Accel", false, 0.0);
m_simZ = m_simDevice.createDouble("Z Accel", false, 0.0);
}
init(range);

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -97,7 +97,7 @@ public class ADXL362 implements Accelerometer, Sendable, AutoCloseable {
if (m_simDevice != null) {
m_simRange = m_simDevice.createEnum("Range", true, new String[] {"2G", "4G", "8G", "16G"}, 0);
m_simX = m_simDevice.createDouble("X Accel", false, 0.0);
m_simX = m_simDevice.createDouble("Y Accel", false, 0.0);
m_simY = m_simDevice.createDouble("Y Accel", false, 0.0);
m_simZ = m_simDevice.createDouble("Z Accel", false, 0.0);
}