diff --git a/app/gui/oven_control/ovenstatics.cpp b/app/gui/oven_control/ovenstatics.cpp
index f57a7e2..8ac7a14 100644
--- a/app/gui/oven_control/ovenstatics.cpp
+++ b/app/gui/oven_control/ovenstatics.cpp
@@ -648,6 +648,11 @@ type_temp OvenStatistics::getCurSensorValueByIdx(uint16_t idx){
return curSensorValue[idx];
}
+void OvenStatistics::resetSensorHistory()
+{
+ srvdata->resetSensorlogData();
+}
+
void OvenStatistics::onErrorPopupClosed(int erridx){
qDebug() << "error idx" << erridx;
if(m_mapPopupList.find(erridx)!= m_mapPopupList.end()){
diff --git a/app/gui/oven_control/ovenstatics.h b/app/gui/oven_control/ovenstatics.h
index 4061379..fb26f5b 100644
--- a/app/gui/oven_control/ovenstatics.h
+++ b/app/gui/oven_control/ovenstatics.h
@@ -204,6 +204,7 @@ public:
realtime_data getPartsRealtimeData(void);
uint8_t getSensorTypeByIdx(uint16_t idx);
type_temp getCurSensorValueByIdx(uint16_t idx);
+ void resetSensorHistory(void);
private:
diff --git a/app/gui/oven_control/realtimesensorwindow.cpp b/app/gui/oven_control/realtimesensorwindow.cpp
index cf62a68..e0c5f13 100644
--- a/app/gui/oven_control/realtimesensorwindow.cpp
+++ b/app/gui/oven_control/realtimesensorwindow.cpp
@@ -177,3 +177,10 @@ void RealtimeSensorWindow::keyReleaseEvent(QKeyEvent *event)
}
}
+
+void RealtimeSensorWindow::on_resetButton_clicked()
+{
+ OvenStatistics* ovs = OvenStatistics::getInstance();
+ ovs->resetSensorHistory();
+ reloadUi();
+}
diff --git a/app/gui/oven_control/realtimesensorwindow.h b/app/gui/oven_control/realtimesensorwindow.h
index ca917f8..d7558be 100644
--- a/app/gui/oven_control/realtimesensorwindow.h
+++ b/app/gui/oven_control/realtimesensorwindow.h
@@ -28,6 +28,8 @@ private slots:
void on_backButton_clicked();
void oneSecTimerFired(void);
+ void on_resetButton_clicked();
+
private:
const uint16_t m_arrSensorItemIdxs[REALSENSOR_CONTROL_LIST_ITEM_MAX]={
0,1,4,5,6,7,8,12,13
diff --git a/app/gui/oven_control/realtimesensorwindow.ui b/app/gui/oven_control/realtimesensorwindow.ui
index 9a018eb..af5c516 100644
--- a/app/gui/oven_control/realtimesensorwindow.ui
+++ b/app/gui/oven_control/realtimesensorwindow.ui
@@ -109,7 +109,7 @@
- 343
+ 291
26
97
97
@@ -132,7 +132,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b
- 457
+ 401
26
97
97
@@ -152,6 +152,29 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/h
+
+
+
+ 512
+ 26
+ 97
+ 97
+
+
+
+
+ 0
+ 0
+
+
+
+ QPushButton { border-image: url(:/images/bottom_bar/006_sys_icon_14.png); }
+QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/bottom_bar/006_sys_icon_14_ov.png); }
+
+
+
+
+
diff --git a/app/gui/oven_control/servicedata.cpp b/app/gui/oven_control/servicedata.cpp
index 9c0d269..0dfcb7a 100644
--- a/app/gui/oven_control/servicedata.cpp
+++ b/app/gui/oven_control/servicedata.cpp
@@ -102,7 +102,13 @@ bool ServiceData::loadServiceData(void){
}else{
qDebug()<<"FRAM FILE Open fail!!";
}
- return true;
+ return true;
+}
+
+bool ServiceData::resetSensorlogData()
+{
+ memset((void*)sensor_log.data,0x00, sizeof(sensor_statics_log));
+ saveServiceData();
}
bool ServiceData::saveServiceData(void){
diff --git a/app/gui/oven_control/servicedata.h b/app/gui/oven_control/servicedata.h
index 6e1ef0a..75bd50c 100644
--- a/app/gui/oven_control/servicedata.h
+++ b/app/gui/oven_control/servicedata.h
@@ -196,6 +196,7 @@ public:
uint16_t m_nRepeatErrorIdx;
bool saveServiceData(void);
bool loadServiceData(void);
+ bool resetSensorlogData(void);
};
#endif // SERVICEDATA_H