Commit e912f423f658e1854b96b3d9ce0bf41b9b06c202

Authored by henyxia
1 parent 717e403d

Urgent fix

Showing 4 changed files with 6 additions and 4 deletions   Show diff stats
... ... @@ -61,7 +61,8 @@ void resetHeatOk(void)
61 61  
62 62 bool isHeatOk(void)
63 63 {
64   - return (tAct > T_STEP_THRESH && tAct < T_HOLD_THRESH);
  64 + heat_ok = (tAct > T_HOLD_THRESH);
  65 + return heat_ok;
65 66 }
66 67  
67 68 void* processHeat(void* arg)
... ...
... ... @@ -51,12 +51,12 @@ int tempCons;
51 51  
52 52 void setPumpOn()
53 53 {
54   - pumped = 0;
55 54 setPumpWantedState(true);
56 55 }
57 56  
58 57 void setPumpOff()
59 58 {
  59 + pumped = 0;
60 60 setPumpWantedState(false);
61 61 }
62 62  
... ... @@ -142,7 +142,7 @@ void* processHVC(void* we)
142 142  
143 143 while(!hvcStop)
144 144 {
145   - printx(DEBUG, HVC, "Querying data\n");
  145 + printx(DEBUG, HVC, "Querying data, with prev PUMP %d\n", pumped);
146 146 sendData(&hvc_fd, GET_TEMP);
147 147 data = getData(&hvc_fd);
148 148 setTemp(data);
... ...
... ... @@ -52,6 +52,7 @@ int main(void)
52 52 pthread_create(&tHeat, NULL, processHeat, NULL);
53 53 pthread_create(&tPump, NULL, processPump, NULL);
54 54  
  55 + sleep(20);
55 56 setVolWanted(1);
56 57 setCoffeeWanted();
57 58  
... ...
... ... @@ -173,7 +173,7 @@ void* processPump(void* arg)
173 173 }
174 174 }
175 175  
176   - usleep(20000);
  176 + sleep(1);
177 177 }
178 178  
179 179 return NULL;
... ...