-
Notifications
You must be signed in to change notification settings - Fork 126
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
Implement rain logic #148
Implement rain logic #148
Conversation
Adds 3 modes for rain: 0 - Ignore it 1 - Dock when rain detected. If in automatic mode it will resume again when battery is full etc... 2 - Dock until dry. If in automatic mode will resume again when rain is no longer detected for OM_RAIN_DELAY_MINUTES 3 - Pause Automatic Mode. Pauses automatic mode when rain detected. Needs to be manually resumed
Quite cool flexible implementation! |
@@ -534,6 +538,29 @@ void checkSafety(const ros::TimerEvent &timer_event) { | |||
dockingNeeded = true; | |||
} | |||
|
|||
// Rain detected is initialized to true and flips to false if rain is not detected | |||
// continuously for rain_check_seconds. This is to avoid false positives due to noise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: move this logic to the low level firmware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A positive side of having this in higher level is that rain could be signalled externally without having to reimplement everything. But then again, I guess we could just set manual_pause_mowing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just meant move to logic to deal with noise to the low level firmware so we get a stable true/false from the low level status
Sorry to dirt your branch, but had problems creating an image for testing. Finally could test. Thanks a lot for this quite cool PR, I do know that a lot of people are waiting for this functionality! |
Adds 3 modes for rain:
0 - Ignore it
1 - Dock when rain detected. If in automatic mode it will resume again when battery is full etc...
2 - Dock until dry. If in automatic mode will resume again when rain is no longer detected for OM_RAIN_DELAY_MINUTES
3 - Pause Automatic Mode. Pauses automatic mode when rain detected. Needs to be manually resumed