summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlliver Schinagl <o.schinagl@ultimaker.com>2015-06-17 06:16:02 (GMT)
committerOlliver Schinagl <o.schinagl@ultimaker.com>2015-06-17 06:16:02 (GMT)
commit3c4628905960bf3217f84f81f3c213bd15be695c (patch)
treee5395c7dc38022fda4422c8e376f43ce65ff113d /src
parent58678161dffd48c7ecfaedf8aa8a49ec118defe4 (diff)
downloadeulogium-3c4628905960bf3217f84f81f3c213bd15be695c.zip
eulogium-3c4628905960bf3217f84f81f3c213bd15be695c.tar.gz
eulogium-3c4628905960bf3217f84f81f3c213bd15be695c.tar.bz2
[griffin.hmi] get procedures to compile
this is a broken commit, procedures are broken and compiling is broken atm. This is a wip commit. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/eulogium.c3
-rw-r--r--src/eulogium.h17
-rw-r--r--src/print_data.h28
-rw-r--r--src/procedures.c (renamed from src/eulogium_procedures.c)23
-rw-r--r--src/procedures.h (renamed from src/eulogium_procedures.h)9
6 files changed, 61 insertions, 21 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e60d34d..416d9be 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,7 +11,7 @@ AM_CPPFLAGS = -DPACKAGE_BIN_DIR=\"$(bindir)/\" \
-I$(top_srcdir)/src/ \
@EFL_CFLAGS@
-eulogium_SOURCES = eulogium.c eulogium_item_list.c
+eulogium_SOURCES = eulogium.c eulogium_item_list.c procedures.c
eulogium_LDADD = @EFL_LIBS@
localedir = $(datadir)/locale
diff --git a/src/eulogium.c b/src/eulogium.c
index 9fe4d2c..8ff47a2 100644
--- a/src/eulogium.c
+++ b/src/eulogium.c
@@ -16,9 +16,8 @@
#include "eulogium.h"
#include "eulogium_item_list.h"
#include "eulogium_private.h"
-#include "eulogium_procedures.h"
#include "gettext.h"
-
+#include "procedures.h"
#define COPYRIGHT "Copyright © 2015 Olliver Schinagl <o.schinagl@ultimaker.com> and various contributors (see AUTHORS)."
diff --git a/src/eulogium.h b/src/eulogium.h
index 5ef8468..a90548f 100644
--- a/src/eulogium.h
+++ b/src/eulogium.h
@@ -3,12 +3,13 @@
#ifndef _EULOGIUM_H
#define _EULOGIUM_H
-#include <Evas.h>
+#include <Eeze_Disk.h>
#include <Eldbus.h>
+#include <Evas.h>
#include <stdint.h>
-#include "eulogium_procedures.h"
#include "eulogium_item_list.h"
+#include "procedures.h"
enum screen_type {
NONE,
@@ -56,18 +57,6 @@ struct printer_data {
double bed_target_temp;
};
-struct print_data {
- uint_fast32_t time;
- double progress;
- char *file;
- char *name;
- Eina_Bool name_changed;
- char *flags;
- double material;
- Eina_Bool block;
- Eina_Bool block_active;
-};
-
enum proxy_idx {
PRINTER,
LED,
diff --git a/src/print_data.h b/src/print_data.h
new file mode 100644
index 0000000..b932819
--- /dev/null
+++ b/src/print_data.h
@@ -0,0 +1,28 @@
+/*
+ * function and data types for print information
+ *
+ * Copyright (c) 2015 Ultimaker B.V.
+ * Author: Olliver Schinagl <o.schinagl@ultimaker.com>
+ *
+ * SPDX-License-Identifier: AGPL-3.0+
+ */
+
+#ifndef _PRINT_DATA_H
+#define _PRINT_DATA_H
+
+#include <Eina.h>
+#include <stdint.h>
+
+struct print_data {
+ uint_fast32_t time;
+ double progress;
+ char *file;
+ char *name;
+ Eina_Bool name_changed;
+ char *flags;
+ double material;
+ Eina_Bool block;
+ Eina_Bool block_active;
+};
+
+#endif /* _PRINT_DATA_H */
diff --git a/src/eulogium_procedures.c b/src/procedures.c
index 99e7a6b..cd05d0f 100644
--- a/src/eulogium_procedures.c
+++ b/src/procedures.c
@@ -7,10 +7,13 @@
* SPDX-License-Identifier: AGPL-3.0+
*/
-#include <Elementary.h>
+#include <Eina.h>
+#include <Eldbus.h>
+#include <stdint.h>
-#include "eulogium_private.h"
-#include "eulogium_procedures.h"
+#include "procedures.h"
+
+#include "print_data.h"
#define _PROC_PRINT "PRINT"
#define _PROC_HEATUP_HOTEND "HEATUP_HOTEND"
@@ -47,3 +50,17 @@ struct procedure_data *procedures_init(void)
{
return procedures;
};
+
+void procedure_start_print(Eldbus_Proxy *proxy, struct print_data *print)
+{
+ Eldbus_Message *msg;
+ Eldbus_Message_Iter *iter, *array_itr;
+
+
+ print = NULL;
+ msg = eldbus_proxy_method_call_new(proxy, "startProcedure");
+ iter = eldbus_message_iter_get(msg);
+ eldbus_message_iter_arguments_append(iter, "sa{sv}", "PRINT", array_itr);
+ eldbus_message_iter_container_new(iter, 'a', "{sv}");
+ eldbus_message_iter_container_close(iter, array_itr);
+}
diff --git a/src/eulogium_procedures.h b/src/procedures.h
index 40a87a6..76e4adc 100644
--- a/src/eulogium_procedures.h
+++ b/src/procedures.h
@@ -10,14 +10,21 @@
#ifndef _EULOGIUM_PROCEDURES_H
#define _EULOGIUM_PROCEDURES_H
+#include <Eina.h>
+#include <Eldbus.h>
+#include <stdint.h>
+
+#include "print_data.h"
+
struct procedure_data {
char *key;
uint_fast16_t keylen;
Eina_Bool available;
Eina_Bool executable;
- char *step;
+ char steps[];
};
struct procedure_data *procedures_init(void);
+void procedure_start_print(Eldbus_Proxy *proxy, struct print_data *print);
#endif /* _EULOGIUM_PRIVATE_H */