Beispiel #1
0
static void menu_select_callback(int index, void *ctx) {	
	if(index==0)
		send_to_phone(TupletCString(103, "BOAT")); 
	else if(index==1)
		send_to_phone(TupletCString(103, "PIN")); 

	vibes_short_pulse();
	window_stack_pop(true); //this window
}
Beispiel #2
0
static void menu_select_callback(int index, void *ctx) {	

	if(index==0)// 10 mins - 600 sec's
		send_to_phone(TupletCString(104, "600")); 
	else if(index==1)
		send_to_phone(TupletCString(104, "300")); //5 mins
	else if(index==2) // 4 mins = 240 sec's
		send_to_phone(TupletCString(104, "240")); 
 
	window_stack_pop(true); //this window
	vibes_short_pulse();
	//show_start_solution();
}
Beispiel #3
0
void dictation_session_callback(DictationSession *session, DictationSessionStatus status, char *transcription, void *context) {
  if (status == DictationSessionStatusSuccess) {
    send_to_phone(transcription);
  } else {
    text_layer_set_text(s_output_layer, PBL_IF_ROUND_ELSE("Set A Reminder ->", "Set A Reminder"));
  }
}
static void select_callback(int index, void *context) {	
	int * pointerToValue = (int*) context;
	if(* pointerToValue == 0){
		send_to_phone( TupletInteger(101, index)); //index maps to courseIdx!
		vibes_short_pulse();
		window_stack_pop(true); //close this window (course menu)
	}
}
void headingSelected(NumberWindow *window,  void * context){;
	static char msg[20];
	snprintf(msg, 20,  "%d;%d",selectedIndex,(int) number_window_get_value(window));
    send_to_phone( MyTupletCString(105, msg)); //index maps to courseIdx!
	vibes_short_pulse();
	number_window_destroy(degrees_window);
	window_stack_pop(true); //close this window (number window)
	window_stack_pop(true); //close this window (course menu)

}
Beispiel #6
0
static void select_callback(struct MenuLayer *s_menu_layer, MenuIndex *cell_index, 
                            void *callback_context) {

  APP_LOG(APP_LOG_LEVEL_DEBUG, "listSize is %d",listSize);
  // If we were displaying s_error_text_layer, remove it and return
  if (!layer_get_hidden(text_layer_get_layer(s_error_text_layer))) {
    layer_set_hidden(text_layer_get_layer(s_error_text_layer), true);
    return;
  }
  if (listSize == 0) {
    layer_set_hidden(text_layer_get_layer(s_error_text_layer), false);
  } else {
    send_to_phone();
  }
}
Beispiel #7
0
static void select_click_handler(ClickRecognizerRef recognizer, void *context) {
  // refresh
  text_layer_set_text(price_layer, "Loading...");
  send_to_phone(QUOTE_KEY_FETCH);
}