Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
v5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed May 19, 2017
1 parent 11aadbb commit fff3fb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@
"watchface": true
}
},
"version": "5.0.0"
"version": "5.1.0"
}
12 changes: 9 additions & 3 deletions src/c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ static int32_t get_angle_dot(int dot){
}
static int get_angle_for_minutes(int minutes){
int floor5=minutes/5;
return (floor5*5 * 360) / 60;
if (minutes%5 ==0){
return (floor5*5 * 360) / 60;
}
else
return (floor5*5 * 360) / 60+15;
};
static int get_angle_for_battery(int battery){
int floor30 = (100 - battery) * 360 / 3000;
Expand Down Expand Up @@ -131,6 +135,8 @@ static void layer_update_proc(Layer * layer, GContext * ctx){
}
// Create Rects
GRect bounds = layer_get_bounds(layer);
graphics_context_set_fill_color(ctx, ColorSelect(settings.BackgroundColor, settings.BackgroundColorNight));
graphics_fill_rect(ctx, bounds, 0, GCornersAll);
GRect frame = grect_inset(bounds, GEdgeInsets(7));
GRect inner = grect_inset(frame, GEdgeInsets(12));
int minute_angle = get_angle_for_minutes(s_minutes);
Expand Down Expand Up @@ -249,8 +255,8 @@ static void layer_update_proc(Layer * layer, GContext * ctx){
if (settings.ClockMode!=1){
graphics_fill_circle(ctx, pos, 3);
}
// Leave the current minute without dot
else if (i != minute_angle/30 ){
// Leave the current minute without dot if mod is 0
else if (i != minute_angle/30 || minute_angle % 30 !=0 ){
graphics_fill_circle(ctx, pos, 3);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/pkjs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ module.exports = [
},
{
"type": "heading",
"defaultValue": "version v5.0",
"defaultValue": "version v5.1",
"size":6
},
{
Expand Down

0 comments on commit fff3fb8

Please sign in to comment.