Created
March 28, 2020 16:40
-
-
Save ctkqiang/fe4cf171a853e07e1606852d33fb438d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Guys I have Some issue: | |
E/AndroidRuntime: FATAL EXCEPTION: main | |
Process: my.kylogger.johnmelodyme.iot.embedded.serialcommunicationuart, PID: 11607 | |
java.lang.IllegalStateException: Could not execute method for android:onClick | |
My Source : | |
public void OpenSerial(View view){ | |
String baudtext = Baud.getSelectedItem().toString(); | |
switch (baudtext) { | |
case "300 baud": | |
physicaloid.setBaudrate(300); | |
break; | |
case "1200 baud": | |
physicaloid.setBaudrate(1200); | |
break; | |
case "2400 baud": | |
physicaloid.setBaudrate(2400); | |
break; | |
case "4800 baud": | |
physicaloid.setBaudrate(4800); | |
break; | |
case "9600 baud": | |
physicaloid.setBaudrate(9600); | |
break; | |
case "19200 baud": | |
physicaloid.setBaudrate(19200); | |
break; | |
case "38400 baud": | |
physicaloid.setBaudrate(38400); | |
break; | |
case "576600 baud": | |
physicaloid.setBaudrate(576600); | |
break; | |
case "7448800 baud": | |
physicaloid.setBaudrate(744880); | |
break; | |
case "115200 baud": | |
physicaloid.setBaudrate(115200); | |
break; | |
case "230400 baud": | |
physicaloid.setBaudrate(230400); | |
break; | |
case "250000 baud": | |
physicaloid.setBaudrate(250000); | |
break; | |
default: | |
physicaloid.setBaudrate(9600); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment