Commit a8aa6cf8 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Expose new interface for Java and deprecate old

parent 94c46dc2
......@@ -35,8 +35,13 @@ public class AnalogIn extends IOChannel {
Moberg.analogInClose(index);
}
@Deprecated
public double get() throws IOChannelException {
return Moberg.analogIn(index);
}
public double read() throws IOChannelException {
return Moberg.analogIn(index);
}
}
......@@ -39,8 +39,13 @@ public class AnalogOut extends IOChannel {
Moberg.analogOutClose(index);
}
@Deprecated
public void set(double value) throws IOChannelException {
Moberg.analogOut(index, value);
}
public double write(double value) throws IOChannelException {
return Moberg.analogOut(index, value);
}
}
......@@ -37,8 +37,13 @@ public class DigitalIn extends IOChannel {
Moberg.digitalInClose(index);
}
@Deprecated
public boolean get() throws IOChannelException {
return Moberg.digitalIn(index);
}
public boolean read() throws IOChannelException {
return Moberg.digitalIn(index);
}
}
......@@ -36,8 +36,13 @@ public class DigitalOut extends IOChannel {
Moberg.digitalOutClose(index);
}
@Deprecated
public void set(boolean value) throws IOChannelException {
Moberg.digitalOut(index, value);
}
public boolean write(boolean value) throws IOChannelException {
return Moberg.digitalOut(index, value);
}
}
......@@ -37,8 +37,13 @@ public class EncoderIn extends IOChannel {
Moberg.encoderInClose(index);
}
@Deprecated
public long get() throws IOChannelException {
return Moberg.encoderIn(index);
}
public long read() throws IOChannelException {
return Moberg.encoderIn(index);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment