Fixed compiling issues

This commit is contained in:
CommanderRedYT
2021-12-14 11:51:10 +01:00
parent aabae8b8b6
commit 24607b3a0c
6 changed files with 10 additions and 6 deletions

View File

@ -12,7 +12,7 @@ class SwitchProfileAction : public virtual ActionInterface
public:
void triggered() override
{
switchProfile(index);
settingsutils::switchProfile(index);
}
};
}

View File

@ -1,6 +1,8 @@
#include "buttons.h"
#include "modes/defaultmode.h"
using namespace std::chrono_literals;
int rotated{};
bool requestFullRedraw{};
@ -118,7 +120,7 @@ void InputDispatcher::profileButton(uint8_t index, bool pressed)
if (profileButtonDisabled)
return;
switchProfile(index);
settingsutils::switchProfile(index);
}
#ifdef SWITCH_BLINK

View File

@ -19,6 +19,8 @@
#include "globals.h"
#include "buttons.h"
using namespace std::chrono_literals;
namespace can {
namespace {
constexpr const char * const TAG = "BOBBYCAN";

View File

@ -7,7 +7,7 @@
#include "globals.h"
#include "presets.h"
namespace {
namespace settingsutils {
void switchProfile(uint8_t index)
{
#ifdef SIMPLIFIED_TRIGGER_TRIGGERONPRESET

View File

@ -2,6 +2,6 @@
#include <cstdint>
namespace {
namespace settingsutils {
void switchProfile(uint8_t index);
}

View File

@ -148,7 +148,7 @@ esp_err_t webserver_dump_nvs_handler(httpd_req_t *req)
continue;
}
#endif
switchProfile(profile_num);
settingsutils::switchProfile(profile_num);
const auto cur_profile = settingsPersister.currentlyOpenProfileIndex();
const auto profile_str = cur_profile ? std::to_string(*cur_profile) : "-";
@ -166,7 +166,7 @@ esp_err_t webserver_dump_nvs_handler(httpd_req_t *req)
});
}
switchProfile(switchBackProfile);
settingsutils::switchProfile(switchBackProfile);
std::string body;
serializeJson(doc, body);