Skip to content

Commit

Permalink
add comp buffer to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jweinst1 committed Jun 13, 2018
1 parent cd87adc commit ca4dcdb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/WindComp.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define WindComp_GT_NUM(val1, val2) *(double*)(val1) > *(double*)(val2)

unsigned char* WindComp_begin(void);
unsigned char* WindComp_ptr(void);
const unsigned char* WindComp_end(void);

unsigned WindComp_get_len(void);
Expand Down
5 changes: 5 additions & 0 deletions src/flow/WindComp.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ unsigned char* WindComp_begin(void)
return WindComp_BUF;
}

unsigned char* WindComp_ptr(void)
{
return WindComp_BUF + WindComp_ITEM_LEN;
}

const unsigned char* WindComp_end(void)
{
return WindComp_END;
Expand Down
6 changes: 5 additions & 1 deletion src/util/IOUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void IOUtil_debug(void)
WindState_print_mode();
printf("\nCommand: ");
WindState_print_cmd();
puts("\n..........Data.........");
puts("\n\n..........Data.........");
printf("Load Buffer: -> [ ");
IOUtil_print(WindData_load_begin(), WindData_load_ptr());
printf("]\n");
Expand All @@ -97,6 +97,10 @@ void IOUtil_debug(void)
printf("Inactive Buffer: -> [ ");
IOUtil_print(WindData_inactive_begin(), WindData_inactive_ptr());
printf("]\n");
puts("\n..........Computation.........");
printf("Comp Buffer: -> [ ");
IOUtil_print(WindComp_begin(), WindComp_ptr());
printf("]\n");
puts("________________________");
}

Expand Down

0 comments on commit ca4dcdb

Please sign in to comment.