thermferm/thermferm.c

changeset 716
5c30c8ef83a8
parent 714
24749c296a50
child 717
22dd7ab614e5
equal deleted inserted replaced
715:f5d85af156ab 716:5c30c8ef83a8
60 extern int my_server_shutdown; 60 extern int my_server_shutdown;
61 extern int my_ws_state; 61 extern int my_ws_state;
62 extern int my_ws_shutdown; 62 extern int my_ws_shutdown;
63 extern int my_simulator_state; 63 extern int my_simulator_state;
64 #ifdef USE_SIMULATOR 64 #ifdef USE_SIMULATOR
65 extern int my_simulator_shutdown; 65 extern int my_simulator_command;
66 #endif 66 #endif
67 extern int my_one_wire_state; 67 extern int my_one_wire_state;
68 extern int my_one_wire_shutdown; 68 extern int my_one_wire_shutdown;
69 int setupmenu = MENU_NONE; 69 int setupmenu = MENU_NONE;
70 units_list *current_unit = NULL; /* In panel editor this points to the current unit. */ 70 units_list *current_unit = NULL; /* In panel editor this points to the current unit. */
1867 slcdCharDef(slcdHandle, 6, RevHeatONOFF); 1867 slcdCharDef(slcdHandle, 6, RevHeatONOFF);
1868 1868
1869 my_shutdown = my_reboot = FALSE; 1869 my_shutdown = my_reboot = FALSE;
1870 my_devices_shutdown = my_panel_shutdown = my_server_shutdown = my_ws_shutdown = my_one_wire_shutdown = 0; 1870 my_devices_shutdown = my_panel_shutdown = my_server_shutdown = my_ws_shutdown = my_one_wire_shutdown = 0;
1871 my_devices_state = my_panel_state = my_server_state = my_ws_state = my_one_wire_state = 0; 1871 my_devices_state = my_panel_state = my_server_state = my_ws_state = my_one_wire_state = 0;
1872 my_simulator_state = 0; 1872 my_simulator_state = THREAD_OFF;
1873 #ifdef USE_SIMULATOR 1873 #ifdef USE_SIMULATOR
1874 my_simulator_shutdown = 0; 1874 my_simulator_command = THREAD_OFF;
1875 #endif 1875 #endif
1876 if (lockprog((char *)"thermferm")) { 1876 if (lockprog((char *)"thermferm")) {
1877 syslog(LOG_NOTICE, "Can't lock"); 1877 syslog(LOG_NOTICE, "Can't lock");
1878 return 1; 1878 return 1;
1879 } 1879 }
2024 2024
2025 /* 2025 /*
2026 * Stop threads 2026 * Stop threads
2027 */ 2027 */
2028 #ifdef USE_SIMULATOR 2028 #ifdef USE_SIMULATOR
2029 my_simulator_shutdown = 1; 2029 my_simulator_command = THREAD_OFF;
2030 while (my_simulator_state) { mDelay(50); }; 2030 while (my_simulator_state != THREAD_OFF) { mDelay(50); };
2031 #endif 2031 #endif
2032 my_panel_shutdown = 1; 2032 my_panel_shutdown = 1;
2033 while (my_panel_state) { mDelay(50); }; 2033 while (my_panel_state) { mDelay(50); };
2034 2034
2035 /* 2035 /*

mercurial