-
Notifications
You must be signed in to change notification settings - Fork 1
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
Brushless v3 #87
Brushless v3 #87
Conversation
This makes saxi buildable on a raspberry pi zero (webpack OOMs even with 1.5Gb of memory). This also enables live-reload during development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am requesting changes for myself
Then we can test on real machines and undraft
Thank you for making sense of this large PR
console.log('unimplemented') | ||
// this.port.close() | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So with this, the firmware-version
command writes to stdout but seems to stay open - maybe the error is better UX as at least the command will exit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context: nornagon#176
I saw changing from "error" to -> "print firmware version and then error" as an improvement, but clearly the best answer is to fully implement it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With reverting WebSerial you fixed here: 2d5c5a1
I think if WebSerial is left in it needs to be await this.port.close()
?
export async function connectEBB (hardware: Hardware = 'v3', device: string | undefined): Promise<EBB | null> { | ||
if (!device) { | ||
const ebbs = await listEBBs() | ||
if (ebbs.length === 0) return null | ||
device = ebbs[0] | ||
} | ||
|
||
const port = await tryOpen(device) | ||
return new EBB(port, hardware) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe device: string | undefined
should be named com?: Com
here
tsconfig.cli.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Confirm that this only builds the cli files.
demandOption: true | ||
}) | ||
.parse() | ||
|
||
const newVersion = semver.inc(package.version, args.level) | ||
const newVersion = semver.inc(packageParsed.version, args.level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like packageParsed
might have gotten lost in the merge
public constructor(motions: Motion[]) { | ||
this.motions = motions; | ||
|
||
private readonly minPenPosition: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Comment on why and how this is used
// Uuuugh this is really hacky. We should instead store the | ||
// pen-up/pen-down heights in a single place and reference them from | ||
// the PenMotions. Then we can change them in just one place. | ||
if (j === this.motions.length - 3) { | ||
return new PenMotion(penDownHeight, Device.Axidraw.penPctToPos(0), motion.duration()); | ||
} else if (j === this.motions.length - 1) { | ||
return new PenMotion(Device.Axidraw.penPctToPos(0), penUpHeight, motion.duration()); | ||
// TODO: Remove this hack by storing the pen-up/pen-down heights | ||
// in a single place, and reference them from the PenMotions. | ||
if (j === this.motions.length - 1) { | ||
return new PenMotion(this.minPenPosition, penUpHeight, motion.duration()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is compensating for the additional pen home command we add to our existing plans. Would love to get a more thorough second look here, is this is a logic change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
})); | ||
// TODO: CHECK THAT Plan() doesn't overwrite the above motions with this.minPenPosition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: address this TODO
I will fix the conflicts and test within two days |
Thanks so much. I'm rather new to TypeScipt, after all, and your code is helping me learn as we go. My ultimate goal is to upstream everything into |
Alright, finally was able to test on my hardware - there are two known issues currently:
|
okay, it was nornagon#131 I am manually reverting the changes in nornagon#63 and seeing if that works (removing webserial support, sadly) |
07d142d
to
da405c4
Compare
Co-authored-by: Jonathan Dahan <[email protected]>
a5c7ae5
to
ff38c06
Compare
ff38c06
to
155ad2b
Compare
Going to close in favor of #94, and we can split out any other changes to other PRs |
@jedahan I think the best thing to do at this point is rebase your brushless support on top of
main
. I don't particularly care about my implementation; it served its purpose showing you a working model.I've therefore taken
jedahan:brushless-v2
and rebased on top of a116669.This became
alexrudd2:brushless-v3
.Please check out this branch and see how you like it.
I consolidated what I could, but still need to resolve:
esbuild
migrations diverged (Hence rebasing on top of a116669 rather than 18905d8).port.open()
problem, so there's a merge conflict with 18905d8