Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scenario panique
#13
Je reviens sur ce post car je n'ai toujours pas reussi a tester la valeur d'un timer dans un script LUA.  Il ne me manque que ca pour que ca marche !

Alors voila mon probleme qui est facilement repetable avec le simple script ci-dessous.  Le bloc IF devrait toujours etre execute mais ca n'est pas le cas.

Code:
local timer_id = "input_58" -- InputTimer type
local timer = calaos:getInputValue(timer_id)
print("TEST TIMER: timer = " .. tostring(timer))

if timer == false or timer == true then
    print("TEST TIMER: OK")
    return true
end

print("TEST TIMER: NOT OK")
return false

Le log montre bien que le timer est true mais montre aussi que le bloc IF n'est pas execute. Comment est-ce possible ? Huh

Code:
Jul 24 23:37:10 raspberrypi calaos_server[993]: INF<993>:calaos_script.lua LuaScript/ScriptBindings.cpp:88 int Calaos::Lua_print(lua_State*)() LuaPrint: TEST TIMER: timer = true
Jul 24 23:37:10 raspberrypi calaos_server[993]: INF<993>:calaos_script.lua LuaScript/ScriptBindings.cpp:88 int Calaos::Lua_print(lua_State*)() LuaPrint: TEST TIMER: NOT OK
  calaos-os-raspberrypi2-v3.0-alpha6-14-g341535a-2021-01-17 on Raspberry Pi 2 ▶ Wago_2.2/wago_881.pro on Wago 750-881 ▶ DS18B20 sensors on Pi GPIO ▶ Node-RED









Reply


Messages In This Thread
Scenario panique - by mifrey - 02-16-2016, 03:29 PM
RE: Scenario panique - by Arnaud - 02-17-2016, 09:03 AM
RE: Scenario panique - by mifrey - 02-18-2016, 01:44 PM
RE: Scenario panique - by mifrey - 02-22-2016, 01:42 PM
RE: Scenario panique - by diouk - 02-22-2016, 04:15 PM
RE: Scenario panique - by Arnaud - 02-23-2016, 09:10 AM
RE: Scenario panique - by raoulh - 02-23-2016, 10:15 AM
RE: Scenario panique - by mifrey - 02-27-2016, 01:33 PM
RE: Scenario panique - by raoulh - 02-28-2016, 10:20 AM
RE: Scenario panique - by diouk - 02-28-2016, 12:40 PM
RE: Scenario panique - by mifrey - 02-28-2016, 01:38 PM
RE: Scenario panique - by raoulh - 02-29-2016, 09:33 AM
RE: Scenario panique - by mifrey - 07-24-2016, 11:52 PM
RE: Scenario panique - by raoulh - 07-25-2016, 08:47 AM
RE: Scenario panique - by mifrey - 07-25-2016, 12:39 PM
RE: Scenario panique - by raoulh - 07-25-2016, 01:28 PM
RE: Scenario panique - by mifrey - 07-25-2016, 03:01 PM
RE: Scenario panique - by raoulh - 07-25-2016, 03:17 PM
RE: Scenario panique - by mifrey - 07-26-2016, 11:21 AM
RE: Scenario panique - by mifrey - 07-28-2016, 02:15 PM
RE: Scenario panique - by raoulh - 07-26-2016, 11:58 AM
RE: Scenario panique - by mifrey - 07-27-2016, 12:48 PM
RE: Scenario panique - by raoulh - 07-28-2016, 04:18 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)