mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-03-21 05:49:26 +00:00
Compare commits
4 Commits
I2S-4MFlas
...
I2S-4MFlas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d573da503 | ||
|
|
2687023b6f | ||
|
|
0993186e01 | ||
|
|
ede495a145 |
4
.github/workflows/CrossBuild.yml
vendored
4
.github/workflows/CrossBuild.yml
vendored
@@ -4,9 +4,9 @@ name: Cross-Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master-cmake ]
|
||||
branches-ignore: [ master ]
|
||||
pull_request:
|
||||
branches: [ master-cmake ]
|
||||
branches-ignore: [ master ]
|
||||
|
||||
jobs:
|
||||
job1:
|
||||
|
||||
67
.github/workflows/codeql-analysis.yml
vendored
Normal file
67
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master-cmake ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master-cmake ]
|
||||
schedule:
|
||||
- cron: '19 12 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp', 'javascript', 'python']
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -1,3 +1,4 @@
|
||||

|
||||
# Squeezelite-esp32
|
||||
## What is this
|
||||
Squeezelite-esp32 is an audio software suite made to run on espressif's ESP32 wifi (b/g/n) and bluetooth chipset. It offers the following capabilities
|
||||
|
||||
@@ -28,10 +28,6 @@ extern void output_bt_tick(void);
|
||||
extern char* output_state_str(void);
|
||||
extern bool output_stopped(void);
|
||||
|
||||
extern void wifi_manager_update_status();
|
||||
|
||||
//int64_t connecting_timeout = 0;
|
||||
|
||||
static void bt_app_av_state_connecting(uint16_t event, void *param);
|
||||
static void filter_inquiry_scan_result(esp_bt_gap_cb_param_t *param);
|
||||
|
||||
@@ -206,13 +202,11 @@ void set_app_source_state(int new_state){
|
||||
if(bt_app_source_a2d_state!=new_state){
|
||||
ESP_LOGD(TAG, "Updating state from %s to %s", APP_AV_STATE_DESC[bt_app_source_a2d_state], APP_AV_STATE_DESC[new_state]);
|
||||
bt_app_source_a2d_state=new_state;
|
||||
wifi_manager_update_status();
|
||||
}
|
||||
}
|
||||
void set_a2dp_media_state(int new_state){
|
||||
if(bt_app_source_media_state!=new_state){
|
||||
bt_app_source_media_state=new_state;
|
||||
wifi_manager_update_status();
|
||||
}
|
||||
}
|
||||
void hal_bluetooth_init(const char * options)
|
||||
|
||||
@@ -450,16 +450,16 @@ const set_GPIO_struct_t * get_gpio_struct(){
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LED_LOCKED
|
||||
gpio_struct.red.locked=true;
|
||||
gpio_struct.green.locked=true;
|
||||
gpio_struct.red.fixed=true;
|
||||
gpio_struct.green.fixed=true;
|
||||
#endif
|
||||
#ifdef CONFIG_JACK_LOCKED
|
||||
gpio_struct.jack.gpio=CONFIG_JACK_GPIO
|
||||
#ifdef CONFIG_JACK_LOCKED
|
||||
gpio_struct.jack.gpio=CONFIG_JACK_GPIO;
|
||||
gpio_struct.jack.fixed=true;
|
||||
gpio_struct.jack.level=CONFIG_JACK_GPIO_LEVEL;
|
||||
#endif
|
||||
#ifdef CONFIG_SPKFAULT_LOCKED
|
||||
gpio_struct.spkfault.gpio=CONFIG_SPKFAULT_GPIO
|
||||
gpio_struct.spkfault.gpio=CONFIG_SPKFAULT_GPIO;
|
||||
gpio_struct.spkfault.fixed=true;
|
||||
gpio_struct.spkfault.level=CONFIG_SPKFAULT_GPIO_LEVEL;
|
||||
#endif
|
||||
@@ -531,7 +531,9 @@ cJSON * add_gpio_for_name(cJSON * list,const char * nvs_entry,const char * name,
|
||||
int gpioNum=0;
|
||||
if ((p = strcasestr(nvs_entry, name)) != NULL) {
|
||||
gpioNum = atoi(strchr(p, '=') + 1);
|
||||
cJSON_AddItemToArray(llist,get_gpio_entry(name,prefix,gpioNum,fixed));
|
||||
if(gpioNum>=0){
|
||||
cJSON_AddItemToArray(llist,get_gpio_entry(name,prefix,gpioNum,fixed));
|
||||
}
|
||||
}
|
||||
return llist;
|
||||
}
|
||||
|
||||
@@ -40,8 +40,6 @@ static struct {
|
||||
.cells = 2,
|
||||
};
|
||||
|
||||
extern void wifi_manager_update_status();
|
||||
|
||||
/****************************************************************************************
|
||||
*
|
||||
*/
|
||||
@@ -66,7 +64,6 @@ static void battery_callback(TimerHandle_t xTimer) {
|
||||
battery.avg = battery.sum / battery.count;
|
||||
battery.sum = battery.count = 0;
|
||||
ESP_LOGI(TAG, "Voltage %.2fV", battery.avg);
|
||||
wifi_manager_update_status();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ bool jack_inserted_svc(void);
|
||||
void (*spkfault_handler_svc)(bool inserted);
|
||||
bool spkfault_svc(void);
|
||||
|
||||
extern void wifi_manager_update_status();
|
||||
|
||||
/****************************************************************************************
|
||||
*
|
||||
@@ -147,8 +146,6 @@ static void monitor_callback(TimerHandle_t xTimer) {
|
||||
*/
|
||||
static void jack_handler_default(void *id, button_event_e event, button_press_e mode, bool long_press) {
|
||||
ESP_LOGD(TAG, "Jack %s", event == BUTTON_PRESSED ? "inserted" : "removed");
|
||||
messaging_post_message(MESSAGING_INFO, MESSAGING_CLASS_SYSTEM,"jack is %s",BUTTON_PRESSED ? "inserted" : "removed");
|
||||
wifi_manager_update_status();
|
||||
if (jack_handler_svc) (*jack_handler_svc)(event == BUTTON_PRESSED);
|
||||
}
|
||||
|
||||
|
||||
@@ -1182,6 +1182,8 @@ esp_err_t status_get_handler(httpd_req_t *req){
|
||||
else {
|
||||
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR , "Error retrieving status object");
|
||||
}
|
||||
// update status for next status call
|
||||
wifi_manager_update_status();
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user