App Store 1.7

* Added more clarity with the error displayed for the public transit
navigation
This commit is contained in:
dyedgreen
2016-08-19 19:32:50 +02:00
parent 7608d8dcca
commit 5f66165cb4
4 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "pebble-directions",
"author": "Dyedgreen",
"version": "1.6.0",
"version": "1.7.0",
"keywords": [
"navigation",
"maps",
+8 -1
View File
@@ -268,7 +268,7 @@ static void app_message_send_search_data() {
// Create a string with the correct length (len is the length w/o the '/0' char)
const int len = strlen(address) + 1;
char message[len + 1];
// Format the string FIXME (cuts of after 'mee' for the test string ???)
// Format the string
snprintf(message, sizeof(message), "%i%s", selected_type_enum, address);
// Make sure the string is terminated correctely (just in case)
message[len] = '\0';
@@ -504,6 +504,13 @@ void directions_window_push() {
// Push window to screen
window_stack_push(window, true);
// Display the not available error for transit FIXME: (Find a transit api / re-contact HERE)
if (selected_type_enum == Train) {
window_display_error(Unavailable);
// Abort all other operations in this function
return;
}
// Start the dictation session
dictation_session_start_handler();
+5
View File
@@ -48,6 +48,11 @@ static void window_load() {
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_DICTATION);
text_error = "Could not start dictation";
break;
// Unavailable
case 3:
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_OTHER);
text_error = "Currently unavailable";
break;
// Other / Undefined
default:
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_OTHER);
+3 -1
View File
@@ -11,8 +11,10 @@ enum ErrorType {
Api = 1,
// Error when trying to start the dictation
Dictation = 2,
// Error when a feature is unavailable
Unavailable = 3,
// Something simply went wrong
Other = 3
Other = 4
};
void error_window_push(enum ErrorType);