fix
This commit is contained in:
6
main.cpp
6
main.cpp
@ -1605,7 +1605,7 @@ int run(const Config& cfg) {
|
|||||||
(cfg.channel_count <= 1U)
|
(cfg.channel_count <= 1U)
|
||||||
? 0.0
|
? 0.0
|
||||||
: (tty_group_state.sum_ch2 / static_cast<double>(tty_group_state.count_ch2));
|
: (tty_group_state.sum_ch2 / static_cast<double>(tty_group_state.count_ch2));
|
||||||
append_tty_frame(0x000A,
|
append_tty_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU,
|
||||||
static_cast<uint16_t>(tty_group_state.next_index),
|
static_cast<uint16_t>(tty_group_state.next_index),
|
||||||
static_cast<uint16_t>(pack_raw_code_to_int16(ch1_avg)),
|
static_cast<uint16_t>(pack_raw_code_to_int16(ch1_avg)),
|
||||||
static_cast<uint16_t>(pack_raw_code_to_int16(ch2_avg)));
|
static_cast<uint16_t>(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) {
|
for (uint32_t i = 0; i < raw_adc_count; ++i) {
|
||||||
const int16_t sample = pack_raw_code_to_int16(adc_raw_buffer[i]);
|
const int16_t sample = pack_raw_code_to_int16(adc_raw_buffer[i]);
|
||||||
if (cfg.channel_count <= 1U) {
|
if (cfg.channel_count <= 1U) {
|
||||||
append_tty_frame(0x000A,
|
append_tty_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU,
|
||||||
tty_state.next_index,
|
tty_state.next_index,
|
||||||
static_cast<uint16_t>(sample),
|
static_cast<uint16_t>(sample),
|
||||||
0U);
|
0U);
|
||||||
@ -1887,7 +1887,7 @@ int run(const Config& cfg) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
append_tty_frame(0x000A,
|
append_tty_frame( (cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU,
|
||||||
tty_state.next_index,
|
tty_state.next_index,
|
||||||
static_cast<uint16_t>(tty_state.pending_ch1),
|
static_cast<uint16_t>(tty_state.pending_ch1),
|
||||||
static_cast<uint16_t>(sample));
|
static_cast<uint16_t>(sample));
|
||||||
|
|||||||
@ -23,7 +23,7 @@ exec "$BIN" \
|
|||||||
start:di_syn2_rise \
|
start:di_syn2_rise \
|
||||||
stop:di_syn2_fall \
|
stop:di_syn2_fall \
|
||||||
sample_clock_hz:max \
|
sample_clock_hz:max \
|
||||||
range:0.2 \
|
range:5\
|
||||||
di1:trace \
|
di1:trace \
|
||||||
di1_group_avg \
|
di1_group_avg \
|
||||||
duration_ms:100 \
|
duration_ms:100 \
|
||||||
|
|||||||
@ -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) {
|
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,
|
index,
|
||||||
static_cast<uint16_t>(ch1_avg),
|
static_cast<uint16_t>(ch1_avg),
|
||||||
static_cast<uint16_t>(ch2_avg));
|
static_cast<uint16_t>(ch2_avg));
|
||||||
|
|||||||
Reference in New Issue
Block a user