fix method tty
This commit is contained in:
6
main.cpp
6
main.cpp
@ -1420,6 +1420,8 @@ int run(const Config& cfg) {
|
||||
std::unique_ptr<TtyProtocolWriter> tty_writer;
|
||||
const bool tty_di1_group_average = cfg.tty_path.has_value() && cfg.di1_group_average;
|
||||
const bool fast_tty_avg_stream_mode = tty_di1_group_average;
|
||||
const uint16_t tty_packet_start_marker =
|
||||
(cfg.profile == CaptureProfile::Amplitude) ? 0x001AU : 0x000AU;
|
||||
if (cfg.tty_path) {
|
||||
const uint64_t typical_tty_batch_frames = (static_cast<uint64_t>(read_capacity_words) + 1U) / 2U;
|
||||
const uint64_t typical_tty_batch_bytes = typical_tty_batch_frames * sizeof(uint16_t) * 4U;
|
||||
@ -1431,7 +1433,7 @@ int run(const Config& cfg) {
|
||||
tty_ring_capacity_bytes = static_cast<std::size_t>(tty_ring_bytes_u64);
|
||||
tty_writer = std::make_unique<TtyProtocolWriter>(*cfg.tty_path, tty_ring_capacity_bytes);
|
||||
if (!tty_di1_group_average) {
|
||||
tty_writer->emit_packet_start();
|
||||
tty_writer->emit_packet_start(tty_packet_start_marker);
|
||||
}
|
||||
}
|
||||
std::unique_ptr<CaptureFileWriter> writer;
|
||||
@ -1587,7 +1589,7 @@ int run(const Config& cfg) {
|
||||
};
|
||||
|
||||
auto append_tty_packet_start = [&]() {
|
||||
append_tty_frame(0x000A, 0xFFFF, 0xFFFF, 0xFFFF);
|
||||
append_tty_frame(tty_packet_start_marker, 0xFFFF, 0xFFFF, 0xFFFF);
|
||||
};
|
||||
|
||||
auto append_tty_group_step = [&]() {
|
||||
|
||||
Reference in New Issue
Block a user