大彩串口屏幕使用记录

开机画面

大彩串口屏幕使用记录_第1张图片

开机画面跳转-lua脚本

1:创建定时器

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

 2:定时器回调

function on_timer(timer_id)  
	if timer_id == 2 then
		if get_current_screen() == Bootanimation_id then
			CatTime = CatTime - 1
			set_value(Bootanimation_id,3,CatTime)
			if CatTime == 0 then
				change_screen(0)
			end
		end	
	 end	
end

你可能感兴趣的:(MCU,linux,运维,服务器)