OctoPrint-FirmwareUpdater icon indicating copy to clipboard operation
OctoPrint-FirmwareUpdater copied to clipboard

{disableverify} does not get replaced by space or -v if it is the last thing on the command line

Open cdsmith69 opened this issue 1 year ago • 3 comments

The {disableverify} parameter should be replaced by either -v or by a space, depending on the check box for "Disable write verification." But if it is the last thing on the command line the text {disableverify} is left unchanged in the command line that is called.

I believe this may be because of the trailing spaces in the replace commands in bossac.py:

if bossac_disableverify:
    bossac_command = bossac_command.replace(" {disableverify} ", " ")
else:
    bossac_command = bossac_command.replace(" {disableverify} ", " -v ")

If {disableverify} is the last thing on the command line the trailing space does not exist and the replace doesn't happen.

The context here is that I have a device that requires a more complicated flashing process than just one call to bossac, so I thought I would just put a shell script on the Raspberry Pi called proflash.sh that does the multiple steps I need, and run that script with the command line /home/pi/proflash.sh {bossac} {port} {firmware} {disableverify} instead of the usual bossac command line. But my script was getting "{disableverify}" instead of a space or -v. Flipping the order to /home/pi/proflash.sh {bossac} {port} {disableverify} {firmware} fixes the issue and the script gets the proper space or -v in place of {disableverify}.

cdsmith69 avatar Jul 28 '23 15:07 cdsmith69

Good catch, I'll take care of it.

benlye avatar Aug 03 '23 10:08 benlye

This issue has been automatically marked as stale because it has not had any recent activity. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed in 5 days.

github-actions[bot] avatar Aug 17 '23 13:08 github-actions[bot]

This issue has been automatically marked as stale because it has not had any recent activity. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed in 5 days.

github-actions[bot] avatar Sep 01 '23 01:09 github-actions[bot]

Good catch!!! ——————————————————

bhuliu avatar Jun 15 '24 08:06 bhuliu

Resolved in 1.14.1

benlye avatar Jun 22 '24 10:06 benlye

This issue has been automatically locked because there was no further activity after it was closed. Please open a new issue for any related problems.

github-actions[bot] avatar Jul 13 '24 13:07 github-actions[bot]