diff --git a/package.json b/package.json index b3014ae..dd4b044 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pebble-directions", "author": "Dyedgreen", - "version": "1.1.0", + "version": "1.3.0", "keywords": ["navigation", "maps", "directions"], "private": true, "dependencies": {}, @@ -68,6 +68,12 @@ "targetPlatforms": null, "type": "bitmap" }, + { + "file": "images/error_voice.png", + "name": "ICON_ERROR_DICTATION", + "targetPlatforms": null, + "type": "bitmap" + }, { "file": "images/error_other.png", "name": "ICON_ERROR_OTHER", diff --git a/resources/images/error_voice.png b/resources/images/error_voice.png new file mode 100644 index 0000000..2cb84e8 Binary files /dev/null and b/resources/images/error_voice.png differ diff --git a/src/directions_window.c b/src/directions_window.c index d840820..7986b08 100644 --- a/src/directions_window.c +++ b/src/directions_window.c @@ -140,7 +140,7 @@ static void dictation_session_start_handler() { DictationSessionStatus dictation_status = dictation_session_start(dictation_session); if (dictation_status != DictationSessionStatusSuccess) { // Display error - window_display_error(Network); + window_display_error(Dictation); } } diff --git a/src/error_window.c b/src/error_window.c index 0424bf4..ab9beac 100644 --- a/src/error_window.c +++ b/src/error_window.c @@ -43,8 +43,13 @@ static void window_load() { icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_API); text_error = "No route could be found"; break; - // Other / Undefined + // Dictation case 2: + icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_DICTATION); + text_error = "Could not start dictation"; + break; + // Other / Undefined + default: icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_OTHER); text_error = "Something went wrong"; break; diff --git a/src/error_window.h b/src/error_window.h index 791a716..318630f 100644 --- a/src/error_window.h +++ b/src/error_window.h @@ -9,8 +9,10 @@ enum ErrorType { Network = 0, // Error response from api Api = 1, + // Error when trying to start the dictation + Dictation = 2, // Something simply went wrong - Other = 2 + Other = 3 }; void error_window_push(enum ErrorType); diff --git a/src/js/app.js b/src/js/app.js index 5e150c1..d01c9a6 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -25,7 +25,11 @@ * * About the step icon data string * ––– -* Chars map to the following icons: type: 'a', forward: 'b', right: 'c', left: 'd', uRight: 'e', uLeft: 'f', attr: 'g' +* Chars map to the following icons: type: 'a', forward: 'b', right: 'c', left: 'd', uRight: 'e', uLeft: 'f', attr: 'g', final: 'h' +* +* About the config of 'named addresses' +* ––– +* The config stores an array of these name / address pairs, every time a search request hits the phone, */