1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Split IDE into 2 projects.

BEWARE: HIGHLY EXPERIMENTAL BRANCH
This commit is contained in:
Cristian Maglie
2014-09-23 17:31:46 +02:00
parent 2de206cccd
commit ba8eadeeb5
274 changed files with 5903 additions and 4826 deletions

View File

@ -0,0 +1,20 @@
package processing.app.linux;
import java.io.IOException;
import java.io.StringReader;
import java.util.Properties;
public class UDevAdmParser {
public String extractVIDAndPID(String output) throws IOException {
Properties properties = new Properties();
properties.load(new StringReader(output));
Object vid = properties.get("ID_VENDOR_ID");
Object pid = properties.get("ID_MODEL_ID");
if (vid == null || pid == null)
return null;
return ("0x" + vid + "_0x" + pid).toUpperCase();
}
}