CEC-5931 - Remove nonexistent remote commands
This commit is contained in:
@@ -52,16 +52,6 @@ exports[`RemoteCommandsTab Render 1`] = `
|
|||||||
>
|
>
|
||||||
Unlock doors
|
Unlock doors
|
||||||
</option>
|
</option>
|
||||||
<option
|
|
||||||
value="vent_windows"
|
|
||||||
>
|
|
||||||
Vent windows
|
|
||||||
</option>
|
|
||||||
<option
|
|
||||||
value="close_windows"
|
|
||||||
>
|
|
||||||
Close windows
|
|
||||||
</option>
|
|
||||||
<option
|
<option
|
||||||
value="flash_headlights"
|
value="flash_headlights"
|
||||||
>
|
>
|
||||||
@@ -77,11 +67,6 @@ exports[`RemoteCommandsTab Render 1`] = `
|
|||||||
>
|
>
|
||||||
Alert
|
Alert
|
||||||
</option>
|
</option>
|
||||||
<option
|
|
||||||
value="precondition"
|
|
||||||
>
|
|
||||||
Precondition
|
|
||||||
</option>
|
|
||||||
<option
|
<option
|
||||||
value="california_mode"
|
value="california_mode"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {Grid, Slider, Switch} from "@material-ui/core";
|
import { Grid, Slider, Switch } from "@material-ui/core";
|
||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
|
||||||
const tempMarks = [...[{value: 0, label: "Off"}, {value: 1, label: "On"},],
|
const tempMarks = [...[{ value: 0, label: "Off" }, { value: 1, label: "On" },],
|
||||||
...Array.from({length: 26}, (_, i) => {
|
...Array.from({ length: 26 }, (_, i) => {
|
||||||
return {value: i + 2, label: `${i + 15}°C`}
|
return { value: i + 2, label: `${i + 15}°C` }
|
||||||
})];
|
})];
|
||||||
|
|
||||||
const valuetext = (value) => {
|
const valuetext = (value) => {
|
||||||
return `${value}`;
|
return `${value}`;
|
||||||
@@ -20,50 +20,18 @@ const highMidLowOffMarks = [{
|
|||||||
value: 0, label: "Off",
|
value: 0, label: "Off",
|
||||||
},]
|
},]
|
||||||
|
|
||||||
const precondMarks = [
|
|
||||||
{value: 0, label: "Battery"},
|
|
||||||
{value: 1, label: "All"},
|
|
||||||
{value: 2, label: "Climate"},
|
|
||||||
{value: 3, label: "Stop"},
|
|
||||||
]
|
|
||||||
|
|
||||||
const labelFunc = (marks) => (value) => marks.find(mark => mark.value === value)?.label;
|
const labelFunc = (marks) => (value) => marks.find(mark => mark.value === value)?.label;
|
||||||
|
|
||||||
const labelRemoved = (marks) => Array.from(marks).map((mark) => {
|
const labelRemoved = (marks) => Array.from(marks).map((mark) => {
|
||||||
return {value: mark.value}
|
return { value: mark.value }
|
||||||
})
|
})
|
||||||
|
|
||||||
const Commands = [
|
const Commands = [
|
||||||
{value: "doors_lock", label: "Lock doors"},
|
{ value: "doors_lock", label: "Lock doors" },
|
||||||
{value: "doors_unlock", label: "Unlock doors"},
|
{ value: "doors_unlock", label: "Unlock doors" },
|
||||||
{value: "vent_windows", label: "Vent windows"},
|
{ value: "flash_headlights", label: "Flash headlights" },
|
||||||
{value: "close_windows", label: "Close windows"},
|
{ value: "trunk_close", label: "Close trunk" },
|
||||||
{value: "flash_headlights", label: "Flash headlights"},
|
{ value: "alert", label: "Alert" },
|
||||||
{value: "trunk_close", label: "Close trunk"},
|
|
||||||
{value: "alert", label: "Alert"},
|
|
||||||
{
|
|
||||||
value: "precondition", label: "Precondition", params: {
|
|
||||||
dataFunc: (val, handleValChange) => <span>
|
|
||||||
<Typography id="precondition-slider" gutterBottom>
|
|
||||||
Set driver seat preheat
|
|
||||||
</Typography>
|
|
||||||
<Slider
|
|
||||||
valueLabelFormat={labelFunc(precondMarks)}
|
|
||||||
getAriaValueText={labelFunc(precondMarks)}
|
|
||||||
defaultValue={0}
|
|
||||||
value={val}
|
|
||||||
aria-labelledby="precondition-slider"
|
|
||||||
valueLabelDisplay="auto"
|
|
||||||
step={null}
|
|
||||||
min={0}
|
|
||||||
max={3}
|
|
||||||
marks={precondMarks}
|
|
||||||
size="small"
|
|
||||||
onChange={handleValChange}
|
|
||||||
/>
|
|
||||||
</span>,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
value: "california_mode", label: "California mode", params: {
|
value: "california_mode", label: "California mode", params: {
|
||||||
dataFunc: (val, handleValChange) => {
|
dataFunc: (val, handleValChange) => {
|
||||||
@@ -78,7 +46,7 @@ const Commands = [
|
|||||||
<Grid component="label" container alignItems="center" spacing={1}>
|
<Grid component="label" container alignItems="center" spacing={1}>
|
||||||
<Grid item>Off</Grid>
|
<Grid item>Off</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Switch checked={val} onChange={handleValChange} name="checkedC"/>
|
<Switch checked={val} onChange={handleValChange} name="checkedC" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>On</Grid>
|
<Grid item>On</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -146,7 +114,7 @@ const Commands = [
|
|||||||
<Grid component="label" container alignItems="center" spacing={1}>
|
<Grid component="label" container alignItems="center" spacing={1}>
|
||||||
<Grid item>Off</Grid>
|
<Grid item>Off</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Switch checked={val} onChange={handleValChange} name="checkedC"/>
|
<Switch checked={val} onChange={handleValChange} name="checkedC" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>On</Grid>
|
<Grid item>On</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -214,7 +182,7 @@ const Commands = [
|
|||||||
<Grid component="label" container alignItems="center" spacing={1}>
|
<Grid component="label" container alignItems="center" spacing={1}>
|
||||||
<Grid item>Off</Grid>
|
<Grid item>Off</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Switch checked={val} onChange={handleValChange} name="checkedC"/>
|
<Switch checked={val} onChange={handleValChange} name="checkedC" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>On</Grid>
|
<Grid item>On</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -237,7 +205,7 @@ const Commands = [
|
|||||||
<Grid component="label" container alignItems="center" spacing={1}>
|
<Grid component="label" container alignItems="center" spacing={1}>
|
||||||
<Grid item>Off</Grid>
|
<Grid item>Off</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Switch checked={val} onChange={handleValChange} name="checkedC"/>
|
<Switch checked={val} onChange={handleValChange} name="checkedC" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>On</Grid>
|
<Grid item>On</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const onOff = {
|
|||||||
export const onOffTemp = {
|
export const onOffTemp = {
|
||||||
0: "off",
|
0: "off",
|
||||||
1: "on",
|
1: "on",
|
||||||
...Object.fromEntries(Array.from({length: 26}, (_, i) => [i+2, `${i+15}`]))
|
...Object.fromEntries(Array.from({ length: 26 }, (_, i) => [i + 2, `${i + 15}`]))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const precond = {
|
export const precond = {
|
||||||
@@ -24,9 +24,7 @@ export const hmol = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const emptyCommands = [
|
export const emptyCommands = [
|
||||||
"doors_lock", "doors_unlock", "vent_windows",
|
"doors_lock", "doors_unlock", "trunk_close", "flash_headlights", "alert"
|
||||||
"close_windows", "trunk_close", "flash_headlights",
|
|
||||||
"alert"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export const onOffCommands = ["california_mode", "steering_wheel_preheat", "defrost", "charging"]
|
export const onOffCommands = ["california_mode", "steering_wheel_preheat", "defrost", "charging"]
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
const Commands = [
|
const Commands = [
|
||||||
{value: "doors_lock", label: "Lock doors"},
|
{ value: "doors_lock", label: "Lock doors" },
|
||||||
{value: "doors_unlock", label: "Unlock doors"},
|
{ value: "doors_unlock", label: "Unlock doors" },
|
||||||
{value: "vent_windows", label: "Vent windows"},
|
{ value: "california_mode", label: "California mode" },
|
||||||
{value: "close_windows", label: "Close windows"},
|
{ value: "trunk_open", label: "Open trunk" },
|
||||||
{value: "california_mode", label: "California mode"},
|
{ value: "trunk_close", label: "Close trunk " },
|
||||||
{value: "trunk_open", label: "Open trunk"},
|
{ value: "flash_headlights", label: "Flash headlights" },
|
||||||
{value: "trunk_close", label: "Close trunk "},
|
{ value: "alert", label: "Alert" },
|
||||||
{value: "flash_headlights", label: "Flash headlights"},
|
{ value: "temp_cabin", label: "Set cabin temperature" },
|
||||||
{value: "alert", label: "Alert"},
|
|
||||||
{value: "temp_cabin", label: "Set cabin temperature"},
|
|
||||||
{
|
{
|
||||||
value: "temp_cabin",
|
value: "temp_cabin",
|
||||||
label: "Set cabin temperature for period",
|
label: "Set cabin temperature for period",
|
||||||
@@ -16,11 +14,11 @@ const Commands = [
|
|||||||
data: ""
|
data: ""
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{value: "defrost", label: "Defrost"},
|
{ value: "defrost", label: "Defrost" },
|
||||||
{value: "driver_seat_preheat", label: "Driver seat preheat"},
|
{ value: "driver_seat_preheat", label: "Driver seat preheat" },
|
||||||
{value: "passenger_seat_preheat", label: "Preheat passenger seat"},
|
{ value: "passenger_seat_preheat", label: "Preheat passenger seat" },
|
||||||
{value: "steering_wheel_preheat", label: "Preheat Steering wheel"},
|
{ value: "steering_wheel_preheat", label: "Preheat Steering wheel" },
|
||||||
{value: "precondition", label: "Precondition"},
|
{ value: "precondition", label: "Precondition" },
|
||||||
{value: "charging", label: "Charging"}]
|
{ value: "charging", label: "Charging" }]
|
||||||
|
|
||||||
export default Commands;
|
export default Commands;
|
||||||
|
|||||||
Reference in New Issue
Block a user