add uptime as metric

This commit is contained in:
2024-12-08 15:33:32 +01:00
parent a43227fb47
commit 88aef600c8
4 changed files with 29 additions and 24 deletions

View File

@ -1,26 +1,7 @@
#ifndef H_HTTPS_METRICS
#define H_HTTPS_METRICS
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "spi_flash_mmap.h"
#include <esp_http_server.h>
#include "esp_wifi.h"
#include "esp_event.h"
#include "freertos/event_groups.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "esp_netif.h"
#include <lwip/sockets.h>
#include <lwip/sys.h>
#include <lwip/api.h>
#include <lwip/netdb.h>
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
#define HTML_RESPONSE_SIZE 256U
@ -37,6 +18,4 @@ void initMetrics(void);
void connect_wifi(void);
httpd_handle_t setup_server(void);
void vSetMetrics(sMetric *paMetrics, uint16_t u16Size);
#endif /* H_HTTPS_METRICS */
void vSetMetrics(sMetric *paMetrics, uint16_t u16Size);