Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastien
2d573da503 Fixing #59 and unnecessary jack insertion messages-release 2020-11-21 09:26:56 -05:00
Sébastien
2687023b6f change build - all branches except master 2020-11-20 11:50:43 -05:00
Sébastien
0993186e01 Create codeql-analysis.yml 2020-11-19 07:48:20 -05:00
7 changed files with 74 additions and 15 deletions

View File

@@ -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
View 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

View File

@@ -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)

View File

@@ -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;
}

View File

@@ -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();
}
}

View File

@@ -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);
}

View File

@@ -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;
}