Commit 91480de3c387e5d1ef31fe5e4b508bc0a4d4b322
1 parent
ecc75a7273
Exists in
master
and in
2 other branches
센서 실시간 데이터 리셋 기능 추가
Showing
7 changed files
with
48 additions
and
3 deletions
Show diff stats
app/gui/oven_control/ovenstatics.cpp
| ... | ... | @@ -648,6 +648,11 @@ type_temp OvenStatistics::getCurSensorValueByIdx(uint16_t idx){ |
| 648 | 648 | return curSensorValue[idx]; |
| 649 | 649 | } |
| 650 | 650 | |
| 651 | +void OvenStatistics::resetSensorHistory() | |
| 652 | +{ | |
| 653 | + srvdata->resetSensorlogData(); | |
| 654 | +} | |
| 655 | + | |
| 651 | 656 | void OvenStatistics::onErrorPopupClosed(int erridx){ |
| 652 | 657 | qDebug() << "error idx" << erridx; |
| 653 | 658 | if(m_mapPopupList.find(erridx)!= m_mapPopupList.end()){ | ... | ... |
app/gui/oven_control/ovenstatics.h
app/gui/oven_control/realtimesensorwindow.cpp
| ... | ... | @@ -177,3 +177,10 @@ void RealtimeSensorWindow::keyReleaseEvent(QKeyEvent *event) |
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | + | |
| 181 | +void RealtimeSensorWindow::on_resetButton_clicked() | |
| 182 | +{ | |
| 183 | + OvenStatistics* ovs = OvenStatistics::getInstance(); | |
| 184 | + ovs->resetSensorHistory(); | |
| 185 | + reloadUi(); | |
| 186 | +} | ... | ... |
app/gui/oven_control/realtimesensorwindow.h
app/gui/oven_control/realtimesensorwindow.ui
| ... | ... | @@ -109,7 +109,7 @@ |
| 109 | 109 | <widget class="QPushButton" name="backButton"> |
| 110 | 110 | <property name="geometry"> |
| 111 | 111 | <rect> |
| 112 | - <x>343</x> | |
| 112 | + <x>291</x> | |
| 113 | 113 | <y>26</y> |
| 114 | 114 | <width>97</width> |
| 115 | 115 | <height>97</height> |
| ... | ... | @@ -132,7 +132,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b |
| 132 | 132 | <widget class="QPushButton" name="helpButton"> |
| 133 | 133 | <property name="geometry"> |
| 134 | 134 | <rect> |
| 135 | - <x>457</x> | |
| 135 | + <x>401</x> | |
| 136 | 136 | <y>26</y> |
| 137 | 137 | <width>97</width> |
| 138 | 138 | <height>97</height> |
| ... | ... | @@ -152,6 +152,29 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/h |
| 152 | 152 | <string/> |
| 153 | 153 | </property> |
| 154 | 154 | </widget> |
| 155 | + <widget class="QPushButton" name="resetButton"> | |
| 156 | + <property name="geometry"> | |
| 157 | + <rect> | |
| 158 | + <x>512</x> | |
| 159 | + <y>26</y> | |
| 160 | + <width>97</width> | |
| 161 | + <height>97</height> | |
| 162 | + </rect> | |
| 163 | + </property> | |
| 164 | + <property name="sizePolicy"> | |
| 165 | + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> | |
| 166 | + <horstretch>0</horstretch> | |
| 167 | + <verstretch>0</verstretch> | |
| 168 | + </sizepolicy> | |
| 169 | + </property> | |
| 170 | + <property name="styleSheet"> | |
| 171 | + <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/006_sys_icon_14.png); } | |
| 172 | +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/bottom_bar/006_sys_icon_14_ov.png); }</string> | |
| 173 | + </property> | |
| 174 | + <property name="text"> | |
| 175 | + <string/> | |
| 176 | + </property> | |
| 177 | + </widget> | |
| 155 | 178 | </widget> |
| 156 | 179 | <widget class="QWidget" name="midwidget" native="true"> |
| 157 | 180 | <property name="geometry"> | ... | ... |
app/gui/oven_control/servicedata.cpp
| ... | ... | @@ -102,7 +102,13 @@ bool ServiceData::loadServiceData(void){ |
| 102 | 102 | }else{ |
| 103 | 103 | qDebug()<<"FRAM FILE Open fail!!"; |
| 104 | 104 | } |
| 105 | - return true; | |
| 105 | + return true; | |
| 106 | +} | |
| 107 | + | |
| 108 | +bool ServiceData::resetSensorlogData() | |
| 109 | +{ | |
| 110 | + memset((void*)sensor_log.data,0x00, sizeof(sensor_statics_log)); | |
| 111 | + saveServiceData(); | |
| 106 | 112 | } |
| 107 | 113 | |
| 108 | 114 | bool ServiceData::saveServiceData(void){ | ... | ... |
app/gui/oven_control/servicedata.h