From 9a91ae54d6304e1e16763a40f6c65e70e950f98d Mon Sep 17 00:00:00 2001 From: Thad House Date: Sun, 20 Nov 2016 20:32:52 -0800 Subject: [PATCH] Fixes incorrectly changed Java enums (#360) Some enums need a specific value when they get passed to JNI --- .../src/athena/java/edu/wpi/first/wpilibj/SerialPort.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/SerialPort.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/SerialPort.java index 6b36eae823..dd3ce9de51 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/SerialPort.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/SerialPort.java @@ -58,7 +58,7 @@ public class SerialPort { * Represents the number of stop bits to use for Serial Communication. */ public enum StopBits { - kOne(0), kOnePointFive(1), kTwo(2); + kOne(10), kOnePointFive(15), kTwo(20); @SuppressWarnings("MemberName") public final int value; @@ -72,7 +72,7 @@ public class SerialPort { * Represents what type of flow control to use for serial communication. */ public enum FlowControl { - kNone(0), kXonXoff(1), kRtsCts(2), kDtsDsr(3); + kNone(0), kXonXoff(1), kRtsCts(2), kDtsDsr(4); @SuppressWarnings("MemberName") public final int value; @@ -86,7 +86,7 @@ public class SerialPort { * Represents which type of buffer mode to use when writing to a serial m_port. */ public enum WriteBufferMode { - kFlushOnAccess(0), kFlushWhenFull(1); + kFlushOnAccess(1), kFlushWhenFull(2); @SuppressWarnings("MemberName") public final int value;