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:
dyedgreen
2016-06-22 23:46:18 +02:00
parent cac5d9c320
commit d43780daa6
2 changed files with 7 additions and 4 deletions
+6 -4
View File
@@ -31,6 +31,7 @@ static DictationSession *dictation_session;
static char *address; static char *address;
// TODO: implement a timer, that kills the proccess if the message is never send (needed?) // 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; struct RouteData *route_data;
// Function declarations // Function declarations
@@ -190,12 +191,13 @@ static void app_message_outbox_failed_callback(DictionaryIterator *iter, AppMess
static void app_message_send_search_data() { static void app_message_send_search_data() {
// Send the data to the phone if conn is ready // Send the data to the phone if conn is ready
if (route_data->ready) { if (route_data->ready) {
// Create a string with the correct length // Create a string with the correct length (len is the length w/o the '/0' char)
char message[sizeof(address) + 1]; 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 FIXME (cuts of after 'mee' for the test 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[sizeof(message) - 1] = '\0'; message[len] = '\0';
// Write string to bluetooth storage // Write string to bluetooth storage
DictionaryIterator *iter; DictionaryIterator *iter;
@@ -220,7 +222,7 @@ static void app_message_start() {
route_data = malloc(sizeof(struct RouteData)); route_data = malloc(sizeof(struct RouteData));
// Set initial values // Set initial values
route_data->ready = true; route_data->ready = true; /*skip ready check*/
route_data->callback = false; route_data->callback = false;
route_data->distance = 0; route_data->distance = 0;
route_data->time = 0; route_data->time = 0;
+1
View File
@@ -2,6 +2,7 @@
#include "loading_window.h" #include "loading_window.h"
// TODO: Tidy this! (will do later) // 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 // Some stuff added by me
static bool will_close; static bool will_close;