making Lua overflow more obvious

This commit is contained in:
rusefillc 2024-02-27 22:23:54 -05:00
parent b2fce5aa1d
commit 978c537886
1 changed files with 7 additions and 3 deletions

View File

@ -180,9 +180,13 @@ public class LuaScriptPanel {
}
});
setText(newLua);
// and send to ECU (without burn!)
writeScriptToEcu();
if (newLua.length() >= Fields.LUA_SCRIPT_SIZE) {
setText(newLua.length() + " bytes would not fit sorry current limit " + Fields.LUA_SCRIPT_SIZE);
} else {
setText(newLua);
// and send to ECU (without burn!)
writeScriptToEcu();
}
} catch (IOException e) {
System.err.println("Error " + e);
}