first real regulation errors

这个提交包含在:
phyto 2019-05-23 18:07:31 +02:00
父节点 af91555fe6
当前提交 2e4854c411
共有 2 个文件被更改,包括 25 次插入6 次删除

查看文件

@ -101,25 +101,41 @@ void sendvalues(short *ptr)
prt('\n');
}
/* -------------------------------------------------- */
void update_and_send(void)
void update_and_send(short *pvalues)
{
short values[NBVAL];
updatevalues(values);
sendvalues(values);
updatevalues(pvalues);
sendvalues(pvalues);
}
/* ================================================== */
void loop() {
static int foo = 0;
int key;
short values[NBVAL], temp_interne;
update_and_send();
update_and_send(values);
temp_interne = values[1];
if (temp_interne < parametres.temp_mini) {
prtln("M temp is low");
delay(500);
controle_frigo(0);
}
else if (temp_interne > parametres.temp_maxi){
prtln("M temp is hight");
delay(500);
controle_frigo(1);
}
if (foo++ > 5) {
readlight(); foo = 0;
}
/* check for external request */
if (Serial.available()) {
key = Serial.read();
@ -146,6 +162,9 @@ void loop() {
break;
}
}
delay(parametres.delai);
/* ETERNAL LOOP END HERE */

查看文件

@ -46,7 +46,7 @@ wclear(glass); wrefresh(glass);
mfd = (fd_local>fd_remote ? fd_local : fd_remote) + 1; /* XXX */
#if DEBUG_LEVEL
#if DEBUG_LEVEL > 1
sprintf(ligne, "%s : mfd is %d\n", __func__, mfd);
waddstr(glass, ligne); wrefresh(glass);
#endif