函数:device.isWake 判断屏幕是否亮屏

优质
小牛编辑
114浏览
2023-12-01

函数功能:判断屏幕是否亮屏

函数方法

bool = device.isWake()

返回值类型说明
boolstringtrue - 屏幕亮屏,false - 屏幕黑屏

函数用例

bool = device.isWake()
if bool then
    toast("屏幕亮屏",2)
    mSleep(3000)
else
    toast("屏幕黑屏",2)
    mSleep(3000)
end

注意事项

  • 目前积木编程函数和触动精灵函数不通用,请仔细查看本手册,此手册中函数仅支持积木编程,不支持触动精灵,同理请勿将触动精灵函数在积木编程运行。