Add device_id to widget_name.c
This commit is contained in:
@ -4,11 +4,12 @@
|
|||||||
#include "mgos_net.h"
|
#include "mgos_net.h"
|
||||||
#include "mongoose-touch.h"
|
#include "mongoose-touch.h"
|
||||||
|
|
||||||
#define WIDGET_NAME_NAME 0
|
#define WIDGET_NAME_NAME 0
|
||||||
#define WIDGET_NAME_IPADDR 1
|
#define WIDGET_NAME_DEVICE_ID 1
|
||||||
#define WIDGET_NAME_SSID 2
|
#define WIDGET_NAME_IPADDR 2
|
||||||
#define WIDGET_NAME_SCREEN 3
|
#define WIDGET_NAME_SSID 4
|
||||||
#define WIDGET_NAME_EMPTY 4
|
#define WIDGET_NAME_SCREEN 3
|
||||||
|
#define WIDGET_NAME_EMPTY 5
|
||||||
|
|
||||||
static uint8_t what = WIDGET_NAME_NAME;
|
static uint8_t what = WIDGET_NAME_NAME;
|
||||||
extern struct screen_t *s_screen;
|
extern struct screen_t *s_screen;
|
||||||
@ -26,6 +27,9 @@ static void widget_name_render(struct widget_t *w, void *ev_data) {
|
|||||||
case WIDGET_NAME_NAME:
|
case WIDGET_NAME_NAME:
|
||||||
sprintf(namestring, "%-20s",mgos_sys_config_get_app_hostname());
|
sprintf(namestring, "%-20s",mgos_sys_config_get_app_hostname());
|
||||||
break;
|
break;
|
||||||
|
case WIDGET_NAME_DEVICE_ID:
|
||||||
|
sprintf(namestring, "%-20s",mgos_sys_config_get_device_id());
|
||||||
|
break;
|
||||||
case WIDGET_NAME_IPADDR: {
|
case WIDGET_NAME_IPADDR: {
|
||||||
char ip[16];
|
char ip[16];
|
||||||
struct mgos_net_event_data evd = {
|
struct mgos_net_event_data evd = {
|
||||||
|
Reference in New Issue
Block a user