Skip to content

Commit ef6cf22

Browse files
fix: windows build
1 parent 33d5ace commit ef6cf22

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

generate_cffi_definitions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,10 @@ def fix_platform_specific_structs(cdef_content):
583583
)
584584

585585
if platform.system() == "Windows":
586-
# Windows version with HANDLE - use flexible struct
586+
# Windows version with HANDLE - use flexible struct for packet field
587587
platform_struct = """typedef struct
588588
{
589589
uint32_t packet_length;
590-
uint8_t packet[1200];
591590
Smpt_cmd_list cmd_list;
592591
void* serial_port_handle_;
593592
int8_t current_packet_number;
@@ -598,11 +597,10 @@ def fix_platform_specific_structs(cdef_content):
598597
...;
599598
} Smpt_device;"""
600599
else:
601-
# Linux/macOS version with descriptor - use flexible struct
600+
# Linux/macOS version with descriptor - use flexible struct for packet field
602601
platform_struct = """typedef struct
603602
{
604603
uint32_t packet_length;
605-
uint8_t packet[1200];
606604
Smpt_cmd_list cmd_list;
607605
int serial_port_descriptor;
608606
int8_t current_packet_number;

sciencemode/sciencemode.cdef

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
#define SMPT_DL_MAX_STRING_LENGTH ...
2-
#define SMPT_DL_4KHZ 4000
3-
4-
#define SMPT_DL_MAX_PATIENT_NAME_LENGTH ...
51
#define SMPT_DL_MAX_CHANNELS ...
62
#define SMPT_DL_1KHZ ...
7-
#define SMPT_DL_MAX_INVESTIGATOR_NAME_LENGTH ...
8-
#define SMPT_DL_2KHZ 2000
9-
3+
#define SMPT_DL_MAX_BLOCK_BYTES_LENGTH ...
104
#define SMPT_DL_MAX_FILE_ID_LENGTH ...
11-
#define SMPT_DL_MAX_FILE_NAME_LENGTH ...
125
#define SMPT_DL_MAX_SAMPLE_VALUE ...
13-
#define SMPT_DL_MAX_BLOCK_BYTES_LENGTH ...
6+
#define SMPT_DL_MAX_STRING_LENGTH ...
7+
#define SMPT_DL_MAX_INVESTIGATOR_NAME_LENGTH ...
148
#define SMPT_DL_FILE_SIZE_BYTES ...
9+
#define SMPT_DL_MAX_PATIENT_NAME_LENGTH ...
1510
#define SMPT_DL_MAX_N_MEASUREMENTS ...
11+
#define SMPT_DL_2KHZ 2000
12+
13+
#define SMPT_DL_4KHZ 4000
14+
1615
#define SMPT_DL_GUID_STRING_LENGTH ...
16+
#define SMPT_DL_MAX_FILE_NAME_LENGTH ...
1717
typedef enum
1818
{
1919
Smpt_Cmd_Ll_Init = ...,
@@ -255,7 +255,6 @@ typedef struct
255255
typedef struct
256256
{
257257
uint32_t packet_length;
258-
uint8_t packet[1200];
259258
Smpt_cmd_list cmd_list;
260259
int serial_port_descriptor;
261260
int8_t current_packet_number;

0 commit comments

Comments
 (0)