Skip to content

Commit

Permalink
fix end drive
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien committed Sep 18, 2024
1 parent 5c52199 commit 58b5b4a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .mirrord/mirrord.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"feature": {
"env": true,
"fs": {
"mode": "read"
},
"network": true
},
"kubeconfig": "~/.kube/myteslamate-prod.yaml",
"target": {
"namespace": "myteslamate"
}
}
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"name": "Launch Program",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/index.js",
"outFiles": ["${workspaceFolder}/**/*.js"]
"outFiles": ["${workspaceFolder}/**/*.js"],
"cwd": "${workspaceFolder}"
}
]
}
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ app.ws("/streaming/", (ws /*, req*/) => {
});
});

setInterval(function () {
/*setInterval(function () {
for (let key in tags) {
// check last event
if (lastTags[key]) {
Expand All @@ -117,7 +117,7 @@ setInterval(function () {
}
}
}
}, 60000);
}, 60000);*/

/**
* Transform a message from Tesla Telemetry to a websocket streaming message
Expand Down Expand Up @@ -187,7 +187,7 @@ function transformMessage(data) {
associativeArray["Latitude"], // est_lat
associativeArray["Longitude"], // est_lng
power, // power
associativeArray["Gear"] ?? "", // shift_state
associativeArray["Gear"] ?? "P", // shift_state
associativeArray["RatedRange"], // range
associativeArray["EstBatteryRange"], // est_range
associativeArray["GpsHeading"] ?? "", // heading
Expand Down

0 comments on commit 58b5b4a

Please sign in to comment.