Upgrade to C++23
This commit is contained in:
@ -22,9 +22,11 @@ include(config.cmake)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
add_definitions(-DASIO_DISABLE_CONCEPTS=1)
|
||||
|
||||
set(EXTRA_COMPONENT_DIRS
|
||||
esp-protocols/components
|
||||
)
|
||||
|
Submodule components/arduino-esp32 updated: 2b2f7cd936...a3d5e78b83
Submodule components/esp-gui-lib updated: 15bdca5645...a75c419742
Submodule components/espconfiglib updated: 3ca0eb09d6...c12f6fa3a8
Submodule components/espcpputils updated: a155041878...d811b9e470
Submodule components/esphttpdutils updated: c095443979...eb152b8406
Submodule components/espwifistack updated: 4749a9db5c...724cac190f
Submodule components/fmt updated: 7b25dd172b...32e16173ce
2
esp-idf
2
esp-idf
Submodule esp-idf updated: d0026946cd...468b1f17c9
@ -6,7 +6,6 @@
|
||||
// 3rdparty lib includes
|
||||
#include <ArduinoJson.h>
|
||||
#include <wifi_bobbycar.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "ledstrip.h"
|
||||
|
@ -155,7 +155,7 @@ namespace buildserver {
|
||||
|
||||
std::string get_hash_url(std::string hash)
|
||||
{
|
||||
return fmt::format(url_for_hashes, hash);
|
||||
return fmt::format(fmt::runtime(url_for_hashes), hash);
|
||||
}
|
||||
|
||||
std::string get_latest_url()
|
||||
|
@ -4,6 +4,7 @@
|
||||
// system includes
|
||||
#include <cstring>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
|
||||
// esp-idf
|
||||
#include <driver/twai.h>
|
||||
@ -14,7 +15,6 @@
|
||||
#include <espchrono.h>
|
||||
#include <tickchrono.h>
|
||||
#include <screenmanager.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "bobbycar-can.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "changevaluedisplay_bobbyquickactions.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#include <actions/setvalueaction.h>
|
||||
#include <actions/backproxyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "changevaluedisplay_controlmode.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#include <actions/setvalueaction.h>
|
||||
#include <actions/backproxyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "changevaluedisplay_controltype.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#include <actions/setvalueaction.h>
|
||||
#include <actions/backproxyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "changevaluedisplay_handbremsmode.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#include <actions/setvalueaction.h>
|
||||
#include <actions/backproxyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "changevaluedisplay_larsmmode_mode.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#include <actions/setvalueaction.h>
|
||||
#include <actions/backproxyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "changevaluedisplay_unifiedmodelmode.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -7,7 +10,6 @@
|
||||
#include <actions/setvalueaction.h>
|
||||
#include <actions/backproxyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "utils.h"
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
#include "candebugmenu.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
|
||||
@ -14,7 +17,6 @@
|
||||
#include <actions/dummyaction.h>
|
||||
#include <icons/back.h>
|
||||
#include <screenmanager.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "bobbyerrorhandler.h"
|
||||
|
@ -137,7 +137,7 @@ void SelectBuildMenu::buildMenuFromJson()
|
||||
{
|
||||
auto &menuitem = constructMenuItem<VersionMenuItem<TFT_WHITE>>();
|
||||
menuitem.setHash(hash);
|
||||
menuitem.setUrl(fmt::format(url_for_hashes, hash));
|
||||
menuitem.setUrl(fmt::format(fmt::runtime(url_for_hashes), hash));
|
||||
}
|
||||
constructMenuItem<makeComponent<MenuItem, StaticText<TEXT_BACK>, PopScreenAction, StaticMenuItemIcon<&espgui::icons::back>>>();
|
||||
}
|
||||
|
@ -36,10 +36,9 @@ void SpeedInfoDisplay::redraw()
|
||||
|
||||
tft.setTextSize(4);
|
||||
|
||||
m_labelSpeed.redraw(fmt::format(
|
||||
std::abs(avgSpeedKmh) < 10 ? "{:.2f}" :
|
||||
(std::abs(avgSpeedKmh) < 100 ? "{:.1f}" : "{:.0f}"),
|
||||
avgSpeedKmh));
|
||||
m_labelSpeed.redraw(
|
||||
std::abs(avgSpeedKmh) < 10 ? fmt::format("{:.2f}", avgSpeedKmh) :
|
||||
(std::abs(avgSpeedKmh) < 100 ? fmt::format("{:.1f}", avgSpeedKmh) : fmt::format("{:.0f}", avgSpeedKmh)));
|
||||
|
||||
tft.setTextSize(1);
|
||||
m_batteryPercentLabel.redraw(getBatteryPercentageString());
|
||||
@ -58,12 +57,9 @@ void SpeedInfoDisplay::redraw()
|
||||
m_currentConsumptionLabel.redraw("No comsumption");
|
||||
}
|
||||
|
||||
m_distanceLabel.redraw(fmt::format(
|
||||
drivingStatistics.meters_driven > 1000 ? "{:.3f} km" :
|
||||
(drivingStatistics.meters_driven > 100 ? "{:.1f} m" : "{:.2f} m"),
|
||||
drivingStatistics.meters_driven > 1000 ?
|
||||
drivingStatistics.meters_driven / 1000 :
|
||||
drivingStatistics.meters_driven));
|
||||
m_distanceLabel.redraw(
|
||||
drivingStatistics.meters_driven > 1000 ? fmt::format("{:.3f} km", drivingStatistics.meters_driven / 1000) :
|
||||
(drivingStatistics.meters_driven > 100 ? fmt::format("{:.1f} m", drivingStatistics.meters_driven) : fmt::format("{:.2f} m", drivingStatistics.meters_driven)));
|
||||
|
||||
tft.setTextSize(1);
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <fmt/core.h>
|
||||
#include <cpputils.h>
|
||||
#include <espchrono.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "profilesettings.h"
|
||||
|
@ -203,7 +203,7 @@ std::string buildUdpCloudString()
|
||||
const auto addController = [&](const Controller &controller, const bool isBack) {
|
||||
if (controller.feedbackValid)
|
||||
{
|
||||
buf += fmt::format("\"{}\":{", !isBack ? "f":"b");
|
||||
buf += fmt::format("\"{}\":{{", !isBack ? "f":"b");
|
||||
// Voltage
|
||||
if (controller.getCalibratedVoltage())
|
||||
buf += fmt::format("\"V\":{},", controller.getCalibratedVoltage());
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "utils.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// local includes
|
||||
#include "globals.h"
|
||||
#include "newsettings.h"
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
// 3rdparty lib includes
|
||||
#include <espchrono.h>
|
||||
#include <futurecpp.h>
|
||||
#include <cpputils.h>
|
||||
|
||||
// local includes
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "webserver_displaycontrol.h"
|
||||
|
||||
// system includes
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_http_server.h>
|
||||
#include <esp_log.h>
|
||||
@ -17,7 +20,6 @@
|
||||
#include <lockhelper.h>
|
||||
#include <tickchrono.h>
|
||||
#include <screenmanager.h>
|
||||
#include <futurecpp.h>
|
||||
|
||||
// local includes
|
||||
#include "bobbybuttons.h"
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
// system includes
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_http_server.h>
|
||||
@ -15,7 +16,6 @@
|
||||
#include <numberparsing.h>
|
||||
#include <lockhelper.h>
|
||||
#include <tickchrono.h>
|
||||
#include <futurecpp.h>
|
||||
#include <cpputils.h>
|
||||
|
||||
// local includes
|
||||
|
Reference in New Issue
Block a user