modify ipc
This commit is contained in:
parent
e5bc16133c
commit
cbf1e360e8
@ -35,13 +35,19 @@ class HumanStatus:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def get_index(self):
|
def get_index(self):
|
||||||
if self._is_talking:
|
if not self._is_talking:
|
||||||
if self._current_frame < self._silence_length:
|
index = self._current_frame % self._silence_length
|
||||||
index = self._current_frame
|
|
||||||
|
if self._current_frame >= self._silence_length:
|
||||||
|
self._is_talking = True
|
||||||
|
self._current_frame = 0
|
||||||
|
|
||||||
else:
|
else:
|
||||||
index = self._silence_length + (self._current_frame - self._silence_length) % self._talking_length
|
index = self._silence_length + (self._current_frame - self._silence_length) % self._talking_length
|
||||||
else:
|
|
||||||
index = self._current_frame % self._silence_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
|
self._current_frame = (self._current_frame + 1) % self._total_frames
|
||||||
return index
|
return index
|
||||||
|
BIN
ipc/ipc.dll
BIN
ipc/ipc.dll
Binary file not shown.
BIN
ipc/ipc.pdb
BIN
ipc/ipc.pdb
Binary file not shown.
@ -56,15 +56,15 @@ class IpcRender(HumanRender):
|
|||||||
pass
|
pass
|
||||||
elif 'full' == data_str:
|
elif 'full' == data_str:
|
||||||
if self._render_status != RenderStatus.E_Full:
|
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
|
self._render_status = RenderStatus.E_Full
|
||||||
elif 'empty' == data_str:
|
elif 'empty' == data_str:
|
||||||
if self._render_status != RenderStatus.E_Empty:
|
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
|
self._render_status = RenderStatus.E_Empty
|
||||||
elif 'normal' == data_str:
|
elif 'normal' == data_str:
|
||||||
if self._render_status != RenderStatus.E_Normal:
|
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
|
self._render_status = RenderStatus.E_Normal
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user