}
if (engine->__currentMode == VOICE_TOUCH_MODE_GRID && engine->__currentGridInfo.currentStep == 0) {
- _I("[VoiceTouchEngine] Grid first step. Skip modality request");
+ _I("[VoiceTouchEngine] Grid first step. Skip modality request and send 2nd step grid");
+ engine->updateCurrentGridInfo(*command);
+ engine->__makeClickableItemResultTimer = ecore_timer_add(0.0, makeClickableItemResultCallback, data);
return ECORE_CALLBACK_CANCEL;
}
_I("[VoiceTouchEngine] Command. object ID(%s)", command->objectId.c_str());
engine->makeTouchModality(*command, timestamp);
engine->invokeOutputModalityCallback(&engine->__touchModality);
+ engine->resetCurrentGridInfo();
return ECORE_CALLBACK_CANCEL;
}
__currentGridInfo.height = __displayHeight;
}
+void VoiceTouchEngine::updateCurrentGridInfo(const ClickableItem &item)
+{
+ __currentGridInfo.currentStep++;
+ __currentGridInfo.coordX = item.coordX;
+ __currentGridInfo.coordY = item.coordY;
+ __currentGridInfo.width = item.width;
+ __currentGridInfo.height = item.height;
+}
+
void VoiceTouchEngine::makeClickableItemInfo(int timestamp, JsonProvider &provider)
{
_I("[VoiceTouchEngine] Make clickable object list output. timestamp(%d), Current mode(%d)", timestamp, __currentMode);
void VoiceTouchEngine::makeTouchModality(const ClickableItem &item, int timestamp)
{
_I("[VoiceTouchEngine] Make clicked object output. timestamp(%d). item(%s)", timestamp, item.objectId.c_str());
- if (__currentMode != VOICE_TOUCH_MODE_GRID) {
- _D("[VoiceTouchEngine] Not grid mode.");
- setTouchModality(item, timestamp);
- return;
- }
-
- if (__currentGridInfo.currentStep == 0) {
- __currentGridInfo.currentStep++;
- __currentGridInfo.coordX = item.coordX;
- __currentGridInfo.coordY = item.coordY;
- __currentGridInfo.width = item.width;
- __currentGridInfo.height = item.height;
- return;
- }
-
- resetCurrentGridInfo();
setTouchModality(item, timestamp);
}