cleans to dump

This commit is contained in:
J. Nick Koston 2025-07-22 09:00:44 -10:00
parent 3d35b9679a
commit 5adc58f826
No known key found for this signature in database
2 changed files with 3 additions and 7 deletions

View File

@ -720,7 +720,6 @@ void DeviceInfoResponse::dump_to(std::string &out) const {
out.append(" area: ");
this->area.dump_to(out);
out.append("\n");
#endif
out.append("}");
}
@ -1187,7 +1186,6 @@ void CameraImageResponse::dump_to(std::string &out) const {
out.append(" data: ");
out.append(format_hex_pretty(this->data_ptr_, this->data_len_));
out.append("\n");
dump_field(out, "done", this->done);
#ifdef USE_DEVICES
dump_field(out, "device_id", this->device_id);
@ -1799,7 +1797,6 @@ void VoiceAssistantRequest::dump_to(std::string &out) const {
out.append(" audio_settings: ");
this->audio_settings.dump_to(out);
out.append("\n");
dump_field(out, "wake_word_phrase", this->wake_word_phrase_ref_);
out.append("}");
}
@ -1834,7 +1831,6 @@ void VoiceAssistantAudio::dump_to(std::string &out) const {
out.append(format_hex_pretty(reinterpret_cast<const uint8_t *>(this->data.data()), this->data.size()));
}
out.append("\n");
dump_field(out, "end", this->end);
out.append("}");
}

View File

@ -620,7 +620,7 @@ class StringType(TypeInfo):
# For SOURCE_BOTH, we need custom logic
o = f'out.append(" {self.name}: ");\n'
o += self.dump(f"this->{self.field_name}") + "\n"
o += 'out.append("\\n");\n'
o += 'out.append("\\n");'
return o
def get_size_calculation(self, name: str, force: bool = False) -> str:
@ -689,7 +689,7 @@ class MessageType(TypeInfo):
def dump_content(self) -> str:
o = f'out.append(" {self.name}: ");\n'
o += f"this->{self.field_name}.dump_to(out);\n"
o += 'out.append("\\n");\n'
o += 'out.append("\\n");'
return o
def get_size_calculation(self, name: str, force: bool = False) -> str:
@ -768,7 +768,7 @@ class BytesType(TypeInfo):
def dump_content(self) -> str:
o = f'out.append(" {self.name}: ");\n'
o += self.dump(f"this->{self.field_name}") + "\n"
o += 'out.append("\\n");\n'
o += 'out.append("\\n");'
return o
def get_size_calculation(self, name: str, force: bool = False) -> str: