32 lines
642 B
C
32 lines
642 B
C
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
#include <string.h>
|
|
#include <libserialport.h>
|
|
#include <jansson.h>
|
|
#include <webui.h>
|
|
|
|
#include "config.h"
|
|
#include "device.h"
|
|
#include "ui.h"
|
|
|
|
int main(int argc, char const *argv[]) {
|
|
int app_window = webui_new_window();
|
|
|
|
app_html[app_html_len] = '\0';
|
|
|
|
#ifndef DEBUG
|
|
webui_set_kiosk(app_window, true);
|
|
#endif
|
|
|
|
webui_bind(app_window, "close_app", app_close);
|
|
webui_bind(app_window, "webui_refresh_ports", app_refresh_devices);
|
|
webui_bind(app_window, "webui_connect_device", app_connect_device);
|
|
|
|
printf("Enjoy :)\n");
|
|
|
|
webui_show(app_window, app_html);
|
|
webui_wait();
|
|
|
|
return 0;
|
|
}
|