Add nmake build and capture run example
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
TARGET = main.exe
|
||||||
|
BUILDDIR = build
|
||||||
|
SOURCES = main.cpp capture_file_writer.cpp tty_protocol_writer.cpp
|
||||||
|
OBJS = $(BUILDDIR)\main.obj $(BUILDDIR)\capture_file_writer.obj $(BUILDDIR)\tty_protocol_writer.obj
|
||||||
|
CXXFLAGS = /nologo /std:c++17 /EHsc /O2 /I.
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): $(SOURCES)
|
||||||
|
if not exist $(BUILDDIR) mkdir $(BUILDDIR)
|
||||||
|
cl $(CXXFLAGS) /Fo$(BUILDDIR)\ /Fd$(BUILDDIR)\ /Fe$(TARGET) $(SOURCES)
|
||||||
|
|
||||||
|
rebuild: clean all
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-del /Q $(TARGET) 2>nul
|
||||||
|
-if exist $(BUILDDIR) rmdir /S /Q $(BUILDDIR)
|
||||||
|
|
||||||
|
run-help: $(TARGET)
|
||||||
|
$(TARGET) help
|
||||||
12
main.cpp
12
main.cpp
@ -1251,7 +1251,17 @@ int run(const Config& cfg) {
|
|||||||
<< " ADC range: +/-" << range_to_volts(cfg.range) << " V\n"
|
<< " ADC range: +/-" << range_to_volts(cfg.range) << " V\n"
|
||||||
<< " max frames per packet per channel: " << target_frames << "\n";
|
<< " max frames per packet per channel: " << target_frames << "\n";
|
||||||
|
|
||||||
CaptureFileWriter writer(cfg.csv_path, cfg.svg_path, cfg.live_html_path, cfg.live_json_path);
|
CaptureFileWriter writer(cfg.csv_path,
|
||||||
|
cfg.svg_path,
|
||||||
|
cfg.live_html_path,
|
||||||
|
cfg.live_json_path,
|
||||||
|
cfg.full_res_live,
|
||||||
|
cfg.live_history_packets,
|
||||||
|
cfg.di1_group_average);
|
||||||
|
std::unique_ptr<TtyProtocolWriter> tty_writer;
|
||||||
|
if (cfg.tty_path) {
|
||||||
|
tty_writer = std::make_unique<TtyProtocolWriter>(*cfg.tty_path);
|
||||||
|
}
|
||||||
writer.initialize_live_plot();
|
writer.initialize_live_plot();
|
||||||
writer.initialize_csv(cfg.channel_count, cfg.di1_mode == Di1Mode::Trace);
|
writer.initialize_csv(cfg.channel_count, cfg.di1_mode == Di1Mode::Trace);
|
||||||
std::cout << " live plot html: " << writer.live_html_path() << "\n"
|
std::cout << " live plot html: " << writer.live_html_path() << "\n"
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
vclock:internal internal_ref_hz:2000000 start:di_syn2_rise stop:di_syn2_fall sample_clock_hz:max range:0.2 di1:trace di1_group_avg full_res_live live_history_packets:8 duration_ms:100 packet_limit:0 csv:capture.csv svg:capture.svg
|
.\main.exe clock:internal internal_ref_hz:2000000 start:di_syn2_rise stop:di_syn2_fall sample_clock_hz:max range:0.2 di1:trace di1_group_avg full_res_live live_history_packets:8 duration_ms:100 packet_limit:0 csv:capture.csv svg:capture.svg
|
||||||
|
|||||||
Reference in New Issue
Block a user