Skip to content

Commit bc2184c

Browse files
imu and web info update
1 parent b113287 commit bc2184c

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

General_Driver/IMU.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void imuDataGet(EulerAngles *pstAngles,
6565
float acc[3], gyro[3];
6666
float MotionVal[9];
6767

68-
// magnetometer_.getData(&x, &y, &z);
68+
magnetometer_.getData(&x, &y, &z);
6969

7070
pstMagnRawData->s16X = x- offset_x;
7171
pstMagnRawData->s16Y = y- offset_y;

General_Driver/IMU_ctrl.h

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ void updateIMUData() {
3131
icm_roll = stAngles.roll;
3232
icm_pitch = stAngles.pitch;
3333
icm_yaw = stAngles.yaw;
34+
35+
temp = temperatureRead();
3436
}
3537

3638

General_Driver/ugv_advance.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -388,15 +388,15 @@ void baseInfoFeedback() {
388388

389389
jsonInfoHttp["r"] = icm_roll;
390390
jsonInfoHttp["p"] = icm_pitch;
391-
// jsonInfoHttp["y"] = icm_yaw;
392-
jsonInfoHttp["y"] = "null";
391+
jsonInfoHttp["y"] = icm_yaw;
392+
// jsonInfoHttp["y"] = "null";
393393

394394
// jsonInfoHttp["q0"] = qw;
395395
// jsonInfoHttp["q1"] = qx;
396396
// jsonInfoHttp["q2"] = qy;
397397
// jsonInfoHttp["q3"] = qz;
398398

399-
// jsonInfoHttp["temp"] = temp.temperature;
399+
jsonInfoHttp["temp"] = temp;
400400

401401
jsonInfoHttp["v"] = loadVoltage_V;
402402

General_Driver/web_page.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ const char index_html[] PROGMEM = R"rawliteral(
278278
<span id="pn">PITCH</span>
279279
</div>
280280
<div>
281-
<span class="num-color mid-num" id="y">-1.01</span>
282-
<span id="yn">YAW</span>
281+
<span class="num-color mid-num" id="temp">-1.01</span>
282+
<span id="yn">TEMP</span>
283283
</div>
284284
<div>
285285
<span class="num-color mid-num" id="mX">-1.01</span>
@@ -706,7 +706,7 @@ const char index_html[] PROGMEM = R"rawliteral(
706706

707707
document.getElementById("r").innerHTML = jsonResponse.r?.toFixed(2);
708708
document.getElementById("p").innerHTML = jsonResponse.p?.toFixed(2);
709-
document.getElementById("y").innerHTML = jsonResponse.y?.toFixed(2);
709+
document.getElementById("temp").innerHTML = jsonResponse.temp?.toFixed(2);
710710
document.getElementById("mZ").innerHTML = speed_rate;
711711

712712
if (jsonResponse.hasOwnProperty('pan')) {

0 commit comments

Comments
 (0)