diff --git a/lib/MiLight/PacketFormatter.cpp b/lib/MiLight/PacketFormatter.cpp index 333c0872..396b58e3 100644 --- a/lib/MiLight/PacketFormatter.cpp +++ b/lib/MiLight/PacketFormatter.cpp @@ -171,12 +171,12 @@ void PacketFormatter::format(uint8_t const* packet, char* buffer) { } void PacketFormatter::formatV1Packet(uint8_t const* packet, char* buffer) { - buffer += sprintf_P(buffer, "Request type : %02X\n", packet[0]) ; - buffer += sprintf_P(buffer, "Device ID : %02X%02X\n", packet[1], packet[2]); - buffer += sprintf_P(buffer, "b1 : %02X\n", packet[3]); - buffer += sprintf_P(buffer, "b2 : %02X\n", packet[4]); - buffer += sprintf_P(buffer, "b3 : %02X\n", packet[5]); - buffer += sprintf_P(buffer, "Sequence Num. : %02X", packet[6]); + buffer += sprintf_P(buffer, PSTR("Request type : %02X\n"), packet[0]) ; + buffer += sprintf_P(buffer, PSTR("Device ID : %02X%02X\n"), packet[1], packet[2]); + buffer += sprintf_P(buffer, PSTR("b1 : %02X\n"), packet[3]); + buffer += sprintf_P(buffer, PSTR("b2 : %02X\n"), packet[4]); + buffer += sprintf_P(buffer, PSTR("b3 : %02X\n"), packet[5]); + buffer += sprintf_P(buffer, PSTR("Sequence Num. : %02X"), packet[6]); } size_t PacketFormatter::getPacketLength() const { diff --git a/lib/MiLight/RgbPacketFormatter.cpp b/lib/MiLight/RgbPacketFormatter.cpp index 94da1b37..5a58fbb3 100644 --- a/lib/MiLight/RgbPacketFormatter.cpp +++ b/lib/MiLight/RgbPacketFormatter.cpp @@ -120,9 +120,9 @@ BulbId RgbPacketFormatter::parsePacket(const uint8_t* packet, JsonObject result) } void RgbPacketFormatter::format(uint8_t const* packet, char* buffer) { - buffer += sprintf_P(buffer, "b0 : %02X\n", packet[0]); - buffer += sprintf_P(buffer, "ID : %02X%02X\n", packet[1], packet[2]); - buffer += sprintf_P(buffer, "Color : %02X\n", packet[3]); - buffer += sprintf_P(buffer, "Command : %02X\n", packet[4]); - buffer += sprintf_P(buffer, "Sequence : %02X\n", packet[5]); + buffer += sprintf_P(buffer, PSTR("b0 : %02X\n"), packet[0]); + buffer += sprintf_P(buffer, PSTR("ID : %02X%02X\n"), packet[1], packet[2]); + buffer += sprintf_P(buffer, PSTR("Color : %02X\n"), packet[3]); + buffer += sprintf_P(buffer, PSTR("Command : %02X\n"), packet[4]); + buffer += sprintf_P(buffer, PSTR("Sequence : %02X\n"), packet[5]); }