> 文章列表 > 大彩串口屏幕使用记录

大彩串口屏幕使用记录

大彩串口屏幕使用记录

开机画面

开机画面跳转-lua脚本

1:创建定时器

function on_screen_change(screen)if screen == Bootanimation_id thenstart_timer(2,1000,0,4)set_value(screen,3,CatTime)end
end

 2:定时器回调

function on_timer(timer_id)  if timer_id == 2 thenif get_current_screen() == Bootanimation_id thenCatTime = CatTime - 1set_value(Bootanimation_id,3,CatTime)if CatTime == 0 thenchange_screen(0)endend	end	
end