Skip to content

Commit

Permalink
remove remaining FPSTR macro's
Browse files Browse the repository at this point in the history
  • Loading branch information
vortigont committed Sep 4, 2024
1 parent 78bf159 commit 4e726c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions espem/espem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void Espem::wdatareply(AsyncWebServerRequest *request){

const auto m = pz->getMetricsPZ004();
char buffer[JSON_SMPL_LEN];
sprintf_P(buffer, PGdatajsontpl,
sprintf(buffer, PGdatajsontpl,
pz->getState()->dataAge(),
m->asFloat(meter_t::vol),
m->asFloat(meter_t::cur),
Expand All @@ -147,7 +147,7 @@ void Espem::wdatareply(AsyncWebServerRequest *request){
m->asFloat(meter_t::frq),
m->asFloat(meter_t::pf)
);
request->send(200, FPSTR(PGmimejson), buffer );
request->send(200, PGmimejson, buffer );
}


Expand Down Expand Up @@ -190,7 +190,7 @@ void DataStorage::wsamples(AsyncWebServerRequest *request) {

LOG(printf, "TimeSeries buffer has %d items, scntr: %d\n", ts->getSize(), cnt);

AsyncWebServerResponse* response = request->beginChunkedResponse(FPSTR(PGmimejson),
AsyncWebServerResponse* response = request->beginChunkedResponse(PGmimejson,
[this, iter, ts](uint8_t* buffer, size_t buffsize, size_t index) mutable -> size_t {

// If provided bufer is not large enough to fit 1 sample chunk, than I'm just sending
Expand Down
4 changes: 2 additions & 2 deletions espem/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,15 @@ void set_directctrls(Interface *interf, const JsonObject *data, const char* acti
// ena/disable polling
if (sv.compare(V_EPOLLENA) == 0){
espem->set_uirate( (*data)[action] ? embui.paramVariant(V_UI_UPDRT) : 0);
LOG(printf_P, PSTR("ESPEM: UI refresh state: %d\n"), (*data)[A_EPOLLENA].as<int>() );
LOG(printf, "ESPEM: UI refresh state: %d\n", (*data)[A_EPOLLENA].as<int>() );
return;
}

// UI update rate
if (sv.compare(V_UI_UPDRT) == 0){
espem->set_uirate((*data)[action]);
embui.var(V_UI_UPDRT, espem->get_uirate());
LOG( printf_P, PSTR("ESPEM: Set UI update rate to: %d\n"), espem->get_uirate() );
LOG( printf, "ESPEM: Set UI update rate to: %d\n", espem->get_uirate() );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ all_serial1 =

[esp32_base]
extends = common
platform = espressif32
platform = espressif32 @ 6.8.1
board = wemos_d1_mini32
;upload_speed = 460800
monitor_filters = esp32_exception_decoder
Expand Down

0 comments on commit 4e726c1

Please sign in to comment.