dictation error added

* now there is a custom dictation error
* going towards 1.3
* upcoming: clay config for custom places
This commit is contained in:
dyedgreen
2016-06-27 18:12:41 +02:00
parent af5df670fd
commit 4d51545bfc
6 changed files with 22 additions and 5 deletions
+7 -1
View File
@@ -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",
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -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);
}
}
+6 -1
View File
@@ -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;
+3 -1
View File
@@ -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);
+5 -1
View File
@@ -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,
*/