testSimId.lua 210 B

1234567891011
  1. module(...,package.seeall)
  2. require"sim"
  3. sys.taskInit(function()
  4. sys.wait(10000)
  5. sim.setId(sim.getId()==0 and 1 or 0, function(result)
  6. if result then sys.restart("simcross") end
  7. end)
  8. end)