Skip to content

Commit

Permalink
Remove PGM macro
Browse files Browse the repository at this point in the history
  • Loading branch information
cziter15 committed Oct 2, 2023
1 parent e4e6ff8 commit fddae5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions firmware/src/apps/raesp/comps/RadioCommander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace apps::raesp::comps
void RadioCommander::sendMqttInfo(const std::string& info) const
{
if (auto mqttConnSp{mqttConnWp.lock()})
mqttConnSp->publish(PGM_("log"), info);
mqttConnSp->publish(PSTR("log"), info);
}

void RadioCommander::onMqttDevMessage(const std::string_view& topic, const std::string_view& payload)
Expand All @@ -76,7 +76,7 @@ namespace apps::raesp::comps
wifiLedSp->setBlinking(100, 5);

/* ... and tell MQTT via log channel about that. */
sendMqttInfo(PGM_("RadioCmd: Queue is full - discarding!"));
sendMqttInfo(PSTR("RadioCmd: Queue is full - discarding!"));
return;
}

Expand Down Expand Up @@ -174,10 +174,9 @@ namespace apps::raesp::comps
if (currentCommand.repeats <= 0)
{
sendMqttInfo(
PGM_("RadioCmd: Sent! "
"[ A: ") + ksf::to_string(currentCommand.address) +
PGM_(" | U: ") + ksf::to_string(currentCommand.unit) +
PGM_(" | V: ") + ksf::to_string(currentCommand.enable) + PGM_(" ]")
PSTR("RadioCmd: Sent! [ A: ") + ksf::to_string(currentCommand.address) +
PSTR(" | U: ") + ksf::to_string(currentCommand.unit) +
PSTR(" | V: ") + ksf::to_string(currentCommand.enable) + PSTR(" ]")
);

/* Pop current request (remove) from queue, coz we are done with it. */
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/apps/raesp/comps/TempSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace apps::raesp::comps
{
auto tempC{ds18handler->getTempC()};
if (fabsf(TEMP_SENSOR_INVALID_TEMP - tempC) > std::numeric_limits<float>::epsilon())
mqttConnSp->publish(PGM_("tempSensor"), ksf::to_string(tempC, 1));
mqttConnSp->publish(PSTR("tempSensor"), ksf::to_string(tempC, 1));
}
else
{
Expand Down

0 comments on commit fddae5b

Please sign in to comment.