29 lines
561 B
C
29 lines
561 B
C
/*
|
|
* AUTHOR: Alexander Popov <iiiypuk {at} fastmail.fm>
|
|
* DESC: ...
|
|
*/
|
|
|
|
#include "ui.h"
|
|
|
|
void close_app(webui_event_t* e) {
|
|
printf("Bye!\n");
|
|
// webui_destroy();
|
|
webui_exit();
|
|
}
|
|
|
|
void refresh_devices(webui_event_t* e) {
|
|
const char *available_ports = json_dumps(get_serial_ports(), 0);
|
|
|
|
#ifdef DEBUG
|
|
printf("Доступные порты:\n%s\n", available_ports);
|
|
#endif
|
|
|
|
webui_return_string(e, available_ports);
|
|
}
|
|
|
|
void connect_device(webui_event_t* e) {
|
|
const char* str = webui_get_string(e);
|
|
|
|
webui_return_bool(e, true);
|
|
}
|