-
Notifications
You must be signed in to change notification settings - Fork 19
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
Make row buffer two rows deep #105
Comments
The firmware will still need to signal to the desktop software when a row has been completed, and the desktop will still need to acknowledge and send a new row of data (except when starting the last row). But the firmware will not wait for this acknowledgement. Currently the end-of-line firmware beep is blocking (due to If the desktop acknowledgement lags for any reason then both the visual prompt (row number) and desktop end-of-line sound will be late. |
Regarding changes to the API, I think the way to go is to send the first line of data along with the |
API changes for AllYarnsAreBeautiful/ayab-firmware#105
After #193 this change will require the buffer to be enlarged. |
I don't think this change is necessary anymore, after #194 you can knit as fast you can move the carriage. |
As @X-sam says it appears delays are no longer as necessary as they once were (I think AllYarnsAreBeautiful/ayab-desktop#679 is the main reason though, #194 is mainly about taking advantage of the reduced latency). The idea of introducing some safety margin in the communication still makes sense to me, though. I don't think it necessarily requires any change to the protocol though, at least not in the format or size of the messages. My suggestion would be to have the firmware maintain two row buffers at any time: the one being knit from (driving solenoids as the carriage moves), and the one that can be updated by receiving Updates would then only be required to the timing of the
Note how in this setup, the firmware gets a full line of carriage movement to receive the next row's contents, compared to currently where relatively tight timing is still required to make sure the row data is here between the time the carriage turnaround is detected, and when the carriage's new trailing edge starts selecting needles. It doesn't look to me like this suggested timing change requires any change to the message formats. There may be an impact on the desktop app's presentation of which of the pattern's rows is currently being knit, since as far as I can tell, it currently relies on the reception of |
Forgot to add: despite thinking double-buffering rows would be a worthwhile improvement, I fully support moving this issue out of the 1.0 milestone. |
Moved out of 1.0.0 milestone. |
Currently, the firmware only stores a single row, which is the row which will be knit, respectively is current being knitted.
The data for the next row will be requested on the end of the current row.
The communication between the firmware and the desktop takes a moment, so the user has to wait for this communication to succeed before being allowed to move the carriage in the opposite direction and knit the next row.
We could get rid of this need to wait for the transfer of the next row by buffering an additional row in the mikrocontroller. So the controller would request two rows at the very beginning and therefore always has the n-th and n+1-th row available to knit.
Caveats:
The text was updated successfully, but these errors were encountered: