Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Santiago Ignacio Hitta Monteverde
firmware
Commits
f93c90b5
Commit
f93c90b5
authored
Oct 09, 2019
by
Sofia Llavayol
Browse files
arreglo calibrado min_val
parent
265c6002
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/tests/calibrate_color.lua
View file @
f93c90b5
...
...
@@ -28,6 +28,8 @@ ahsm.get_time = os.gettime
local
debugger
=
require
'debug_plain'
--ahsm.debug = debugger.out
local
SECURITY_V
=
5
local
hsm
local
n_colors
=
#
colors
...
...
@@ -94,7 +96,10 @@ local function create_calibrator (clr)
}
local
s_capture_calibration
=
ahsm
.
state
{
_name
=
's_capture'
,
entry
=
function
()
entry
=
function
()
if
(
cv
<
nvs
.
read
(
'color'
,
'min_val'
,
40
))
then
nvs
.
write
(
'color'
,
'min_val'
,
cv
-
SECURITY_V
)
end
print
(
'capturing'
,
clr
.
name
,
ch
,
cs
,
cv
)
nvs
.
write
(
'color'
,
clr
.
name
..
'_h'
,
ch
)
nvs
.
write
(
'color'
,
clr
.
name
..
'_s'
,
cs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment