2022-10-25 15:18:32 +00:00
|
|
|
import kuukar_nextion
|
2022-10-23 06:49:59 +00:00
|
|
|
class lcd:
|
|
|
|
def __init__(self) -> None:
|
2022-10-25 15:18:32 +00:00
|
|
|
self.nextion = kuukar_nextion.nextion()
|
2022-10-26 05:44:58 +00:00
|
|
|
self.nextion.send_command("page home")
|
2022-10-23 06:49:59 +00:00
|
|
|
|
|
|
|
def keke_uwu(self):
|
|
|
|
pass
|
|
|
|
|
2022-10-25 15:01:26 +00:00
|
|
|
def keke_cute_noise(self):
|
|
|
|
pass
|
|
|
|
|
2022-10-23 06:49:59 +00:00
|
|
|
def keke_hurt(self):
|
2022-10-26 05:44:58 +00:00
|
|
|
self.play_video("keke_hurt")
|
2022-10-23 06:49:59 +00:00
|
|
|
|
2022-10-25 15:01:26 +00:00
|
|
|
def keke_died(self):
|
|
|
|
pass
|
|
|
|
|
2022-10-23 06:49:59 +00:00
|
|
|
def takina_noise(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def play_video(self,filename: str) -> None:
|
2022-10-26 05:44:58 +00:00
|
|
|
self.nextion.send_command("page video_player")
|
|
|
|
self.nextion.send_command("video.path=\"sd0/"+filename+".video\"")
|
|
|
|
self.nextion.send_command("video.en=1")
|
|
|
|
|
2022-10-23 06:49:59 +00:00
|
|
|
def pause_video(self) -> None:
|
2022-10-26 05:44:58 +00:00
|
|
|
self.nextion.send_command("video.en=2")
|
2022-10-23 06:49:59 +00:00
|
|
|
|
|
|
|
def resume_video(self) -> None:
|
2022-10-26 05:44:58 +00:00
|
|
|
self.nextion.send_command("video.en=1")
|
2022-10-23 06:49:59 +00:00
|
|
|
|
|
|
|
def stop_video(self) -> None:
|
2022-10-26 05:44:58 +00:00
|
|
|
self.nextion.send_command("video.en=0")
|
|
|
|
self.nextion.send_command("page home")
|
2022-10-23 06:49:59 +00:00
|
|
|
|