summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlliver Schinagl <o.schinagl@ultimaker.com>2015-05-08 13:30:17 (GMT)
committerOlliver Schinagl <o.schinagl@ultimaker.com>2015-05-08 13:30:17 (GMT)
commitdc8e642555b5a2d7c9702e83aa6c6d3512d6dd9d (patch)
tree96705b5ed95fcf9b046ba552edbaa0037ac2b690
parentb3bbb7f360c866e7ba6536488b86a970fc9043cd (diff)
downloadeulogium-dc8e642555b5a2d7c9702e83aa6c6d3512d6dd9d.zip
eulogium-dc8e642555b5a2d7c9702e83aa6c6d3512d6dd9d.tar.gz
eulogium-dc8e642555b5a2d7c9702e83aa6c6d3512d6dd9d.tar.bz2
Remove start print 'state-mini-machine'
The UI is fully controlled by the states of griffin.printer.getState and thus we don't worry about various states when starting a print, we let griffin.printer worry about that. It should be noted that the griffin.printer state machine is far from complete and we may still end up in a strange state. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
-rw-r--r--src/eulogium.c38
1 files changed, 6 insertions, 32 deletions
diff --git a/src/eulogium.c b/src/eulogium.c
index 53bb4bb..f79be9c 100644
--- a/src/eulogium.c
+++ b/src/eulogium.c
@@ -644,24 +644,10 @@ static void _on_start_print_ret(void *data EINA_UNUSED, const Eldbus_Message *ms
EINA_LOG_ERR("Failed to start print.");
return;
}
- if (print_started == EINA_TRUE) {
- content = eulogium_print_progress(eulogium);
- } else {
- EINA_LOG_WARN("Bed was unable to be Cleared.");
- content = eulogium_generic_error(eulogium, 0); /* TODO, proper error codes LUT */
- }
- /* TODO: check why the print failed, and possibly show progress. Currently the status_changed does print the error */
- elm_naviframe_item_simple_push(eulogium->navi, content);
-}
-
-static void eulogium_print_start(struct eulogium_data *eulogium)
-{
- /* TODO: calling startPrint may have a longer then expected timeout. While unlikely we may want to inform
- * the user about this via a screen. Difficulty being here, is that we don't want to 'flash' a screen
- * too shortly but may not want to delay without reason.
- */
- eldbus_proxy_call(eulogium->dbus.proxy[HARMA], "startPrint", _on_start_print_ret, eulogium, -1, "sss",
- eulogium->print.name, eulogium->print.file, eulogium->print.flags);
+ if (print_started == EINA_TRUE)
+ EINA_LOG_INFO("Print has been successfully started");
+ else
+ EINA_LOG_ERR("Unable to start print");
}
static void _on_cleared_printer_ret(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
@@ -736,20 +722,8 @@ static void _cb_select_file(void *data, Evas_Object *obj EINA_UNUSED, void *even
elm_naviframe_item_simple_push(eulogium->navi, content);
} else {
eulogium_print_data_set(eulogium, filepath);
- switch (eulogium->printer.status) {
- Evas_Object *content;
-
- case IDLE:
- eulogium_print_start(eulogium);
- break;
- case WAIT_FOR_REMOVAL:
- eulogium_clear_print_bed_and_start_print(eulogium);
- break;
- default:
- content = eulogium_generic_error(eulogium, 0); /* TODO, proper error codes LUT */
- elm_naviframe_item_simple_push(eulogium->navi, content);
- break;
- }
+ eldbus_proxy_call(eulogium->dbus.proxy[HARMA], "startPrint", _on_start_print_ret, eulogium, -1, "sss",
+ eulogium->print.name, eulogium->print.file, eulogium->print.flags);
}
}
}