Ejemplo n.º 1
0
void out_failed_handler(DictionaryIterator *failed, AppMessageResult reason, void *context)
{
	APP_LOG(APP_LOG_LEVEL_WARNING, "command send failed");
	
	text_layer_set_text(statusTextLayer, STATUS_FAILED);
	start_reset_timer();
}
Ejemplo n.º 2
0
// App message callbacks
void out_sent_handler(DictionaryIterator *sent, void *context)
{
	//APP_LOG(APP_LOG_LEVEL_INFO, "command sent");
	
	vibes_short_pulse();
	start_reset_timer();
}
Ejemplo n.º 3
0
static void send_cmd(uint8_t cmd)
{
	start_reset_timer();

	DictionaryIterator *iter;
	app_message_outbox_begin(&iter);
	
	Tuplet value = TupletInteger(CMD_KEY, cmd);
	dict_write_tuplet(iter, &value);
	
	app_message_outbox_send();
}
Ejemplo n.º 4
0
static void app_received_msg(DictionaryIterator* received, void* context)
{
    vibes_short_pulse();
    text_layer_set_text(statusTextLayer, STATUS_DONE);
    start_reset_timer();
}
Ejemplo n.º 5
0
// App message callbacks
static void app_send_failed(DictionaryIterator *iterator, AppMessageResult reason, void *context)
{
    text_layer_set_text(statusTextLayer, STATUS_FAILED);
    start_reset_timer();
}