mirror of
https://github.com/Threnklyn/pebble-directions.git
synced 2026-05-18 21:03:27 +02:00
Next steps: UI
* Pebble >> Phone transmission working :) * TODO: make the progress a layer + tidy the progress stuff! * TODO: make the directions render in a neat way for basalt / chalk * TODO: use the api to get real data * TODO: test on watch
This commit is contained in:
@@ -31,6 +31,7 @@ static DictationSession *dictation_session;
|
||||
static char *address;
|
||||
|
||||
// TODO: implement a timer, that kills the proccess if the message is never send (needed?)
|
||||
// TODO: implement the loading window as a layer instead
|
||||
struct RouteData *route_data;
|
||||
|
||||
// Function declarations
|
||||
@@ -190,12 +191,13 @@ static void app_message_outbox_failed_callback(DictionaryIterator *iter, AppMess
|
||||
static void app_message_send_search_data() {
|
||||
// Send the data to the phone if conn is ready
|
||||
if (route_data->ready) {
|
||||
// Create a string with the correct length
|
||||
char message[sizeof(address) + 1];
|
||||
// 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 ???)
|
||||
snprintf(message, sizeof(message), "%i%s", selected_type_enum, address);
|
||||
// Make sure the string is terminated correctely (just in case)
|
||||
message[sizeof(message) - 1] = '\0';
|
||||
message[len] = '\0';
|
||||
|
||||
// Write string to bluetooth storage
|
||||
DictionaryIterator *iter;
|
||||
@@ -220,7 +222,7 @@ static void app_message_start() {
|
||||
route_data = malloc(sizeof(struct RouteData));
|
||||
|
||||
// Set initial values
|
||||
route_data->ready = true;
|
||||
route_data->ready = true; /*skip ready check*/
|
||||
route_data->callback = false;
|
||||
route_data->distance = 0;
|
||||
route_data->time = 0;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "loading_window.h"
|
||||
|
||||
// TODO: Tidy this! (will do later)
|
||||
// TODO: disconnect loading / display window to make things work better soon! (or move the 'loading window' to a 'loading layer'...)
|
||||
// Some stuff added by me
|
||||
static bool will_close;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user