Skip to content

Commit 23f324a

Browse files
committed
Remove debug printing to make FujiBusPacket compatible with pico
1 parent 10acbe9 commit 23f324a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/bus/rs232/FujiBusPacket.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#include "FujiBusPacket.h"
22

3-
#include "../../include/debug.h"
4-
#include "utils.h"
5-
63
typedef struct {
74
uint8_t device; /* Destination Device */
85
uint8_t command; /* Command */
@@ -98,8 +95,6 @@ bool FujiBusPacket::parse(std::string_view input)
9895
fujibus_header *hdr;
9996
std::string_view slipEncoded = input;
10097

101-
Debug_printv("Incoming:\n%s\n", util_hexdump(input.data(), input.size()).c_str());
102-
10398
size_t slipMarker = input.find(SLIP_END);
10499
if (slipMarker != std::string::npos)
105100
slipEncoded = std::string_view(input).substr(slipMarker);
@@ -110,13 +105,10 @@ bool FujiBusPacket::parse(std::string_view input)
110105
return false;
111106

112107
decoded = decodeSLIP(slipEncoded);
113-
Debug_printv("Decoded:\n%s\n", util_hexdump(decoded.data(), decoded.size()).c_str());
114108

115109
if (decoded.size() < sizeof(fujibus_header))
116110
return false;
117111
hdr = (fujibus_header *) &decoded[0];
118-
Debug_printv("Header: dev:%02x cmd:%02x len:%d chk:%02x fld:%02x",
119-
hdr->device, hdr->command, hdr->length, hdr->checksum, hdr->descr);
120112

121113
if (hdr->length != decoded.size())
122114
return false;
@@ -235,11 +227,7 @@ std::string FujiBusPacket::serialize()
235227
hptr = (fujibus_header *) output.data();
236228
*hptr = hdr;
237229
hptr->checksum = calcChecksum(output);
238-
Debug_printv("Packet header: dev:%02x cmd:%02x len:%d chk:%02x fld:%02x",
239-
hptr->device, hptr->command, hptr->length, hptr->checksum, hptr->descr);
240-
Debug_printv("\n%s\n", util_hexdump(output.data(), output.size()).c_str());
241230
auto encoded = encodeSLIP(output);
242-
Debug_printv("Encoded:\n%s\n", util_hexdump(encoded.data(), encoded.size()).c_str());
243231
return encoded;
244232
}
245233

0 commit comments

Comments
 (0)