2021-10-01 00:21:50 +08:00
|
|
|
import PikaStdLib
|
|
|
|
import PikaStdDevice
|
2021-12-13 21:24:48 +08:00
|
|
|
import PikaStdData
|
2022-01-24 19:08:33 +08:00
|
|
|
import GTestTask
|
2021-10-11 19:43:21 +08:00
|
|
|
import PikaMath
|
2021-10-01 00:21:50 +08:00
|
|
|
from PikaObj import *
|
2022-01-24 19:08:33 +08:00
|
|
|
|
|
|
|
|
2022-01-20 18:14:22 +08:00
|
|
|
def todo1():
|
|
|
|
print('task 1 running...')
|
2021-10-01 00:21:50 +08:00
|
|
|
|
2022-01-24 19:08:33 +08:00
|
|
|
|
2022-01-20 18:14:22 +08:00
|
|
|
def todo2():
|
|
|
|
print('task 2 running...')
|
2022-01-10 21:14:29 +08:00
|
|
|
|
2022-01-24 19:08:33 +08:00
|
|
|
|
2022-01-20 22:24:08 +08:00
|
|
|
def todo3():
|
|
|
|
print('task 3 running...')
|
|
|
|
|
2022-01-24 19:08:33 +08:00
|
|
|
|
2022-01-22 23:49:53 +08:00
|
|
|
def when3():
|
|
|
|
return True
|
|
|
|
|
2022-01-24 19:08:33 +08:00
|
|
|
|
|
|
|
task = GTestTask.Task()
|
2022-01-20 18:16:08 +08:00
|
|
|
task.call_always(todo1)
|
|
|
|
task.call_always(todo2)
|
2022-01-22 23:49:53 +08:00
|
|
|
# task.call_when(todo3, when3)
|
2022-01-11 13:00:32 +08:00
|
|
|
|
2022-01-20 18:14:22 +08:00
|
|
|
task.run_once()
|