Fix firmware path initialization and upload logic in MultiDongle
- Always store firmware paths (scpu_fw_path, ncpu_fw_path) when provided, not just when upload_fw=True - Restore firmware upload condition to only run when upload_fw=True - Fix 'MultiDongle' object has no attribute 'scpu_fw_path' error during pipeline initialization - Ensure firmware paths are available for both upload and non-upload scenarios This resolves the pipeline deployment error where firmware paths were missing even when provided to the constructor, causing initialization failures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e34cdfb856
commit
049dedf2f7
@ -286,11 +286,9 @@ class MultiDongle:
|
||||
|
||||
self.upload_fw = upload_fw
|
||||
|
||||
# Check if the firmware is needed
|
||||
if self.upload_fw:
|
||||
self.scpu_fw_path = scpu_fw_path
|
||||
self.ncpu_fw_path = ncpu_fw_path
|
||||
|
||||
# Always store firmware paths when provided
|
||||
self.scpu_fw_path = scpu_fw_path
|
||||
self.ncpu_fw_path = ncpu_fw_path
|
||||
self.model_path = model_path
|
||||
self.device_group = None
|
||||
|
||||
@ -332,16 +330,16 @@ class MultiDongle:
|
||||
# kp.core.set_timeout(device_group=self.device_group, milliseconds=5000)
|
||||
# print(' - Success')
|
||||
|
||||
# if self.upload_fw:
|
||||
try:
|
||||
print('[Upload Firmware]')
|
||||
kp.core.load_firmware_from_file(device_group=self.device_group,
|
||||
scpu_fw_path=self.scpu_fw_path,
|
||||
ncpu_fw_path=self.ncpu_fw_path)
|
||||
print(' - Success')
|
||||
except kp.ApiKPException as exception:
|
||||
print('Error: upload firmware failed, error = \'{}\''.format(str(exception)))
|
||||
sys.exit(1)
|
||||
if self.upload_fw:
|
||||
try:
|
||||
print('[Upload Firmware]')
|
||||
kp.core.load_firmware_from_file(device_group=self.device_group,
|
||||
scpu_fw_path=self.scpu_fw_path,
|
||||
ncpu_fw_path=self.ncpu_fw_path)
|
||||
print(' - Success')
|
||||
except kp.ApiKPException as exception:
|
||||
print('Error: upload firmware failed, error = \'{}\''.format(str(exception)))
|
||||
sys.exit(1)
|
||||
|
||||
# upload model to device
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user