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

Auto connect if only one port available #163

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

sebromero
Copy link
Collaborator

This PR enables auto connect for when only one port is available. It then displays the connection status in the status bar.

Screenshot 2024-12-17 at 16 58 06

@sebromero sebromero force-pushed the feature/auto-connect branch from 9b45012 to 02a31e7 Compare December 17, 2024 16:10
@sebromero sebromero requested a review from Copilot December 17, 2024 16:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • ui/arduino/main.css: Language not supported

ui/arduino/store.js Show resolved Hide resolved
@sebromero sebromero force-pushed the feature/auto-connect branch from 02a31e7 to 07fa1ce Compare December 17, 2024 16:14
@sebromero sebromero requested a review from ubidefeo December 17, 2024 16:15
@ubidefeo
Copy link
Collaborator

I noticed that every character input into the REPL is passed to ipcMain.handle('serial')

Handling IPC serial command: eval o
Handling IPC serial command: eval s
Handling IPC serial command: eval .
Handling IPC serial command: eval l
Handling IPC serial command: eval i
Handling IPC serial command: eval
Handling IPC serial command: eval (
Handling IPC serial command: eval )
Handling IPC serial command: eval
Handling IPC serial command: disconnect
ipcMain ilist-files /Users/ubidefeo/data/Sync/AppsDocuments/micropython
Handling IPC serial command: loadPorts
Handling IPC serial command: disconnect
Handling IPC serial command: loadPorts
Handling IPC serial command: connect /dev/tty.usbmodem101
Handling IPC serial command: getPrompt
Handling IPC serial command: getPrompt
Handling IPC serial command: ilistFiles /
ipcMain ilist-files /Users/ubidefeo/data/Sync/AppsDocuments/micropython
Handling IPC serial command: eval a
Handling IPC serial command: eval a
Handling IPC serial command: eval s
Handling IPC serial command: eval d
Handling IPC serial command: eval f
Handling IPC serial command: eval a
Handling IPC serial command: eval s
Handling IPC serial command: eval d
Handling IPC serial command: eval f
Handling IPC serial command: eval a
Handling IPC serial command: eval s
Handling IPC serial command: eval d
Handling IPC serial command: eval f
Handling IPC serial command: eval

to test run the app in dev mode npm run dev and look at the terminal while typing into the REPL

@ubidefeo
Copy link
Collaborator

ubidefeo commented Dec 18, 2024

@sebromero
I just realised it's also in development and main.
Probably introduced in the refactoring of serial

 ipcMain.handle('serial', (event, command, ...args) => {
    console.debug('Handling IPC serial command:', command, ...args)
    return serial[command](...args)
  })

What's the use of this one?

  eval: (d) => {
    return ipcRenderer.invoke('serial', 'eval', d)
  },

@sebromero
Copy link
Collaborator Author

@ubidefeo It's been like this before just that there was no output to the console. It just pipes every byte from the terminal to the serial port where it gets executed in the REPL on the board. Once you send a newline it executes the line. If you like we can implement a buffer and only send complete lines and special bytes like the REPL shortcut commands.

@ubidefeo
Copy link
Collaborator

@sebromero
maybe this needs a rebase after yesterday's fix for 0.11.1?

@sebromero sebromero force-pushed the feature/auto-connect branch from 07fa1ce to 371ac94 Compare December 19, 2024 09:28
@ubidefeo
Copy link
Collaborator

FYI: already merged this in feature/new-toolbar

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