Mercurial > ~darius > hgwebdir.cgi > tempctrl
changeset 55:6b1057409d9a
Skip beep related stuff #ifdef WITHUSB.
author | darius@Inchoate |
---|---|
date | Wed, 29 Oct 2008 17:45:32 +1030 |
parents | 58f1ec46bff6 |
children | 09f8d879afb9 |
files | tempctrl.c |
diffstat | 1 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tempctrl.c Wed Oct 29 17:41:04 2008 +1030 +++ b/tempctrl.c Wed Oct 29 17:45:32 2008 +1030 @@ -80,8 +80,10 @@ int16_t check_interval; int16_t stale_factor; +#ifndef WITHUSB /* Beep if stale */ int8_t dobeep; +#endif } __attribute__((packed)) settings_t; /* Current settings in RAM */ @@ -112,7 +114,9 @@ .idlebits = 0x00, .check_interval = 10, .stale_factor = 3, +#ifndef WITHUSB .dobeep = 1 +#endif }; /* Local variable declarations */ @@ -286,11 +290,13 @@ if (stale) nextstate = 'i'; - /* Handle beeping */ +#ifndef WITHUSB +/* Handle beeping */ if (settings.dobeep && stale) beeping = 1; else beeping = 0; +#endif /* Handle state forcing */ if (settings.mode != TC_MODE_AUTO) @@ -508,7 +514,10 @@ "Min heat overshoot - %d, Min cool overshoot - %d\r\n" "Min cool on time - %d, Min cool off time - %d\r\n" "Min heat on time - %d, Min heat off time - %d\r\n" - "Beep on stale - %S\r\n"), +#ifndef WITHUSB + "Beep on stale - %S\r\n" +#endif + ), settings.fermenter_ROM[0], settings.fermenter_ROM[1], settings.fermenter_ROM[2], settings.fermenter_ROM[3], settings.fermenter_ROM[4], settings.fermenter_ROM[5], settings.fermenter_ROM[6], settings.fermenter_ROM[7], settings.fridge_ROM[0], settings.fridge_ROM[1], settings.fridge_ROM[2], settings.fridge_ROM[3], @@ -519,7 +528,10 @@ settings.minheatovershoot, settings.mincoolovershoot, settings.mincoolontime, settings.minheatontime, settings.minheatontime, settings.minheatofftime, - settings.dobeep ? PSTR("yes") : PSTR("no")); +#ifndef WITHUSB + settings.dobeep ? PSTR("yes") : PSTR("no") +#endif + ); return; } if (!strcasecmp_P(cmd, PSTR("mode"))) { @@ -538,6 +550,7 @@ } return; } +#ifndef WITHUSB if (!strcasecmp_P(cmd, PSTR("beep"))) { if (buf[8] == '1') settings.dobeep = 1; @@ -547,6 +560,7 @@ printf_P(PSTR("Expected a 0 or 1\r\n")); return; } +#endif if (!strcasecmp_P(cmd, PSTR("ferm")) || !strcasecmp_P(cmd, PSTR("frg")) || !strcasecmp_P(cmd, PSTR("amb"))) {