Fix CUSTOM_COLOR,… (#3489)

* Fix CUSTOM_COLOR, also change to way setColor work to a more natural : lcd.setColor(CUSTOM_COLOR, RED)

* Remove _INDEX from TBS main to match the recent change to setColor
This commit is contained in:
3djc
2016-05-13 14:26:18 +02:00
committed by Bertrand Songis
parent 77888ae200
commit 24abad55ca
3 changed files with 31 additions and 27 deletions
+2 -2
View File
@@ -560,8 +560,8 @@ static int luaLcdDrawCombobox(lua_State *L)
static int luaLcdSetColor(lua_State *L)
{
if (!luaLcdAllowed) return 0;
int index = luaL_checkinteger(L, 1);
int color = luaL_checkinteger(L, 2);
unsigned int index = luaL_checkunsigned(L, 1) >> 16;
unsigned int color = luaL_checkunsigned(L, 2);
lcdColorTable[index] = color;
return 0;
}