Commit 947c28c3 authored by Mercedes Marzoa Tanco's avatar Mercedes Marzoa Tanco
Browse files

Cambios menores en el modulo distancia

parent be594c1d
......@@ -80,7 +80,7 @@ M.laser_ring.cb.append(M.laser_ring.get_filtering_cb())
--M.laser_ring.cb.append(M.laser_ring.get_reading_cb())
--M.color.color_cb.append(color_cb)
M.laser_ring.enable(true)
--M.laser_ring.enable(true)
--M.color.enable(true)
print 'Robot started:'
......
......@@ -141,8 +141,8 @@ local callback_position = function()
cont_direction = cont_direction + 1
end
if (cont_direction > 20) then
cont_direction = -20
if (cont_direction > 15) then
cont_direction = -15
w2 = -w2
omni.drive(0,0,w2)
end
......@@ -169,6 +169,7 @@ end
local s_search = ahsm.state{
entry = function()
leds.clear()
leds.set_all(37,42, 10, true)
angle = 0
for i,e in ipairs(e_dist) do
e.maxdist = 0
......@@ -180,7 +181,7 @@ local s_search = ahsm.state{
end,
exit = function()
leds.clear()
leds.set_segment(s_far,10,0,10, true)
-- leds.set_segment(s_far,10,0,10, true)
laser.cb.remove(callback_search)
end
}
......@@ -300,7 +301,10 @@ local distance = ahsm.state {
initial = s_search,
entry = function()
robot.laser_ring.enable(true)
end
end,
-- exit = function()
-- leds.clear()
--end,
}
return distance
......
......@@ -151,7 +151,7 @@ M.init = function (conf)
conf.broadcast = conf.broadcast or
nvs.read("wifi","broadcast", '255.255.255.255') or '255.255.255.255'
conf.announce_interval = conf.announce_interval or
nvs.read("wifi","announce_interval", 10) or 10
nvs.read("wifi","announce_interval", 0) or 0
conf.receive_timeout = conf.receive_timeout or
nvs.read("wifi","receive_timeout", -1) or -1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment