Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade crossterm to 0.25.0 #418

Merged
merged 1 commit into from
May 30, 2023
Merged

Conversation

jessebraham
Copy link
Member

@jessebraham jessebraham commented May 30, 2023

Computers were a mistake

(using 0.26.x somehow breaks things on Windows in weird circumstances)

@jessebraham jessebraham merged commit 4a11489 into esp-rs:main May 30, 2023
@jessebraham jessebraham deleted the fixes/crossterm branch May 30, 2023 16:38
@bjoernQ
Copy link
Contributor

bjoernQ commented Sep 13, 2023

I tried 0.27.0 today and it still gives us problems on Windows.

For the records: One (or probably the) issue is replicated as follows

  • create a batch file flashing and monitoring at least two ELF files
  • run the batch file
  • see the first application running
  • press CTRL-C
  • next ELF will get flashed fine but monitoring will immediately end

There is a workaround which probably would have even worked in 0.26.x

src\cli\monitor\mod.rs:160

                        KeyCode::Char('c') => {
                            poll(Duration::from_millis(100)).ok();
                            break;
                        },

Apparently since 0.26.0 the event somehow isn't consumed by read() and it reads the same again in the next run. Don't know the details t.b.h.

It's interesting that the event doesn't get picked up during flashing (but I think it's because at that stage it's handled by the ctrlc crate)

With the above change it just polls again and might or might not consume a queued event (CTRL-C)

@bjoernQ bjoernQ mentioned this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants