Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

back trace if connection lose #5

Open
nefelim4ag opened this issue Mar 3, 2014 · 1 comment
Open

back trace if connection lose #5

nefelim4ag opened this issue Mar 3, 2014 · 1 comment

Comments

@nefelim4ag
Copy link
Contributor

I think about realisation move tank back, if wifi connection lose. And i think, we can store data in massive.
3x15 (3 columns and 15 rows *more or less, i not know)

Massive store 3 key, first 2 this is command for truks and 3 difference of absolute time, then command start and stop.
We send signal at 1000 sec and stop sending signal at 1002. Time for 3 column be a 2 sec.
Example of massive.
23 26 2
26 23 2
25 - 2
If we want to go back, we just revert comand for Motor and ser fallback time out from 3 column for this command.
(Sorry for my bad english)
This is just idea how Did back trace for tank. And i not have idea where in the code, must be plase this function %).

@bondar-pavel
Copy link
Owner

Agree, we need handle loosing connection and try to go back to wi-fi zone.
Your idea have sense.
And my vision how it should be:
Cycle buffer(probably with variable length), where previous commands with duration are saved,
and if fallback timeout is exceeded, command from cycle buffer are sent in reverse order and opposite direction (we need to store counterparts for the pins (track forward and backward), now gpiod.pl does not know about functional purpose of the pin).
New commands for protocol:
set_fallback_tracking - boolean, enables saving data to cycle buffer and auto go back mehanizm
set_fallback_buffer - integer, set cycle buffer size.
And just in case: 'massive' == 'huge', but I guess you mean 'array' :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants