🐛 Imu temp in message

This commit is contained in:
Rune Harlyk
2025-11-27 18:44:36 +01:00
committed by Niklas Jensen
parent 5c4dc51093
commit 042548412d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export const imu = (() => {
const addData = (content: IMUMsg) => {
update(data => {
if (content.imu && content.imu[3]) {
if (content.imu && content.imu[4]) {
data.x = [...data.x, content.imu[0]].slice(-maxIMUData)
data.y = [...data.y, content.imu[1]].slice(-maxIMUData)
data.z = [...data.z, content.imu[2]].slice(-maxIMUData)
+1 -1
View File
@@ -155,7 +155,7 @@ export type IMU = {
}
export type IMUMsg = {
imu: [number, number, number, boolean]
imu: [number, number, number, number, boolean]
mag: [number, number, number, number, boolean]
bmp: [number, number, number, boolean]
}
+1 -1
View File
@@ -185,7 +185,7 @@ void IRAM_ATTR SpotControlLoopEntry(void *) {
#if FT_ENABLED(USE_WS2812)
ledService.loop();
#endif
EXECUTE_EVERY_N_MS(250, [&]() {
EXECUTE_EVERY_N_MS(250, {
JsonDocument doc;
JsonVariant results = doc.to<JsonVariant>();
peripherals.getIMUResult(results);