Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit 3c4a4d5

Browse files
committed
Merge pull request #58 from thunsaker/bug/legacy-sdk
Attempting fix on Aplite. Closes #57 Support for Aplite on SDK3 and Pebble Time is complete. Those who choose not to upgrade will default to the legacy version for SDK2.
2 parents 4632c5c + a37053b commit 3c4a4d5

15 files changed

+241
-143
lines changed

appinfo.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@
2525
"projectType": "native",
2626
"resources": {
2727
"media": [
28-
{
29-
"file": "images/refresh.png",
30-
"name": "IMAGE_REFRESH",
31-
"type": "png"
32-
},
3328
{
3429
"file": "images/spoon_2_menu_icon.png",
3530
"menuIcon": true,
3631
"name": "IMAGE_MENU",
37-
"type": "png"
32+
"type": "bitmap"
3833
},
3934
{
4035
"file": "images/foursquare_cog.png",
4136
"name": "IMAGE_COG",
42-
"type": "png"
43-
},
44-
{
45-
"file": "images/check_white.png",
46-
"name": "IMAGE_CHECK_ON",
47-
"type": "png"
37+
"type": "bitmap"
4838
},
4939
{
5040
"file": "images/honey_spoon_white.png",
5141
"name": "IMAGE_SPOON_WHITE",
52-
"type": "png"
42+
"type": "bitmap"
43+
},
44+
{
45+
"file": "images/refresh.png",
46+
"name": "IMAGE_REFRESH",
47+
"type": "bitmap"
48+
},
49+
{
50+
"file": "images/check_white.png",
51+
"name": "IMAGE_CHECK_ON",
52+
"type": "bitmap"
5353
}
5454
]
5555
},
@@ -60,7 +60,7 @@
6060
"basalt"
6161
],
6262
"uuid": "1cceab0a-8dc1-4641-b7b6-5ea9c827dd66",
63-
"versionLabel": "2.04",
63+
"versionLabel": "2.06",
6464
"watchapp": {
6565
"watchface": false
6666
}

src/checkin.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#include <pebble.h>
44
#include "checkin.h"
55
#include "colors.h"
66
#include "common.h"
77
#include "libs/pebble-assist.h"
8+
#include "paths.h"
89

910
static Window *s_main_window;
1011
#ifdef PBL_SDK_3
@@ -33,14 +34,6 @@ static int pulse = 0;
3334
static int progress = 100;
3435

3536
static GPath *s_check_large_path = NULL;
36-
static const GPathInfo CHECK_LARGE_PATH_POINTS = {
37-
7,
38-
(GPoint []) {{45,65},{35,77},{62,111},{115,42},{103,29},{62,87},{45,65}}
39-
};
40-
static const GPathInfo CHECK_LARGE_2_PATH_POINTS = {
41-
7,
42-
(GPoint []) {{50,67},{41,76},{64,104},{108,46},{99,36},{64,85},{50,67}}
43-
};
4437

4538
void checkin_show(void);
4639
static void countdown_tick(void *ctx);
@@ -63,7 +56,11 @@ static void countdown_tick(void *ctx) {
6356
start_countdown();
6457
} else {
6558
APP_LOG(APP_LOG_LEVEL_DEBUG, "Pop it like it's hot!");
66-
window_stack_pop_all(true);
59+
// #ifdef PBL_SDK_3
60+
window_stack_pop_all(true);
61+
// #else
62+
// window_stack_pop(s_main_window);
63+
// #endif
6764
}
6865
}
6966

@@ -246,6 +243,10 @@ static void init(void) {
246243
void checkin_deinit(void) {
247244
layer_destroy_safe(layer_back);
248245
layer_destroy_safe(layer_check);
246+
text_layer_destroy_safe(text_layer_status);
247+
#ifdef PBL_SDK_3
248+
layer_destroy_safe(layer_countdown_bar);
249+
#endif
249250
window_destroy_safe(s_main_window);
250251
}
251252

src/checkin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#pragma once
44

src/checkin_menu.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#include <pebble.h>
44
#include "libs/pebble-assist.h"
@@ -121,8 +121,13 @@ static void window_load(Window *window) {
121121

122122
menu_layer_set_click_config_onto_window(s_menu_layer, window);
123123
#ifdef PBL_SDK_3
124-
menu_layer_set_normal_colors(s_menu_layer, GColorBlack, GColorLightGray);
125-
menu_layer_set_highlight_colors(s_menu_layer, GColorBlack, GColorWhite);
124+
#ifdef PBL_COLOR
125+
menu_layer_set_normal_colors(s_menu_layer, GColorBlack, GColorLightGray);
126+
menu_layer_set_highlight_colors(s_menu_layer, GColorBlack, (GColor)get_primary_color());
127+
#else
128+
menu_layer_set_normal_colors(s_menu_layer, GColorWhite, GColorBlack);
129+
menu_layer_set_highlight_colors(s_menu_layer, GColorBlack, GColorWhite);
130+
#endif
126131
#endif
127132
layer_add_child(window_layer, menu_layer_get_layer(s_menu_layer));
128133

src/checkin_menu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#pragma once
44

src/colors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#include <pebble.h>
44
#include "colors.h"

src/colors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#pragma once
44

src/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#pragma once
44

src/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#include <pebble.h>
44
#include "config.h"

src/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 2015 Thomas Hunsaker @thunsaker
1+
// 2016 Thomas Hunsaker @thunsaker
22

33
#pragma once
44

0 commit comments

Comments
 (0)