public class Wayang extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DISPLAY_HEIGHT
The height of the display, in pixels.
|
static int |
DISPLAY_WIDTH
The width of the display, in pixels.
|
| Constructor and Description |
|---|
Wayang() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close()
Close the Push 2 interface if it is open, and shut down our LibUsb context if it is active.
|
static BufferedImage |
open()
Set up a connection to libusb, find the Push 2, and open its display interface.
|
static void |
sendFrame()
Send a frame of pixels, corresponding to whatever has been drawn in the image returned by open(),
to the display.
|
static void |
sendFrameAsync()
Send a frame of pixels asynchronously, corresponding to whatever has been drawn in the image returned by open(),
to the display.
|
public static final int DISPLAY_WIDTH
public static final int DISPLAY_HEIGHT
public static void close()
public static BufferedImage open()
org.usb4java.LibUsbException - if there is a problem communicating with the USB environment.IllegalStateException - if no Push 2 can be found.public static void sendFrame()
org.usb4java.LibUsbException - if there is a problem communicating.IllegalStateException - if the Push 2 has not been opened.public static void sendFrameAsync()
org.usb4java.LibUsbException - if there is a problem communicating.IllegalStateException - if the Push 2 has not been opened.Copyright © 2016. All rights reserved.