From 3817f214739414cb83f521069851b93078c61a9f Mon Sep 17 00:00:00 2001 From: awe Date: Wed, 15 Apr 2026 18:32:59 +0300 Subject: [PATCH] fix --- main.cpp | 6 +++--- run_di1_group_avg.sh | 2 +- tty_protocol_writer.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index f8816f3..d93f0fc 100644 --- a/main.cpp +++ b/main.cpp @@ -1605,7 +1605,7 @@ int run(const Config& cfg) { (cfg.channel_count <= 1U) ? 0.0 : (tty_group_state.sum_ch2 / static_cast(tty_group_state.count_ch2)); - append_tty_frame(0x000A, + append_tty_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU, static_cast(tty_group_state.next_index), static_cast(pack_raw_code_to_int16(ch1_avg)), static_cast(pack_raw_code_to_int16(ch2_avg))); @@ -1870,7 +1870,7 @@ int run(const Config& cfg) { for (uint32_t i = 0; i < raw_adc_count; ++i) { const int16_t sample = pack_raw_code_to_int16(adc_raw_buffer[i]); if (cfg.channel_count <= 1U) { - append_tty_frame(0x000A, + append_tty_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU, tty_state.next_index, static_cast(sample), 0U); @@ -1887,7 +1887,7 @@ int run(const Config& cfg) { continue; } - append_tty_frame(0x000A, + append_tty_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU, tty_state.next_index, static_cast(tty_state.pending_ch1), static_cast(sample)); diff --git a/run_di1_group_avg.sh b/run_di1_group_avg.sh index 9d97942..305c841 100755 --- a/run_di1_group_avg.sh +++ b/run_di1_group_avg.sh @@ -23,7 +23,7 @@ exec "$BIN" \ start:di_syn2_rise \ stop:di_syn2_fall \ sample_clock_hz:max \ - range:0.2 \ + range:5\ di1:trace \ di1_group_avg \ duration_ms:100 \ diff --git a/tty_protocol_writer.cpp b/tty_protocol_writer.cpp index f7e5c43..5c8f074 100644 --- a/tty_protocol_writer.cpp +++ b/tty_protocol_writer.cpp @@ -265,7 +265,7 @@ void TtyProtocolWriter::emit_packet_start(uint16_t marker) { } void TtyProtocolWriter::emit_step(uint16_t index, int16_t ch1_avg, int16_t ch2_avg) { - enqueue_frame(0x000A, + enqueue_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU, index, static_cast(ch1_avg), static_cast(ch2_avg));