don't lowercase console commands (#2664)
* don't lowercase commands * print bool lua results * lua memory command
This commit is contained in:
parent
13ecc35af7
commit
6cc7b0eeec
|
@ -159,6 +159,8 @@ void doInteractive(LuaHandle& ls) {
|
|||
efiPrintf(TAG "interactive returned number: %f", lua_tonumber(ls, -1));
|
||||
} else if (lua_isstring(ls, -1)) {
|
||||
efiPrintf(TAG "interactive returned string: '%s'", lua_tostring(ls, -1));
|
||||
} else if (lua_isboolean(ls, -1)) {
|
||||
efiPrintf(TAG "interactive returned bool: %s", lua_toboolean(ls, -1) ? "true" : "false");
|
||||
} else if (lua_isnil(ls, -1)) {
|
||||
efiPrintf(TAG "interactive returned nil.");
|
||||
} else {
|
||||
|
@ -248,6 +250,11 @@ void startLua() {
|
|||
|
||||
interactivePending = true;
|
||||
});
|
||||
|
||||
addConsoleAction("luamemory", [](){
|
||||
float pct = 100.0f * memoryUsed / LUA_HEAP_SIZE;
|
||||
efiPrintf("Lua memory: %d / %d bytes = %.1f%%", memoryUsed, LUA_HEAP_SIZE, pct);
|
||||
});
|
||||
}
|
||||
|
||||
#else // not EFI_UNIT_TEST
|
||||
|
|
|
@ -129,7 +129,7 @@ public class AnyCommand {
|
|||
listener.onSend();
|
||||
int timeout = CommandQueue.getTimeout(cmd);
|
||||
reentrant = true;
|
||||
uiContext.getCommandQueue().write(cmd.toLowerCase(), timeout);
|
||||
uiContext.getCommandQueue().write(cmd, timeout);
|
||||
reentrant = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue