NAM A2 Calibration
This commit is contained in:
@@ -101,6 +101,7 @@ JSON_MAP_REFERENCE(PiPedalConfiguration, threads)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, logLevel)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, logHttpRequests)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, maxUploadSize)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, tone3000A2Models)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, accessPointGateway)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, accessPointServerAddress)
|
||||
JSON_MAP_REFERENCE(PiPedalConfiguration, isVst3Enabled)
|
||||
|
||||
@@ -45,6 +45,7 @@ private:
|
||||
bool logHttpRequests_ = false;
|
||||
int logLevel_ = 0;
|
||||
uint64_t maxUploadSize_ = 1024*1024;
|
||||
bool tone3000A2Models_ = true;
|
||||
std::string accessPointGateway_;
|
||||
std::string accessPointServerAddress_;
|
||||
bool isVst3Enabled_ = true;
|
||||
@@ -67,6 +68,7 @@ public:
|
||||
bool GetMLock() const { return mlock_; }
|
||||
uint64_t GetMaxUploadSize() const { return maxUploadSize_; }
|
||||
|
||||
bool GetTone3000A2Models() const { return tone3000A2Models_; }
|
||||
LogLevel GetLogLevel() const { return (LogLevel)this->logLevel_; }
|
||||
|
||||
bool LogHttpRequests() const { return this->logHttpRequests_; }
|
||||
|
||||
@@ -364,6 +364,8 @@ namespace pipedal
|
||||
|
||||
void Init(const PiPedalConfiguration &configuration);
|
||||
|
||||
const PiPedalConfiguration &Configuration() const { return configuration; }
|
||||
|
||||
void LoadLv2PluginInfo();
|
||||
void Load();
|
||||
|
||||
|
||||
@@ -1315,12 +1315,14 @@ static std::string StripPortNumber(const std::string &fromAddress)
|
||||
class InterceptConfig : public RequestHandler
|
||||
{
|
||||
private:
|
||||
PiPedalModel&model;
|
||||
uint64_t maxUploadSize;
|
||||
int portNumber;
|
||||
|
||||
public:
|
||||
InterceptConfig(int portNumber, uint64_t maxUploadSize)
|
||||
InterceptConfig(PiPedalModel&model,int portNumber, uint64_t maxUploadSize)
|
||||
: RequestHandler("/var/config.json"),
|
||||
model(model),
|
||||
maxUploadSize(maxUploadSize),
|
||||
portNumber(portNumber)
|
||||
{
|
||||
@@ -1337,6 +1339,7 @@ public:
|
||||
<< "\", \"ui_plugins\": [ ], \"max_upload_size\": " << maxUploadSize
|
||||
<< ", \"enable_auto_update\": " << (ENABLE_AUTO_UPDATE ? " true" : "false")
|
||||
<< ", \"has_wifi_device\": " << (HotspotManager::HasWifiDevice() ? " true" : "false")
|
||||
<< ", \"tone3000_A2_models\": " << (model.Configuration().GetTone3000A2Models() ? " true" : "false")
|
||||
<< " }";
|
||||
|
||||
return s.str();
|
||||
@@ -1396,7 +1399,7 @@ void pipedal::ConfigureWebServer(
|
||||
int port,
|
||||
size_t maxUploadSize)
|
||||
{
|
||||
std::shared_ptr<RequestHandler> interceptConfig{new InterceptConfig(port, maxUploadSize)};
|
||||
std::shared_ptr<RequestHandler> interceptConfig{new InterceptConfig(model,port, maxUploadSize)};
|
||||
server.AddRequestHandler(interceptConfig);
|
||||
|
||||
std::shared_ptr<DownloadIntercept> downloadIntercept = std::make_shared<DownloadIntercept>(&model);
|
||||
|
||||
Reference in New Issue
Block a user