mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
Merge branch 'master' into httpd
Conflicts: components/wifi-manager/http_server.c components/wifi-manager/wifi_manager.c main/config.c main/config.h
This commit is contained in:
@@ -59,10 +59,12 @@ Contains the freeRTOS task and all necessary support
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/adc.h"
|
||||
#include "cJSON.h"
|
||||
#include "nvs_utilities.h"
|
||||
#include "config.h"
|
||||
#include "trace.h"
|
||||
#include "cmd_system.h"
|
||||
#include "http_server_handlers.h"
|
||||
|
||||
#include "http_server_handlers.h"
|
||||
#include "monitor.h"
|
||||
|
||||
#ifndef RECOVERY_APPLICATION
|
||||
#define RECOVERY_APPLICATION 0
|
||||
@@ -71,12 +73,7 @@ Contains the freeRTOS task and all necessary support
|
||||
#ifndef SQUEEZELITE_ESP32_RELEASE_URL
|
||||
#define SQUEEZELITE_ESP32_RELEASE_URL "https://github.com/sle118/squeezelite-esp32/releases"
|
||||
#endif
|
||||
#ifdef TAS57xx
|
||||
#define JACK_GPIO 34
|
||||
#define JACK_LEVEL !gpio_get_level(JACK_GPIO)?"1":"0";
|
||||
#else
|
||||
#define JACK_LEVEL "N/A"
|
||||
#endif
|
||||
|
||||
#define STR_OR_BLANK(p) p==NULL?"":p
|
||||
#define FREE_AND_NULL(p) if(p!=NULL){ free(p); p=NULL;}
|
||||
/* objects used to manipulate the main queue of events */
|
||||
@@ -456,7 +453,7 @@ cJSON * wifi_manager_get_basic_info(cJSON **old){
|
||||
cJSON_AddNumberToObject(root,"recovery", RECOVERY_APPLICATION );
|
||||
cJSON_AddItemToObject(root, "ota_dsc", cJSON_CreateString(ota_get_status()));
|
||||
cJSON_AddNumberToObject(root,"ota_pct", ota_get_pct_complete() );
|
||||
cJSON_AddItemToObject(root, "Jack", cJSON_CreateString(JACK_LEVEL));
|
||||
cJSON_AddItemToObject(root, "Jack", cJSON_CreateString(jack_inserted_svc() ? "1" : "0"));
|
||||
cJSON_AddNumberToObject(root,"Voltage", adc1_get_raw(ADC1_CHANNEL_7) / 4095. * (10+174)/10. * 1.1);
|
||||
cJSON_AddNumberToObject(root,"disconnect_count", num_disconnect );
|
||||
cJSON_AddNumberToObject(root,"avg_conn_time", num_disconnect>0?(total_connected_time/num_disconnect):0 );
|
||||
|
||||
Reference in New Issue
Block a user