-
Notifications
You must be signed in to change notification settings - Fork 557
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
Issue 835 speech warnings #1012
Issue 835 speech warnings #1012
Conversation
@@ -65,8 +62,9 @@ public void onReceive(Context context, Intent intent) { | |||
|
|||
public void run() { | |||
handler.removeCallbacks(watchdogCallback); | |||
|
|||
speakPeriodic(drone); | |||
if(drone != null && drone.getMavClient().isConnected()) { |
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.
@TShapinsky nice catch!
Thanks @ne0fhyk . I think I got it right this time. |
|
||
public boolean getWarningOnLostOrRestoredSignal(){ | ||
return prefs.getBoolean("tts_lost_signal", DEFAULT_TTS_WARN_LOST_SIGNAL); | ||
} |
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.
@squilter great! It looks pretty good.. Only thing remaining, the two methods above should use context.getString(...)
to retrieve the preference key, just like getSpokenStatusInterval()
above them.
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.
@ne0fhyk But getSpokenStatusInterval() uses prefs.getString()
, not context.getString()
. Which one should I use?
edit: nevermind, I might need glasses.
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.
@squilter if you're using android studio, you might not be seeing context.getString(...)
as AS collapse the call into the string it's supposed to return.
context.getString(...)
is used to provide the first parameter to prefs.getString(..., ...)
.
@ne0fhyk How's #944 coming? If it's not ready, I can just hide the checkboxes for wind speed and solar activity so that this pull request is ready. Then I'll implement those later. @arthurbenemann Take a look at my low battery warning here: |
I hid the checkboxes for solar activity warnings and wind speed warnings. Those will be implemented after #944 . For now, this PR is ready. |
Settings have been implemented. Now the features need to be implemented: