mirror of
https://github.com/Threnklyn/pebble-directions.git
synced 2026-05-19 05:13:28 +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",
|
"name": "pebble-directions",
|
||||||
"author": "Dyedgreen",
|
"author": "Dyedgreen",
|
||||||
"version": "1.6.0",
|
"version": "1.7.0",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"navigation",
|
"navigation",
|
||||||
"maps",
|
"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)
|
// Create a string with the correct length (len is the length w/o the '/0' char)
|
||||||
const int len = strlen(address) + 1;
|
const int len = strlen(address) + 1;
|
||||||
char message[len + 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);
|
snprintf(message, sizeof(message), "%i%s", selected_type_enum, address);
|
||||||
// Make sure the string is terminated correctely (just in case)
|
// Make sure the string is terminated correctely (just in case)
|
||||||
message[len] = '\0';
|
message[len] = '\0';
|
||||||
@@ -504,6 +504,13 @@ void directions_window_push() {
|
|||||||
// Push window to screen
|
// Push window to screen
|
||||||
window_stack_push(window, true);
|
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
|
// Start the dictation session
|
||||||
dictation_session_start_handler();
|
dictation_session_start_handler();
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ static void window_load() {
|
|||||||
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_DICTATION);
|
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_DICTATION);
|
||||||
text_error = "Could not start dictation";
|
text_error = "Could not start dictation";
|
||||||
break;
|
break;
|
||||||
|
// Unavailable
|
||||||
|
case 3:
|
||||||
|
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_OTHER);
|
||||||
|
text_error = "Currently unavailable";
|
||||||
|
break;
|
||||||
// Other / Undefined
|
// Other / Undefined
|
||||||
default:
|
default:
|
||||||
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_OTHER);
|
icon_error = gbitmap_create_with_resource(RESOURCE_ID_ICON_ERROR_OTHER);
|
||||||
|
|||||||
+3
-1
@@ -11,8 +11,10 @@ enum ErrorType {
|
|||||||
Api = 1,
|
Api = 1,
|
||||||
// Error when trying to start the dictation
|
// Error when trying to start the dictation
|
||||||
Dictation = 2,
|
Dictation = 2,
|
||||||
|
// Error when a feature is unavailable
|
||||||
|
Unavailable = 3,
|
||||||
// Something simply went wrong
|
// Something simply went wrong
|
||||||
Other = 3
|
Other = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
void error_window_push(enum ErrorType);
|
void error_window_push(enum ErrorType);
|
||||||
|
|||||||
Reference in New Issue
Block a user