diff --git a/human/huaman_status.py b/human/huaman_status.py index 46d4c13..fe24139 100644 --- a/human/huaman_status.py +++ b/human/huaman_status.py @@ -35,14 +35,20 @@ class HumanStatus: return True def get_index(self): - if self._is_talking: - if self._current_frame < self._silence_length: - index = self._current_frame - else: - index = self._silence_length + (self._current_frame - self._silence_length) % self._talking_length - else: + if not self._is_talking: index = self._current_frame % self._silence_length + if self._current_frame >= self._silence_length: + self._is_talking = True + self._current_frame = 0 + + else: + index = self._silence_length + (self._current_frame - self._silence_length) % self._talking_length + + if self._current_frame >= self._silence_length + self._talking_length: + self._is_talking = False + self._current_frame = 0 + self._current_frame = (self._current_frame + 1) % self._total_frames return index diff --git a/ipc/ipc.dll b/ipc/ipc.dll index 9fd8727..1fc4150 100644 Binary files a/ipc/ipc.dll and b/ipc/ipc.dll differ diff --git a/ipc/ipc.pdb b/ipc/ipc.pdb index b7765b7..4a63a4a 100644 Binary files a/ipc/ipc.pdb and b/ipc/ipc.pdb differ diff --git a/ui/ipc_render.py b/ui/ipc_render.py index 44035dd..6b42433 100644 --- a/ui/ipc_render.py +++ b/ui/ipc_render.py @@ -56,15 +56,15 @@ class IpcRender(HumanRender): pass elif 'full' == data_str: if self._render_status != RenderStatus.E_Full: - logger.info(f'change to E_Full status') + # logger.info(f'change to E_Full status') self._render_status = RenderStatus.E_Full elif 'empty' == data_str: if self._render_status != RenderStatus.E_Empty: - logger.info(f'change to E_Full status') + # logger.info(f'change to E_Full status') self._render_status = RenderStatus.E_Empty elif 'normal' == data_str: if self._render_status != RenderStatus.E_Normal: - logger.info(f'change to E_Normal status') + # logger.info(f'change to E_Normal status') self._render_status = RenderStatus.E_Normal def run(self):