mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 12:50:49 +03:00
update certificate authority determination - release
This commit is contained in:
@@ -48,6 +48,7 @@ static void register_deep_sleep();
|
||||
static void register_light_sleep();
|
||||
static void register_factory_boot();
|
||||
static void register_restart_ota();
|
||||
static void register_update_certs();
|
||||
#if WITH_TASKS_INFO
|
||||
static void register_tasks();
|
||||
#endif
|
||||
@@ -60,6 +61,7 @@ void register_system()
|
||||
register_restart();
|
||||
register_deep_sleep();
|
||||
register_light_sleep();
|
||||
register_update_certs();
|
||||
register_factory_boot();
|
||||
register_restart_ota();
|
||||
#if WITH_TASKS_INFO
|
||||
@@ -332,6 +334,24 @@ static void register_tasks()
|
||||
|
||||
#endif // WITH_TASKS_INFO
|
||||
|
||||
extern esp_err_t update_certificates(bool force);
|
||||
static int force_update_cert(int argc, char **argv){
|
||||
return update_certificates(true)==ESP_OK;
|
||||
}
|
||||
|
||||
static void register_update_certs()
|
||||
{
|
||||
const esp_console_cmd_t cmd = {
|
||||
.command = "update_certificates",
|
||||
.help = "Force updating the certificates from binary",
|
||||
.hint = NULL,
|
||||
.func = &force_update_cert,
|
||||
};
|
||||
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 'deep_sleep' command puts the chip into deep sleep mode */
|
||||
|
||||
static struct {
|
||||
|
||||
@@ -39,7 +39,7 @@ static const char* TAG = "IR";
|
||||
/****************************************************************************************
|
||||
*
|
||||
*/
|
||||
inline bool nec_check_in_range(int duration_ticks, int target_us, int margin_us) {
|
||||
static bool nec_check_in_range(int duration_ticks, int target_us, int margin_us) {
|
||||
if(( NEC_ITEM_DURATION(duration_ticks) < (target_us + margin_us))
|
||||
&& ( NEC_ITEM_DURATION(duration_ticks) > (target_us - margin_us))) {
|
||||
return true;
|
||||
@@ -174,4 +174,4 @@ void infrared_init(RingbufHandle_t *rb, int gpio) {
|
||||
// get RMT RX ringbuffer
|
||||
rmt_get_ringbuf_handle(RMT_RX_CHANNEL, rb);
|
||||
rmt_rx_start(RMT_RX_CHANNEL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "squeezelite.h"
|
||||
#include "config.h"
|
||||
#include "platform_config.h"
|
||||
#include "audio_controls.h"
|
||||
|
||||
static log_level loglevel = lINFO;
|
||||
@@ -303,4 +303,4 @@ void sb_controls_init(void) {
|
||||
|
||||
chained_notify = server_notify;
|
||||
server_notify = notify;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user