updated the platform stuff to include the ethernet blue board

This commit is contained in:
csawatzky 2025-05-22 13:31:37 -06:00
parent f0295c7480
commit f39c0d1102
7 changed files with 32 additions and 7 deletions

View file

@ -79,7 +79,8 @@ class UploadFirmware extends React.Component<Props, State> {
pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLACK,
pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_GREEN,
pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLUE,
pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE
pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE,
pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE
].includes(platform);
var isChannelValid = [
pond.UpgradeChannel.UPGRADE_CHANNEL_ALPHA,
@ -229,6 +230,9 @@ class UploadFirmware extends React.Component<Props, State> {
</MenuItem>
<MenuItem value={pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE}>
V2 Wifi Blue
</MenuItem>
<MenuItem value={pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE}>
V2 Ethernet Blue
</MenuItem>
</TextField>
<TextField

View file

@ -14,6 +14,7 @@ interface FeatureVersionByPlatform {
v2CellGreen: string;
v2WifiBlue: string;
v2CellBlue: string;
v2EthBlue: string;
}
const featureVersions: Map<string, FeatureVersionByPlatform> = new Map([
@ -29,7 +30,8 @@ const featureVersions: Map<string, FeatureVersionByPlatform> = new Map([
v2CellBlack: "2.0.44",
v2CellGreen: "2.0.44",
v2WifiBlue: "2.0.44",
v2CellBlue: "2.0.44"
v2CellBlue: "2.0.44",
v2EthBlue: "2.0.44"
}
]
]);
@ -118,6 +120,8 @@ export class Device {
return this.status.firmwareVersion >= versions.v2WifiBlue;
case pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLUE:
return this.status.firmwareVersion >= versions.v2CellBlue;
case pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE:
return this.status.firmwareVersion >= versions.v2EthBlue;
default:
return false;
}

View file

@ -301,6 +301,9 @@ export default function DeviceSupport() {
<MenuItem value={pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLUE}>
V2 Cellular Blue
</MenuItem>
<MenuItem value={pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE}>
V2 Ethernet Blue
</MenuItem>
</Select>
</FormControl>
<Button color="primary" onClick={() => updateDevicePlatform(platform)}>

View file

@ -73,6 +73,8 @@ function getTooltip(platform: pond.DevicePlatform): string {
case pond.DevicePlatform.DEVICE_PLATFORM_PHOTON ||
pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_S3:
return "Communicates via Wi-Fi";
case pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE:
return "Communicates view Ethernet"
default:
return "";
}

View file

@ -4,7 +4,9 @@ import {
SignalCellular4Bar,
SignalWifi4Bar,
SignalCellularOff,
SignalWifiOff
SignalWifiOff,
Cable,
DoNotDisturb
} from "@mui/icons-material";
import { pond } from "protobuf-ts/pond";
@ -98,6 +100,15 @@ const V2_Wifi_Blue: DevicePlatformDescriber = {
platformName: "v2wifiblue"
};
const V2_Ethernet_Blue: DevicePlatformDescriber = {
platform: pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE,
label: "V2 Ethernet Blue",
description: "Communicates via ethernet",
icon: <Cable style={{ color: "#fff" }} />,
offlineIcon: <DoNotDisturb style={{ color: "#fff" }} />,
platformName: "v2ethernetblue"
};
const map = new Map<pond.DevicePlatform, DevicePlatformDescriber>([
[pond.DevicePlatform.DEVICE_PLATFORM_INVALID, Default],
[pond.DevicePlatform.DEVICE_PLATFORM_PHOTON, Photon],
@ -107,7 +118,8 @@ const map = new Map<pond.DevicePlatform, DevicePlatformDescriber>([
[pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLACK, V2_Cell_Black],
[pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_GREEN, V2_Cell_Green],
[pond.DevicePlatform.DEVICE_PLATFORM_V2_CELLULAR_BLUE, V2_Cell_Blue],
[pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE, V2_Wifi_Blue]
[pond.DevicePlatform.DEVICE_PLATFORM_V2_WIFI_BLUE, V2_Wifi_Blue],
[pond.DevicePlatform.DEVICE_PLATFORM_V2_ETHERNET_BLUE, V2_Ethernet_Blue]
]);
export function getDevicePlatformDescriber(platform: pond.DevicePlatform): DevicePlatformDescriber {