Skip to content

Commit

Permalink
Update lua.h
Browse files Browse the repository at this point in the history
  • Loading branch information
LKosoj committed Oct 9, 2022
1 parent 844c885 commit d9be7a3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static int lua_wrapper_pinMode(lua_State *lua_state) {
vTaskDelay(5 / portTICK_PERIOD_MS);
int a = luaL_checkinteger(lua_state, 1);
int b = luaL_checkinteger(lua_state, 2);
if (a == RELE_CHANNEL1 || a == RELE_CHANNEL4 || a == RELE_CHANNEL3 || a == RELE_CHANNEL2 || a == LUA_PIN || WATER_PUMP_PIN) pinMode(a, b);
if (a == RELE_CHANNEL1 || a == RELE_CHANNEL4 || a == RELE_CHANNEL3 || a == RELE_CHANNEL2 || a == LUA_PIN) pinMode(a, b);
return 0;
}

Expand All @@ -73,11 +73,9 @@ static int lua_wrapper_digitalWrite(lua_State *lua_state) {
else {
#ifdef USE_WATER_PUMP
if (b == LOW) {
//WriteConsoleLog("0");
pump_pwm.write(0);
}
else {
//WriteConsoleLog("1");
pump_pwm.write(1023);
}
#else
Expand Down

0 comments on commit d9be7a3

Please sign in to comment.