firmware/installPybricksDialog: add bootloader discrimination

Also fix license not showing for newer hubs.
This commit is contained in:
David Lechner
2022-07-20 18:51:45 -05:00
parent 709c3c554b
commit bb6f86ff18
5 changed files with 43 additions and 5 deletions
+14
View File
@@ -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';
}
}