-
Notifications
You must be signed in to change notification settings - Fork 9
Error with arduino-cli >= v1.0.0 #11
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
Comments
I did find the problem, but I do not have a neat solution for you... The problem is in the
but the new {
"detected_ports": [
{
"matching_boards": [
{
"name": "Arduino Uno",
"fqbn": "arduino:avr:uno"
}
],
"port": {
"address": "/dev/cu.usbmodem41214121",
"label": "/dev/cu.usbmodem41214121",
....<truncated>....
}
},
....<other ports>....
]
} It can be solved by re-defining the (defun arduino-cli--board ()
"Get connected Arduino board."
(let* ((usb-devices (alist-get 'detected_ports (arduino-cli--cmd-json "board list")))
(boards (seq-filter #'arduino-cli--arduino? usb-devices))
(boards-info (seq-map (lambda (m) (thread-first (assoc 'boards m) cdr (seq-elt 0))) boards))
(informed-boards (cl-mapcar (lambda (m n) (map-merge 'list m n)) boards boards-info))
(selected-board (arduino-cli--dispatch-board informed-boards))
(default-board (arduino-cli--default-board)))
(cond (selected-board selected-board)
(default-board default-board)
(t (error "ERROR: No board connected"))))) note the added I personally solved this by copying the whole That said, I can see why this cannot be changed as easily in this module, as this automatically breaks compatibility with the old behaviour of If @motform is interested, I could write a pull request to solve this (and similar problems) in a more robust way. To do this properly, I do need to know if @motform wants to support all versions of |
Thank you so much for using the library, and thank you @roelhem for offering to help with support for 1.0! I'm usually the one to champion backward compatibility, however, in this case, I think it is fair to drop backward compatibility to a .0 release. I'm also not that up to date with the values of the arduino community, but I reckon a someone how decides to use a terminal based solution is technical enough to be updated/troubleshoot. |
Hello! when I try to compile wtih the newer arduino-cli version >= 1.0.0,
I get this error: Wrong type argument: listp, (detected_ports . [((port (address . "/dev/ttyACM0") (label . "/dev/ttyACM0") (protocol . "serial") (protocol_label . "Serial Port (USB)") (properties (pid . "0x5385") (serialNumber . "HTK32") (vid ."0x27c6")) (hardware_id . "HTK32")))])
The text was updated successfully, but these errors were encountered: