-
-
Notifications
You must be signed in to change notification settings - Fork 491
Pluggable monitor #982
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
Pluggable monitor #982
Conversation
- reset board does not reconnect
- closing the monitor and re-opening fixes the problem
- missing disconnected status in the serial monitor panel
- serial plotter connect to the right port only when the serial monitor is open
- this is probably due to the fact that the monitor updates the status of the UI with the correct port
- upload is broken
builds are at the bottom of this page, let me know if you can't see them
https://github.com/arduino/arduino-ide/actions/runs/2447002574
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
...into pluggable-monitor # Conflicts: # arduino-ide-extension/package.json # arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx # arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-dialog.tsx # arduino-ide-extension/src/browser/serial/monitor/monitor-widget.tsx # arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-input.tsx # arduino-ide-extension/src/node/arduino-ide-backend-module.ts
PaulStoffregen
commented
Jun 7, 2022
PaulStoffregen
commented
Jun 7, 2022
Overall speed of more than half a million lines/sec is also quite good.
PaulStoffregen
commented
Jun 7, 2022
Running a Teensy 4.0 overclocked to 912 MHz, and the pluggable monitor is managing 785000 lines/sec. Very respectable speed.
I have some rough edges to fix in my package's uploading utility. Looks like the IDE has some minor serial monitor bugs, probably unrelated to pluggable monitor.
...monitor # Conflicts: # arduino-ide-extension/package.json # arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts # arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-dialog.tsx # arduino-ide-extension/src/browser/serial/monitor/monitor-widget.tsx # arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-input.tsx # arduino-ide-extension/src/browser/theia/core/shell-layout-restorer.ts # arduino-ide-extension/src/node/arduino-ide-backend-module.ts
ubidefeo
commented
Jun 7, 2022
Thank you, @PaulStoffregen
We really appreciate your feedback and we know some things need adjusting but feel like this is a great milestone for CLI and IDE 2.0 :)
Uh oh!
There was an error while loading. Please reload this page.
Motivation
The main reason for this PR is to use the latest "pluggable monitor" gRPC APIs #769. But in order to use the new APIs, we needed to refactor all the Serial Monitor architecture. All this work allowed us to solve a number of issues that weren't impossible or too expensive to solve before the change, and we also took advantage of this effort to implement a more solid architecture.
This PR solves:
Change description
The architecture has been redesigned like this:
image
Call Stack / Event Flow when opening Serial monitor or Plotter
Numbers correspond to those in the diagram above.
monitor-widget
orplotter-frontend-contribution
) from the IDE;monitor-widget
orplotter-frontend-contribution
invokes.startMonitor()
method onmonitor-manager-proxy-client-impl
from.onBeforeAttach()
or.startPlotter()
, respectively;monitor-manager-proxy-client-impl.startMonitor()
invokes.startMonitor()
method onmonitor-manager-proxy-impl
;monitor-manager-proxy-impl.startMonitor()
invokes.startMonitor()
method onmonitor-manager
;monitor-manager
creates amonitor-service
frommonitor-service-factory
if not existing, injectingmonitor-settings-provider-impl
andweb-socket-provider-impl
;monitor-manager
invokes.start()
method on created/existingmonitor-service
;monitor-service.start()
method is returned to themonitor-manager-proxy-impl
when it's duplex connection is successfully connected (if no error);monitor-manager-proxy-impl
invokes.connect()
on themonitor-manager-proxy-client-impl
if value returned frommonitor-service.start()
method isStatus.OK
orStatus.ALREADY_CONNECTED
;monitor-service
;Reviewer checklist