Commit 44c81f0cb11f2e99694a045d8c3a37637978cc12

Authored by 고영탁
1 parent 7519794134
Exists in master and in 2 other branches fhd, fhd-demo

요리 시간 및 요리 카운터 불합리 부분 정리

 - ServiceData 클래스 수정
Showing 1 changed file with 0 additions and 12 deletions   Show diff stats
app/gui/oven_control/servicedata.cpp
... ... @@ -19,8 +19,6 @@ ServiceData::ServiceData()
19 19 memset((void*)err_log.data,0x00,sizeof(error_log));
20 20 memset((void*)use_log.data,0x00,sizeof(use_statics_log));
21 21 memset((void*)sensor_log.data,0x00, sizeof(sensor_statics_log));
22   - DirtyLevel::setCookingCount(0);
23   - DirtyLevel::setCookingTime(0);
24 22 #if INIT_FRAM == 1
25 23 saveServiceData();
26 24 #else
... ... @@ -34,8 +32,6 @@ bool ServiceData::loadServiceData(void){
34 32 uint8_t buffs[FRAM_SIZE];
35 33 uint8_t* pBuff;
36 34 int fd;
37   - qint64 temp_cookingTime = 0;
38   - int temp_cookingCount = 0;
39 35 pBuff = buffs;
40 36  
41 37  
... ... @@ -93,10 +89,6 @@ bool ServiceData::loadServiceData(void){
93 89 memcpy((void*)err_log.data,pBuff,sizeof(error_log)); pBuff += sizeof(error_log);
94 90 memcpy((void*)use_log.data, pBuff,sizeof(use_statics_log));pBuff += sizeof(use_statics_log);
95 91 memcpy((void*)sensor_log.data,pBuff,sizeof(sensor_statics_log)); pBuff+= sizeof(sensor_statics_log);
96   - memcpy(&temp_cookingTime,pBuff, sizeof(qint64)); pBuff += sizeof(qint64);
97   - memcpy(&temp_cookingCount,pBuff, sizeof(int));
98   - DirtyLevel::setCookingCount(temp_cookingCount);
99   - DirtyLevel::setCookingTime(temp_cookingTime);
100 92 close(fd);
101 93 qDebug() <<"FRAM Load Success";
102 94 }else{
... ... @@ -150,8 +142,6 @@ bool ServiceData::saveServiceData(void){
150 142 uint8_t buffs[FRAM_SIZE];
151 143 uint8_t* pBuff;
152 144 int fd;
153   - qint64 temp_cookingTime = DirtyLevel::cookingTime();
154   - int temp_cookingCount = DirtyLevel::cookingCount();
155 145 pBuff = buffs;
156 146 fd = open(fRam_path, O_RDWR | O_SYNC);
157 147 if(fd>0){
... ... @@ -159,8 +149,6 @@ bool ServiceData::saveServiceData(void){
159 149 memcpy(pBuff,(void*)err_log.data,sizeof(error_log)); pBuff += sizeof(err_log);
160 150 memcpy(pBuff,(void*)use_log.data,sizeof(use_statics_log)); pBuff += sizeof(use_statics_log);
161 151 memcpy(pBuff,(void*)sensor_log.data,sizeof(sensor_statics_log)); pBuff += sizeof(sensor_statics_log);
162   - memcpy(pBuff, &temp_cookingTime, sizeof(qint64)); pBuff += sizeof(qint64);
163   - memcpy(pBuff, &temp_cookingCount, sizeof(int)); pBuff += sizeof(int);
164 152 *pBuff = 0x9C;
165 153  
166 154 write(fd,buffs,FRAM_SIZE);
... ...