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

Issue 835 speech warnings #1012

Merged
merged 10 commits into from
Sep 1, 2014

Conversation

TShapinsky
Copy link
Member

Settings have been implemented. Now the features need to be implemented:

  • Solar Activity Warning
  • Wind Speed
  • 400ft ceiling exceeded
  • low signal strength
  • lost signal
  • Autopilot-reported errors

@squilter squilter mentioned this pull request Aug 25, 2014
@@ -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()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TShapinsky nice catch!

@squilter
Copy link
Member

Thanks @ne0fhyk . I think I got it right this time.


public boolean getWarningOnLostOrRestoredSignal(){
return prefs.getBoolean("tts_lost_signal", DEFAULT_TTS_WARN_LOST_SIGNAL);
}
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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(..., ...).

@squilter
Copy link
Member

@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:
TShapinsky@e033876#diff-d41d8cd98f00b204e9800998ecf8427e
Is there a better way to do this? Because I know that the Battery% is BS. The beeper connected to the pixhawk seems to beep when the battery is low, regardless of whether the battery started out full. So clearly the flight code can recognize a low battery properly. But does it send this via mavlink anywhere? (edit: fixed)

@squilter squilter mentioned this pull request Aug 30, 2014
20 tasks
@squilter
Copy link
Member

I hid the checkboxes for solar activity warnings and wind speed warnings. Those will be implemented after #944 . For now, this PR is ready.

@squilter squilter changed the title [WIP] Issue 835 speech warnings Issue 835 speech warnings Aug 30, 2014
@m4gr3d
Copy link
Member

m4gr3d commented Sep 1, 2014

@squilter I should be able to complete #944 later today. The functionality provided by @alextel69 is good to go. There were a few bugs he missed though that I'm fixing.

@m4gr3d m4gr3d added the Feature label Sep 1, 2014
@m4gr3d m4gr3d self-assigned this Sep 1, 2014
m4gr3d added a commit that referenced this pull request Sep 1, 2014
@m4gr3d m4gr3d merged commit a5dd489 into DroidPlanner:master Sep 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants