CEC-5931 - Remove nonexistent remote commands

This commit is contained in:
padamsen_fisker
2024-04-04 16:01:59 -04:00
parent 5f3fce37bc
commit b0eef61f17
4 changed files with 121 additions and 172 deletions

View File

@@ -52,16 +52,6 @@ exports[`RemoteCommandsTab Render 1`] = `
>
Unlock doors
</option>
<option
value="vent_windows"
>
Vent windows
</option>
<option
value="close_windows"
>
Close windows
</option>
<option
value="flash_headlights"
>
@@ -77,11 +67,6 @@ exports[`RemoteCommandsTab Render 1`] = `
>
Alert
</option>
<option
value="precondition"
>
Precondition
</option>
<option
value="california_mode"
>

View File

@@ -20,13 +20,6 @@ const highMidLowOffMarks = [{
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 labelRemoved = (marks) => Array.from(marks).map((mark) => {
@@ -36,34 +29,9 @@ const labelRemoved = (marks) => Array.from(marks).map((mark) => {
const Commands = [
{ value: "doors_lock", label: "Lock doors" },
{ value: "doors_unlock", label: "Unlock doors" },
{value: "vent_windows", label: "Vent windows"},
{value: "close_windows", label: "Close windows"},
{ value: "flash_headlights", label: "Flash headlights" },
{ 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: {
dataFunc: (val, handleValChange) => {

View File

@@ -24,9 +24,7 @@ export const hmol = {
}
export const emptyCommands = [
"doors_lock", "doors_unlock", "vent_windows",
"close_windows", "trunk_close", "flash_headlights",
"alert"
"doors_lock", "doors_unlock", "trunk_close", "flash_headlights", "alert"
]
export const onOffCommands = ["california_mode", "steering_wheel_preheat", "defrost", "charging"]

View File

@@ -1,8 +1,6 @@
const Commands = [
{ value: "doors_lock", label: "Lock doors" },
{ value: "doors_unlock", label: "Unlock doors" },
{value: "vent_windows", label: "Vent windows"},
{value: "close_windows", label: "Close windows"},
{ value: "california_mode", label: "California mode" },
{ value: "trunk_open", label: "Open trunk" },
{ value: "trunk_close", label: "Close trunk " },