regular backup

This commit is contained in:
ggw
2026-05-05 14:09:15 -05:00
parent 42f91eb075
commit 90cd2273f1
16 changed files with 835 additions and 96 deletions
+8 -4
View File
@@ -24,20 +24,24 @@ for class_type in data.namespace.classes:
format_args += f', "{element_type} {element_name}", offsetof({class_name}, {element_name}), sizeof({element_type})'
to_format_string += "\\n\\r"
work_string += f' cx = snprintf(buff, sizeof(buff), "{to_format_string}", {format_args});\n'
work_string += f' CDC_Transmit_FS((uint8_t*)buff, cx);\n'
work_string += f' HAL_Delay(10);\n\n'
work_string += ' if (to_file) {unsigned int bw; f_write(&file, buff, cx, &bw);}\n'
work_string += ' if (to_usb) {CDC_Transmit_FS((uint8_t*)buff, cx);}\n'
work_string += f' HAL_Delay(50);\n\n'
h_file_text = """
void data_description();
void data_description(bool to_usb, bool to_file);
"""
c_file_text = ("""#include "datadescriptor.hpp"
#include <cstddef>
#include <cstdio>
#include "fatfs.h"
#include "usbd_cdc_if.h"
#include "packet.hpp"
void data_description() {
extern FIL file;
void data_description(bool to_usb, bool to_file) {
char buff[200];
int cx;