thermferm/thermferm.c

changeset 326
ae34b47700bb
parent 321
b95baa89c509
child 328
1713dc0cd20f
equal deleted inserted replaced
325:35b6f6605ae3 326:ae34b47700bb
1 /***************************************************************************** 1 /*****************************************************************************
2 * Copyright (C) 2014 2 * Copyright (C) 2014-2015
3 * 3 *
4 * Michiel Broek <mbroek at mbse dot eu> 4 * Michiel Broek <mbroek at mbse dot eu>
5 * 5 *
6 * This file is part of the mbsePi-apps 6 * This file is part of the mbsePi-apps
7 * 7 *
85 break; 85 break;
86 case SIGINT: syslog(LOG_NOTICE, "Keyboard interrupt, shutting down"); 86 case SIGINT: syslog(LOG_NOTICE, "Keyboard interrupt, shutting down");
87 break; 87 break;
88 case SIGTERM: syslog(LOG_NOTICE, "Got SIGTERM, shutting down"); 88 case SIGTERM: syslog(LOG_NOTICE, "Got SIGTERM, shutting down");
89 break; 89 break;
90 case SIGSEGV: syslog(LOG_NOTICE, "Got SIGSEGV, shutting down");
91 my_shutdown = TRUE;
92 exit(SIGSEGV);
93 break;
90 default: syslog(LOG_NOTICE, "die() on signal %d", onsig); 94 default: syslog(LOG_NOTICE, "die() on signal %d", onsig);
91 } 95 }
92 96
93 my_shutdown = TRUE; 97 my_shutdown = TRUE;
94 } 98 }
98 #ifdef HAVE_WIRINGPI_H 102 #ifdef HAVE_WIRINGPI_H
99 void show_mode(void) 103 void show_mode(void)
100 { 104 {
101 char buf[21]; 105 char buf[21];
102 106
103 snprintf(buf, 20, "Old mode %s", UNITMODE[current_unit->mode]); 107 snprintt(buf, 20, "Old mode %s", UNITMODE[current_unit->mode]);
104 lcdPuts(lcdHandle, buf); 108 lcdPuts(lcdHandle, buf);
105 lcdPosition(lcdHandle, 0, 1); 109 lcdPosition(lcdHandle, 0, 1);
106 } 110 }
107 111
108 112

mercurial