File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
javasdk/NRSDK/src/com/neuronrobotics/sdk/dyio Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -400,10 +400,10 @@ public int getValue() {
400400 val = new DyIOChannelEvent (this ,bl ).getValue ();
401401 }else {
402402 Object [] args =getDevice ().send ("bcs.io.*;0.3;;" ,
403- BowlerMethod .POST ,
403+ BowlerMethod .GET ,
404404 "gchv" ,
405405 new Object []{number });
406- val =(Integer )args [0 ];
406+ val =(Integer )args [1 ];
407407 }
408408 setCachedValue (val );
409409 setPreviousValue (val );
@@ -806,8 +806,7 @@ private boolean isOutputMode( DyIOChannelMode m) {
806806 */
807807
808808 public boolean setValue (ByteList data ) {
809- if (!isStreamChannel ())
810- throw new RuntimeException ("Only stream channels should talk to this method" );
809+
811810 if (getDevice ().isLegacyParser ()){
812811 int attempts = MAXATTEMPTS ;
813812 if (getMode () == DyIOChannelMode .USART_RX ||getMode () == DyIOChannelMode .USART_TX )
@@ -825,6 +824,8 @@ public boolean setValue(ByteList data) {
825824 }
826825 }
827826 }else {
827+ if (!isStreamChannel ())
828+ throw new RuntimeException ("Only stream channels should talk to this method" );
828829 getDevice ().send ("bcs.io.*;0.3;;" ,
829830 BowlerMethod .POST ,
830831 "strm" ,
You can’t perform that action at this time.
0 commit comments