commit as is

This commit is contained in:
2022-08-05 21:00:58 +02:00
parent c412ff6a01
commit 3246d5ec07
11 changed files with 23 additions and 21 deletions

View File

@ -296,7 +296,8 @@ void sendCanCommands()
const auto status = twai_get_status_info(&status_info);
const auto timestamp_after = espchrono::millis_clock::now();
if ((result == ESP_ERR_TIMEOUT || status_info.state == TWAI_STATE_BUS_OFF) || (status == ESP_OK && status_info.bus_error_count > can_sequential_bus_errors))
if ((result == ESP_ERR_TIMEOUT || status_info.state == TWAI_STATE_BUS_OFF) ||
(status == ESP_OK && status_info.bus_error_count > can_sequential_bus_errors))
{
++can_sequential_error_cnt;
++can_total_error_cnt;

View File

@ -49,9 +49,8 @@ public:
{
std::string_view name = m_flag.isEnabled.nvsName();
constexpr const std::string_view prefix = "f_";
if (cpputils::stringStartsWith(name, prefix)) {
if (name.ends_with(prefix))
name.remove_prefix(prefix.size());
}
std::string return_name = std::string{name};
return_name += m_flag.isBeta() ? " (beta)" : "";
return return_name;

View File

@ -12,7 +12,7 @@
#include <esphttpdutils.h>
#include <lockhelper.h>
#include <tickchrono.h>
#include <espstrutils.h>
#include <strutils.h>
// local includes
#include "ota.h"
@ -109,7 +109,7 @@ esp_err_t webserver_ota_handler(httpd_req_t *req)
body += fmt::format("\"cur_secver\":\"{}\",", app_desc->secure_version);
body += fmt::format("\"cur_ts\":\"{}\",", app_desc->time);
body += fmt::format("\"cur_idf\":\"{}\",", app_desc->idf_ver);
body += fmt::format("\"cur_sha\":\"{}\",", espcpputils::toHexString({app_desc->app_elf_sha256, 8}));
body += fmt::format("\"cur_sha\":\"{}\",", cpputils::toHexString({app_desc->app_elf_sha256, 8}));
}
else
{
@ -135,7 +135,7 @@ esp_err_t webserver_ota_handler(httpd_req_t *req)
body += fmt::format("\"new_secver\":\"{}\",", appDesc->secure_version);
body += fmt::format("\"new_ts\":\"{}\",", appDesc->time);
body += fmt::format("\"new_idf\":\"{}\",", appDesc->idf_ver);
body += fmt::format("\"new_sha\":\"{}\",", espcpputils::toHexString({appDesc->app_elf_sha256, 8}));
body += fmt::format("\"new_sha\":\"{}\",", cpputils::toHexString({appDesc->app_elf_sha256, 8}));
}
else
@ -231,7 +231,7 @@ esp_err_t webserver_ota_handler(httpd_req_t *req)
{
HtmlTag trTag{"tr", body};
{ HtmlTag tdTag{"td", body}; body += "Current sha256"; }
{ HtmlTag tdTag{"td", body}; body += esphttpdutils::htmlentities(espcpputils::toHexString({app_desc->app_elf_sha256, 8})); }
{ HtmlTag tdTag{"td", body}; body += esphttpdutils::htmlentities(cpputils::toHexString({app_desc->app_elf_sha256, 8})); }
}
}
else
@ -307,7 +307,7 @@ esp_err_t webserver_ota_handler(httpd_req_t *req)
{
HtmlTag trTag{"tr", body};
{ HtmlTag tdTag{"td", body}; body += "New sha256"; }
{ HtmlTag tdTag{"td", body}; body += esphttpdutils::htmlentities(espcpputils::toHexString({appDesc->app_elf_sha256, 8})); }
{ HtmlTag tdTag{"td", body}; body += esphttpdutils::htmlentities(cpputils::toHexString({appDesc->app_elf_sha256, 8})); }
}
}
}

View File

@ -5,4 +5,4 @@ then
source export.sh --skip-source-check
fi
qtcreator "bobbycar-boardcomputer-firmware" 2>&1 >/dev/null &
QTC_CLANG_CMD_OPTIONS_BLACKLIST=-mlongcalls\;-std=gnu++23 qtcreator "bobbycar-boardcomputer-firmware" 2>&1 >/dev/null &

View File

@ -428,7 +428,9 @@ CONFIG_APPTRACE_LOCK_ENABLE=y
#
# ESP-ASIO
#
# CONFIG_ASIO_SSL_SUPPORT is not set
CONFIG_ASIO_SSL_SUPPORT=y
CONFIG_ASIO_USE_ESP_OPENSSL=y
CONFIG_ASIO_SSL_BIO_SIZE=1024
# end of ESP-ASIO
#
@ -1638,10 +1640,10 @@ CONFIG_TFT_ST7789_DRIVER=y
# CONFIG_TFT_GC9A01_DRIVER is not set
CONFIG_TFT_RGB_ORDER=y
# CONFIG_TFT_BGR_ORDER is not set
CONFIG_TFT_WIDTH=128
CONFIG_TFT_HEIGHT=240
CONFIG_TFT_INVERSION_DISABLE=y
# CONFIG_TFT_INVERSION_ON is not set
CONFIG_TFT_WIDTH=240
CONFIG_TFT_HEIGHT=320
# CONFIG_TFT_INVERSION_DISABLE is not set
CONFIG_TFT_INVERSION_ON=y
# CONFIG_TFT_INVERSION_OFF is not set
# CONFIG_TFT_PARALLEL_8_BIT is not set
@ -1675,7 +1677,7 @@ CONFIG_TFT_LOAD_FONT4=y
CONFIG_TFT_LOAD_FONT7=y
# CONFIG_TFT_LOAD_FONT8 is not set
# CONFIG_TFT_LOAD_GFXFF is not set
# CONFIG_TFT_SMOOTH_FONT is not set
CONFIG_TFT_SMOOTH_FONT=y
# end of Fonts
#