Skip to content

Turn on title bar everywhere and enhance it #6698

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

Merged
merged 8 commits into from
Aug 5, 2022

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Aug 4, 2022

The title bar now has code execution status on all builds and BLE workflow info on those.

This PR also has a number of tweaks and fixes (hopefully not too distracting):

  • It uses libgcc from my Arch install for SAMD21 builds (saving >750 bytes it seems.)
  • Adds a UID: line to boot_out.txt so to identify a device from a mounted filesystem.
  • Fixes BLE workflow. (It was broken by the workflow reset refactoring with web workflow changes.)
  • Uses the ble name set on the adapter for the BLE workflow advertisements.
  • Removes supervisor.enable/disable_autoreload in favor of supervisor.runtime.autoreload.
  • Tweaks terminal scroll area so the bottom line is complete and the top is clipped under the title bar.
  • Tweaks Blinka logo sizing to match font size when possible (12px or 16px.)
  • Drops Wi-Fi: prefix when showing an IP to increase the likelihood it is all displayed.

tannewt added 7 commits August 4, 2022 16:33
* Tweak scroll area position so last line is complete and top is
  under the title bar.
* Pick Blinka size based on the font to minimize unused space in
  title bar. Related to micropython#2791
* Update the title bar after terminal is started. Fixes micropython#6078

Fixes micropython#6668
This replaces supervisor.enable_autoreload() and
supervisor.disable_autoreload(). It also allows user code to get
the current autoreload state.

Replaces micropython#5352 and part of micropython#5414
@tannewt tannewt requested a review from dhalbert August 4, 2022 23:41
@tannewt
Copy link
Member Author

tannewt commented Aug 4, 2022

Related issues: #6668, #6621, #6566, #6078, #4705, #5352, #5414, #2791

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! The code looks good. I noted the following things:

  1. The @n ExceptionName in the status bar does not include the filename. So for instance:
    code.py:
import busio
import x

x.py:

1/0

says @1 DivisionByZeroError without saying which file it's in. If you feel there is room, I think including the filename would be good, since the error may be quite deep. The filename and the line number are more important than a possibly truncated exception name.

  1. I connected, then changed the wifi password to be wrong, did a hard reset. I see "Authentication Failure" after a 15-second or so delay. Then I changed the password back to be correct, and did another hard reset. On the device display (Feather ESP32S2 TFT), the IP address is shown, but the terminal title bar (running tio) said "No IP", and it did not show the code.py output:. This is a little bizarre because it should have come up properly and printed the usual initial text. Instead tio just said "Connected" and idid not print anything. This seems like some kind of timing problem.

It's OK to merge as is, and consider these later. I can open issues about them.

@tannewt
Copy link
Member Author

tannewt commented Aug 5, 2022

If you feel there is room, I think including the filename would be good, since the error may be quite deep. The filename and the line number are more important than a possibly truncated exception name.

Ya, I agree that'd be better. I'm not exactly sure how to get that info atm. The line number was convenient and I was hoping it was the top level, not bottom. (But I obviously didn't test it.)

I can test on the Feather S2 TFT when I get to this. I didn't try it specifically. Up to you if you want to merge now or not. Either way these changes will cause full CI runs.

@dhalbert
Copy link
Collaborator

dhalbert commented Aug 5, 2022

I will open some issues and merge now.

dhalbert
dhalbert previously approved these changes Aug 5, 2022
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Merging now and will open issues for further work.

@dhalbert
Copy link
Collaborator

dhalbert commented Aug 5, 2022

Oops, there is a merge conflict anyway. Could you check on that, and then I'll approve and merge?

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