Przeglądaj źródła

Change how enter in remote mode is checked, update firmware

Fabio Battaglia 4 lat temu
rodzic
commit
3d7eff106f

+ 1 - 1
README.md

@@ -7,7 +7,7 @@ It uses the board's *REMOTE CONTROL* mode to remotely toggle the pins and read t
 
 Please, spend some time to read how the [Black Box Analysis](docs/Black_Box_Analysis.md) works and [how to handle recovered equations](docs/Minimize_Equations_with_feedbacks.md) that don't seem to fit a new PAL.
 
-**WARNING:** Currently, PALs that feeds the output of an equation back into the equation itself are **NOT** supported.
+**WARNING:** Currently, PALs that feeds the output of an equation back into the equation itself are **NOT** supported by the analisys algorithm.
 Example:
 
 ```text

+ 2 - 2
src/main/java/info/hkzlab/dupal/analyzer/board/boardio/DuPALManager.java

@@ -62,7 +62,7 @@ public class DuPALManager {
     private void purgeRX() {
         if(serport != null && serport.isOpened()) {
             while(true) {
-                try { serport.readString(10, 100); }
+                try { serport.readString(50, 200); }
                 catch (SerialPortTimeoutException | SerialPortException e) { break; }
             }
         }
@@ -125,7 +125,7 @@ public class DuPALManager {
                 final String response = serport.readString();
 
                 if ((response != null)) {
-                    if (response.trim().equals(REMOTE_MODE_STRING))
+                    if (response.trim().endsWith(REMOTE_MODE_STRING))
                         return true;
                     else
                         return false;