mirror of
https://github.com/Threnklyn/pebble-directions.git
synced 2026-05-18 21:03:27 +02:00
App Store 1.7
* Added more clarity with the error displayed for the public transit navigation
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "pebble-directions",
|
||||
"author": "Dyedgreen",
|
||||
"version": "1.6.0",
|
||||
"version": "1.7.0",
|
||||
"keywords": [
|
||||
"navigation",
|
||||
"maps",
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
+6
-1
@@ -43,11 +43,16 @@ static void window_load() {
|
||||
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_API);
|
||||
text_error = "No route could be found";
|
||||
break;
|
||||
// Dictation
|
||||
// Dictation
|
||||
case 2:
|
||||
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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user