-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2d0+bugs.txt
196 lines (143 loc) · 6.92 KB
/
2d0+bugs.txt
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
bugs:
sonic 0 integer overflow
[4294948L] [1017mm] [1130ml/mm] [1000mm barrel] [problem:0] [water:0] [nutri:0]
drain webui 0L 30M not displaying barrel ammount (but visible in manual under mutri:303)
some barrel values are still uint16_t but pools are uint32_t - need to evaluate
all functions that adds uint32_t + something and return uint32_t should use UINT32_MAX
manual mixing timer is shown as auto bypass ammount!!
also not letting to increase auto bypass while in this state
also manual fill left is shown on barr0 minutes.. (kinda like it actually)
need to prevent bypass to pool0! (or limit until sonic? or until barr size?)
each save on sdcard:
0 out of 216 Bytes writen. filesize Mismatch.
isChanged will retriger SaveStructs over and over at each start press when Expanders.Protect is set
if (request->hasArg("FullBarrel"))
sonic full barrel calibration point will create error
need to save last non-errorous - safeguard range
ErrorCheck(barrel, BARREL_SONIC_OUTOFRANGE)
fmsTask sonic 0 timeout after sonic >0 error while storing
do sonics need time after mux switch?
try 2 reproduce with hardware
settings not saving automaticly after change from webui - run savestructs
deviation always to high for sonic
am i measuring sonics too fast?
check if (b->_barrel_height - b->_sonic_last_value) for integer overflow
to implement:
add SaveStructs button to calibration
manual mux unlock via webUI
any way to set/get barrel flow freshwater/nutrients level? not visible in auto ui..
webui zoom in / out -> start/stop!
errorcheck:
filling, no flow, pressure, try other (+1 or 0 ) solenoid
flow - previous solenoid error
noflow + pressure - previous solenoid error
filling, nopressure
noflow - fill5 error, or no water supply
flow - system leak
mix+drail
noflow, pressure - solenoid x error
flow, nopressure - system leak
noflow, nopressure - pump, power
NutrientsTransferCalc use for nutes from mixer to pools
FreshwaterFillCalc use for freshwater to mixer and pools
SaveSD should fail the parent Setxxx func on failure
search: // just warn for now..
edit fmsd for new simple 1barrel system:
need f5 together with every fill
need f6 with every drain
cleanwater pressure vs pump pressure on the same sensor (_min_pressure _max_pressure)
Calib5L add timeout!! + add need calib var to trigger? same as manual mode check?
Relay( usage search
rewrite system to use concentrate from mixer barrel
[ ]add proper barrel_disabled webui
[ ] add DrainTotal BypassTotal to webUI + add DrainTotalSet BypassTotalSet
[ ] if bypass is via manual, how to pause without clearing? via interface?
edit ResetManual to save value aside instead of clearing
***************^^ checked below here
implement proper logging: https://thingpulse.com/esp32-logging/
or manually add log levels to serial prints + shorten output format
+add setting log level to webUI?
time[000012]line[1732]func[SonicMeasure] message
[W][T000012][SonicMeasure:1732] message
split define LOG into LOGERROR LOGWARN .....
check what modem returns if error - if valid check - implement SMS error
sendSMS needs to read AT+OK from Serial2
if not - cache msg aside to send later??
cache to file with timestamp
send later in one message if size < max sms size
later at what point? check in loop? in event change? in next sendsms?
--------------
upgrade spiffs to littlefs
//#include "SPIFFS.h"
#include <LITTLEFS.h>
#define SPIFFS LITTLEFS
All instances of SPIFFS.read() SPIFFS.write() SPIFFS.close() SPIFFS.open()
are now
LITTLEFS.read() LITTLEFS.write() LITTLEFS.close() LITTLEFS.open()
-------------
any way to check for Expander connectivity?
+hardware check for mux - loopback on leg 14?
test by serial.write + serial.read ?
change error64 from high sonic measurement error, to high deviation from flow sensor
add flowsetmin flowsetmax at each barrel at webUI
check & print error states the same way as system states?
barr error set shoud save to sd? or save after each use in code?
implement error unset from webui
serial print to telnet or to webui directly or via another board (esp8266?).
try WebSerial https://techtutorialsx.com/2021/01/09/esp32-arduino-webserial/
-solder dummy pressure sensor
manual apply sonic value to flow barrel volume on request.
limit all data from webUI to valid range - ie. no "measure barrel 27"
telnet server to send LOG.prints + telnet client inside webui?
uint16_t DTS = 0; //mySettings.DTS?3600UL:0;
uint16_t timeZone = 3;
implement mux lock timeout.
LockMUX should start an external timer and UnlockMUX should stop it
variables that survives reboot?? :)
try RTC_NOINIT_ATTR?
https://github.com/highno/rtcvars/issues/3
recheck concentration float is accurate
"Do not use float to represent whole numbers."
http://www.cplusplus.com/forum/general/67783/
add to schematic:
12v line add polyfuze
optional: doser on expander x20 pin A7? serial scale mux#14?
optional:
in serial: "No core dump partition found"
create coredump part to remove the error
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/core_dump.html#save-core-dump-to-flash
check all uint values never go below zero!!
expected in sensor measurements
anywhere else?
change sonic 10555 to retry--
BARREL_SONIC_OUTOFRANGE only if all 10555
drain_log file
needs accurate clock
set Overpressure global error only if error occurs with multiple solenoids
add concentrationSet to barrels for manual?
use filter instead of avearge for sonic?
https://stackoverflow.com/questions/10338888/fast-median-filter-in-c-c-for-uint16-2d-array
restore to sd if spiffs date newer? fix timestamp
barrel busy flag?
add option to continue on pressure sensor1 error if flow1 ok
continue on ps2 error if flow2 is in range: 0 < flow2 < "flow2 with no load"
continue on flow error if sonic is rising
continue on sonic error if flow counted barrel volume is ok
continue to next barrel if barrel solenoids error
only unrecoverable errors: pump, main barrel solenoids
handle reset in the middle of flow sensor transfer
calculate by last values?
lock thread mux so it executes quick? https://esp32.com/viewtopic.php?t=1703
server.on("/mdns" check mdns broadcast
switchFS add fs check, try to restart filesystem on failure
add ... on serial.available to check module awake
"[E][vfs_api.cpp:22] open(): File system is not mounted" nice error reporting format
pressure - in next version:
if overpressure error - set target barrel error
goto next barrel, clear overpressure error
if all barrels error - set pump error - clear all barrel overpressure errors
except manually-disabled barrels "error"
if no pressure - loop-measure for a while
if still no pressure - check flow
no flow - set pump error.
deprecate sonic timeout - use retry count * constant time