mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
firmware/installPybricksDialog: add bootloader discrimination
Also fix license not showing for newer hubs.
This commit is contained in:
@@ -57,3 +57,17 @@ export function hubHasExternalFlash(hub: Hub): boolean {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** Gets the bootloader type for the hub. */
|
||||
export function hubBootloaderType(hub: Hub) {
|
||||
switch (hub) {
|
||||
case Hub.Prime:
|
||||
case Hub.Essential:
|
||||
case Hub.Inventor:
|
||||
return 'usb-lego-dfu';
|
||||
case Hub.Move:
|
||||
case Hub.City:
|
||||
case Hub.Technic:
|
||||
return 'ble-lwp3-bootloader';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user