Skip to content

Commit

Permalink
Flashing: Added ffc4p variant with USB BL preflashed. (#109)
Browse files Browse the repository at this point in the history
Fixed: combined variant creation didn't override the generic bootloader from the batch file with the variant specific bootloader.

Co-authored-by: Filip Jeretina <[email protected]>
  • Loading branch information
zrezke and Filip Jeretina authored Dec 11, 2024
1 parent b4356c4 commit 476daf7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
12 changes: 12 additions & 0 deletions batch/eeprom/DD2090_R7M1E7_oak_ffc_4p_usb_bl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"batchName": "",
"batchTime": 0,
"boardConf": "IR-C00M00-00",
"boardName": "DD2090",
"boardRev": "R7M1E7",
"productName": "OAK-FFC-4P",
"boardCustom": "",
"hardwareConf": "F0-FV00-BC000",
"boardOptions": 0,
"version": 7
}
9 changes: 9 additions & 0 deletions batch/oak_ffc_4p.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
"test_type": "OAK-1",
"options": {"bootloader": "header_usb", "imu": true},
"variants": [
{
"title":"OAK-FFC 4P (DD2090 R7M1E7) USB BL",
"description": "OAK-FFC 4P",
"eeprom":"eeprom/DD2090_R7M1E7_oak_ffc_4p_usb_bl.json",
"board_config_file": "OAK-FFC-4P.json",
"options": {
"bootloader": "usb"
}
},
{
"title":"OAK-FFC 4P (DD2090 R7M1E7)",
"description": "OAK-FFC 4P",
Expand Down
4 changes: 1 addition & 3 deletions boards_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def update(d: Dict, u: Dict):
else:
variant_combined["board_config"] = {"cameras": {}} # if no board config is specified, use an empty one (used for FCC cameras)
# Convert the bootloader string to an enum
variant_combined["options"]["bootloader"] = BootloaderType(options["bootloader"]) # convert string to enum
variant_combined["options"]["bootloader"] = BootloaderType(variant_combined["options"]["bootloader"]) # convert string to enum

if "board_config_file_2" in variant_combined:
board_config_path = device_file.parent / "../boards" / variant_combined["board_config_file_2"]
Expand All @@ -384,8 +384,6 @@ def update(d: Dict, u: Dict):
raise Exception(f"Couldn't load board config file at {board_config_path.resolve()} for device '{device_file.resolve()}'. Make sure the board_config_file field is set correctly in the device file.")
else:
variant_combined["board_config_2"] = {"cameras": {}} # if no board config is specified, use an empty one (used for FCC cameras)
# Convert the bootloader string to an enum
variant_combined["options"]["bootloader"] = BootloaderType(options["bootloader"]) # convert string to enum

variants_combined.append(variant_combined)

Expand Down

0 comments on commit 476daf7

Please sign in to comment.