Skip to content

Commit

Permalink
Add microseconds to OOK pulse data outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Mar 24, 2024
1 parent 7751b57 commit c00aa10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules/FindLibUSB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ set(LibUSB_VERSION ${PC_LibUSB_VERSION})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LibUSB_FOUND to TRUE
# if all listed variables are TRUE
# Note that `FOUND_VAR LibRTLSDR_FOUND` is needed for cmake 3.2 and older.
# Note that `FOUND_VAR LibUSB_FOUND` is needed for cmake 3.2 and older.
find_package_handle_standard_args(LibUSB
FOUND_VAR LibUSB_FOUND
REQUIRED_VARS LibUSB_LIBRARY LibUSB_INCLUDE_DIR
Expand Down
6 changes: 3 additions & 3 deletions src/pulse_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void pulse_data_print_vcd_header(FILE *file, uint32_t sample_rate)
timescale = "1 us";
else
timescale = "100 ns";
chk_ret(fprintf(file, "$date %s $end\n", format_time_str(time_str, NULL, 0, 0)));
chk_ret(fprintf(file, "$date %s $end\n", usecs_time_str(time_str, NULL, 0, 0)));
chk_ret(fprintf(file, "$version rtl_433 0.1.0 $end\n"));
chk_ret(fprintf(file, "$comment Acquisition at %s Hz $end\n", nice_freq(sample_rate)));
chk_ret(fprintf(file, "$timescale %s $end\n", timescale));
Expand Down Expand Up @@ -176,7 +176,7 @@ void pulse_data_print_pulse_header(FILE *file)
chk_ret(fprintf(file, ";version 1\n"));
chk_ret(fprintf(file, ";timescale 1us\n"));
// chk_ret(fprintf(file, ";samplerate %u\n", data->sample_rate));
chk_ret(fprintf(file, ";created %s\n", format_time_str(time_str, NULL, 1, 0)));
chk_ret(fprintf(file, ";created %s\n", usecs_time_str(time_str, NULL, 1, 0)));
}

void pulse_data_dump(FILE *file, pulse_data_t const *data)
Expand All @@ -187,7 +187,7 @@ void pulse_data_dump(FILE *file, pulse_data_t const *data)

char time_str[LOCAL_TIME_BUFLEN];

chk_ret(fprintf(file, ";received %s\n", format_time_str(time_str, NULL, 1, 0)));
chk_ret(fprintf(file, ";received %s\n", usecs_time_str(time_str, NULL, 1, 0)));
if (data->fsk_f2_est) {
chk_ret(fprintf(file, ";fsk %u pulses\n", data->num_pulses));
chk_ret(fprintf(file, ";freq1 %.0f\n", data->freq1_hz));
Expand Down

0 comments on commit c00aa10

Please sign in to comment.