forked from TheLuckyChip/LuckyBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LuckyBox.ino
44 lines (40 loc) · 1.1 KB
/
LuckyBox.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Система автоматики винокура.
// Проект центра открытого проектирования у Счастливчика https://LuckyCenter.ru
// Версия 2.0 Release Candidate 19b
#include "device_view.h"
#include "pid_config.h"
#include "adc.h"
#include "sd_card.h"
#include "display.h"
#include "sensors.h"
#include "heater.h"
#include "tft.h"
#include "setting.h"
#include "reflux_mode.h"
#include "distillation_mode.h"
#include "mashing_mode.h"
#include "pid_config.h"
#include "brewing_mode.h"
#include "misc.h"
void loop() {
HTTP.handleClient();
switch (processMode.allow) {
case 0: tftMenuLoop(); break;
case 1: distillationLoop(); break;
case 2: refluxLoop(); break;
case 3: mashingLoop(); break;
case 4: pidSetLoop(); break;
//case 5: brewingLoop(); break;
case 6: deviceViewLoop(); break;
}
if (processMode.allow < 3 || processMode.allow == 6) {
adcLoop();
stepApLoop();
if (powerType <= 1) heaterLoop();
}
if (powerType == 2) { comHeaterLoop(); wifiHeaterLoop(); }
sensorLoop();
displayLoop();
logfileLoop();
yield();
}