diff --git a/package.json b/package.json index 1e1dca4..6f7500f 100644 --- a/package.json +++ b/package.json @@ -109,5 +109,5 @@ "watchface": true } }, - "version": "2.0.0" + "version": "2.1.0" } diff --git a/src/c/main.c b/src/c/main.c index 15e472b..f209be3 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -7,7 +7,7 @@ static GFont FontHour, FontMinute, FontDate, FontTemp, FontCond, FontCiti, FontS char tempstring[44], condstring[44], citistring[44]; static Window * s_window; static Layer * s_canvas; -static int s_hours, s_minutes, s_weekday, s_day, s_loop, s_countdown, s_steps; +static int s_hours, s_minutes, s_weekday, s_day, s_loop, s_countdown, s_steps; static bool Health=false; //////Init Configuration/// //Init Clay @@ -61,13 +61,13 @@ static int x_min(int min, GRect ref, int wmin){ else if (min<=37){ math=(w_ref-wmin-respect)*(37-min)/(37-23); return x_ref+wmin/2+respect/2+math; - } + } else if (min<=52){ return x_ref+wmin/2; } else { math=(w_ref/2-wmin/2-respect/2)*(min-53)/(60-53); - return x_ref+wmin/2+respect/2+math; + return x_ref+wmin/2+respect/2+math; } }; static int y_min (int min, GRect ref, int hmin){ @@ -76,7 +76,7 @@ static int y_min (int min, GRect ref, int hmin){ int respect=10; int math; if (min <=7 || min>=53){ - return y_ref+hmin/2; + return y_ref+hmin/2; } else if (min>=23 && min<=37){ return y_ref+h_ref-hmin/2; @@ -87,13 +87,13 @@ static int y_min (int min, GRect ref, int hmin){ } else { math=(h_ref-hmin-respect)*(52-min)/(52-38); - return y_ref+hmin/2+respect/2+math; - } + return y_ref+hmin/2+respect/2+math; + } } static int hourtodraw(bool hourformat, int hournow){ if (hourformat){ return hournow; - } + } else{ if (hournow == 0){ return 12; @@ -107,7 +107,7 @@ static int hourtodraw(bool hourformat, int hournow){ static GColor ColorSelect(GColor ColorDay, GColor ColorNight){ if (settings.NightTheme && settings.IsNightNow ){ return ColorNight; - } + } else{ return ColorDay; } @@ -135,7 +135,7 @@ static void onreconnection(bool before, bool now){ } } static void bezelmodeforsquare(GContext * ctx,GRect ref,int min, int x, int y){ - graphics_context_set_fill_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); + graphics_context_set_fill_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); int wmin=32; int hmin=22; if (min<=7){ @@ -154,21 +154,20 @@ static void bezelmodeforsquare(GContext * ctx,GRect ref,int min, int x, int y){ else if (min<=37){ graphics_fill_rect(ctx, GRect(0, ref.size.h-hmin, x, hmin), 0, GCornerNone); graphics_fill_rect(ctx, GRect(0, 0, wmin, ref.size.h-hmin), 0, GCornerNone); - graphics_fill_rect(ctx, GRect(0, 0, ref.size.w/2, hmin), 0, GCornerNone); + graphics_fill_rect(ctx, GRect(0, 0, ref.size.w/2, hmin), 0, GCornerNone); } else if (min<=52){ graphics_fill_rect(ctx, GRect(0, 0, wmin, y), 0, GCornerNone); - graphics_fill_rect(ctx, GRect(wmin, 0, ref.size.w/2-wmin, hmin), 0, GCornerNone); + graphics_fill_rect(ctx, GRect(wmin, 0, ref.size.w/2-wmin, hmin), 0, GCornerNone); } else { - graphics_fill_rect(ctx, GRect(x, 0, ref.size.w/2-x, hmin), 0, GCornerNone); - } + graphics_fill_rect(ctx, GRect(x, 0, ref.size.w/2-x, hmin), 0, GCornerNone); + } } - static void developingforsquare(Layer * layer, GContext * ctx){ // Prepare canvas //Create Background - GRect bounds = layer_get_bounds(layer); + GRect bounds = layer_get_bounds(layer); graphics_context_set_fill_color(ctx, ColorSelect(settings.ForegroundColor, settings.ForegroundColorNight)); graphics_fill_rect(ctx, bounds, 0, GCornersAll); graphics_context_set_fill_color(ctx, ColorSelect(settings.BackgroundColor, settings.BackgroundColorNight)); @@ -176,47 +175,47 @@ static void developingforsquare(Layer * layer, GContext * ctx){ graphics_fill_rect(ctx, inner, 0, GCornersAll); // Hour graphics_context_set_text_color(ctx, ColorSelect(settings.HourColor, settings.HourColorNight)); - GRect hour_rect=grect_centered_from_polar(GRect(bounds.origin.x+bounds.size.w/2, bounds.origin.y+bounds.size.h/2, 0, 0), GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE(0), GSize(50, 42)); + GRect hour_rect=grect_centered_from_polar(GRect(bounds.origin.x+bounds.size.w/2, bounds.origin.y+bounds.size.h/2, 0, 0), + GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE(0), GSize(50, 42)); char hournow[4]; int hourtorect = hourtodraw(clock_is_24h_style(), s_hours); snprintf(hournow, sizeof(hournow), "%02d", hourtorect); graphics_draw_text(ctx, hournow, FontHour, hour_rect, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); //Dev:Place ampm - if (!clock_is_24h_style()){ + if (!clock_is_24h_style()){ char ampm[2]; if (s_hours < 12){ strcpy(ampm, "am"); - } + } else{ strcpy(ampm, "pm"); } - GRect ampmrect = GRect(hour_rect.origin.x + hour_rect.size.w-30, - hour_rect.origin.y +hour_rect.size.h-10, - 30, - 18); - graphics_draw_text(ctx, ampm, FontDate, ampmrect, GTextOverflowModeWordWrap, GTextAlignmentRight, NULL); - } + GRect ampmrect = GRect(hour_rect.origin.x + hour_rect.size.w-30, + hour_rect.origin.y +hour_rect.size.h-10, + 30, + 18); + graphics_draw_text(ctx, ampm, FontDate, ampmrect, GTextOverflowModeWordWrap, GTextAlignmentRight, NULL); + } // Minute int xtodraw=x_min(s_minutes, bounds, 32); int ytodraw=y_min(s_minutes, bounds, 22); if (settings.ClockMode==1){ graphics_context_set_text_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); - char minnow[4]; + char minnow[4]; snprintf(minnow, sizeof(minnow), "%02d",s_minutes); - graphics_draw_text(ctx, minnow, FontMinute, + graphics_draw_text(ctx, minnow, FontMinute, GRect(xtodraw-32/2, ytodraw-22/2, 32, 22), GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); - } else if (settings.ClockMode==2){ graphics_context_set_fill_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); GPoint dotpos=GPoint(xtodraw, ytodraw); - graphics_fill_circle(ctx, dotpos, 7); + graphics_fill_circle(ctx, dotpos, 7); } else if (settings.ClockMode==3){ bezelmodeforsquare(ctx, bounds, s_minutes, xtodraw, ytodraw); } - // Date + // Date if (settings.DisplayDate){ if (s_minutes<18 && settings.ClockMode==3){ graphics_context_set_text_color(ctx, ColorSelect(settings.ForegroundColor, settings.ForegroundColorNight)); @@ -231,17 +230,17 @@ static void developingforsquare(Layer * layer, GContext * ctx){ snprintf(convertday, sizeof(convertday), " %02d", s_day); strcat(datenow, convertday); GRect date_rect_right=GRect(inner.origin.x+inner.size.w+4, hour_rect.origin.y+8, 30, hour_rect.size.h); - GRect date_rect_left=GRect(inner.origin.x-date_rect_right.size.w-4, date_rect_right.origin.y, + GRect date_rect_left=GRect(inner.origin.x-date_rect_right.size.w-4, date_rect_right.origin.y, date_rect_right.size.w, date_rect_right.size.h); if (s_minutes>12 && s_minutes<18){ graphics_draw_text(ctx, datenow, FontDate, date_rect_left, GTextOverflowModeWordWrap, GTextAlignmentRight, NULL); } else { - graphics_draw_text(ctx, datenow, FontDate, date_rect_right, GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); + graphics_draw_text(ctx, datenow, FontDate, date_rect_right, GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); } } // Complications - //Settings by Default + //Settings by Default graphics_context_set_text_color(ctx, ColorSelect(settings.HourColor, settings.HourColorNight)); GRect loc_rect=GRect(inner.origin.x+4, hour_rect.origin.y-35, inner.size.w-8, 35); GRect temprect = GRect(hour_rect.origin.x - 10,inner.origin.y+inner.size.h-30, @@ -254,9 +253,9 @@ static void developingforsquare(Layer * layer, GContext * ctx){ GRect loc_rect_alt=GRect(loc_rect.origin.x, temprect.origin.y, loc_rect.size.w, loc_rect.size.h-5); GRect temprect_alt=GRect(temprect.origin.x, hour_rect.origin.y-condrect.size.h, temprect.size.w, temprect.size.h); GRect condrect_alt=GRect(condrect.origin.x, temprect_alt.origin.y, condrect.size.w, condrect.size.h); - GRect iconstep_alt=GRect(loc_rect_alt.origin.x, loc_rect_alt.origin.y, 20, loc_rect_alt.size.h); + GRect iconstep_alt=GRect(loc_rect_alt.origin.x, loc_rect_alt.origin.y, 20, loc_rect_alt.size.h); GRect numstep_alt=GRect(iconstep_alt.origin.x+iconstep_alt.size.w,iconstep_alt.origin.y,loc_rect_alt.size.w-iconstep_alt.size.w,iconstep_alt.size.h); - if (settings.TopComp>=0 || settings.BottomComp>=0){ + if (settings.TopComp>=0 || settings.BottomComp>=0){ if (!settings.BTOn){ graphics_draw_text(ctx, "a", FontSymbol, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } @@ -271,14 +270,14 @@ static void developingforsquare(Layer * layer, GContext * ctx){ } else if (settings.BottomComp==3){ graphics_draw_text(ctx, "c", FontSymbol, iconstep_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, stepstring, FontTemp , numstep_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, stepstring, FontTemp , numstep_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } } } if (settings.DisplayTemp || settings.DisplayLoc){ if (!settings.GPSOn){ if (settings.TopComp==3){ - graphics_draw_text(ctx, "b", FontSymbol, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, "b", FontSymbol, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } else { graphics_draw_text(ctx, "b", FontSymbol, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); @@ -287,10 +286,10 @@ static void developingforsquare(Layer * layer, GContext * ctx){ else{ if (settings.DisplayLoc){ if (settings.TopComp==1){ - graphics_draw_text(ctx, citistring, FontCiti, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, citistring, FontCiti, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } else if (settings.BottomComp==1){ - graphics_draw_text(ctx, citistring, FontCiti, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, citistring, FontCiti, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } } if (settings.DisplayTemp){ @@ -300,14 +299,13 @@ static void developingforsquare(Layer * layer, GContext * ctx){ } else if (settings.TopComp==2){ graphics_draw_text(ctx, tempstring, FontTemp, temprect_alt, GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); - graphics_draw_text(ctx, condstring, FontCond, condrect_alt, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, condstring, FontCond, condrect_alt, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } } } } } } - } static void developingforround(Layer * layer, GContext * ctx){ // Prepare canvas @@ -319,7 +317,7 @@ static void developingforround(Layer * layer, GContext * ctx){ graphics_fill_radial(ctx, bounds, GOvalScaleModeFitCircle, 32, DEG_TO_TRIGANGLE(0), DEG_TO_TRIGANGLE(360)); GRect inner = grect_inset(bounds, GEdgeInsets(15)); // Hour - graphics_context_set_text_color(ctx, ColorSelect(settings.HourColor, settings.HourColorNight)); + graphics_context_set_text_color(ctx, ColorSelect(settings.HourColor, settings.HourColorNight)); GRect hour_rect=grect_centered_from_polar(GRect(bounds.size.w/2, bounds.size.h/2, 0, 0), GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE(0), GSize(50, 42)); char hournow[4]; int hourtorect = hourtodraw(clock_is_24h_style(), s_hours); @@ -330,7 +328,7 @@ static void developingforround(Layer * layer, GContext * ctx){ char ampm[2]; if (s_hours < 12){ strcpy(ampm, "am"); - } + } else{ strcpy(ampm, "pm"); } @@ -339,14 +337,13 @@ static void developingforround(Layer * layer, GContext * ctx){ 30, 8); graphics_draw_text(ctx, ampm, FontDate, ampmrect, GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); - - } + } // Minute if (settings.ClockMode==1){ graphics_context_set_text_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); - char minnow[4]; + char minnow[4]; snprintf(minnow, sizeof(minnow), "%02d",s_minutes); - graphics_draw_text(ctx, minnow, FontMinute, + graphics_draw_text(ctx, minnow, FontMinute, grect_centered_from_polar(inner,GOvalScaleModeFitCircle,DEG_TO_TRIGANGLE(360*s_minutes/60),GSize(32, 22)), GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } @@ -354,7 +351,7 @@ static void developingforround(Layer * layer, GContext * ctx){ //Dot graphics_context_set_fill_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); GPoint dotpos=gpoint_from_polar(grect_inset(inner, GEdgeInsets(2)), GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE(360*s_minutes/60)); - graphics_fill_circle(ctx, dotpos, 7); + graphics_fill_circle(ctx, dotpos, 7); } else if (settings.ClockMode==3){ graphics_context_set_fill_color(ctx, ColorSelect(settings.MinColor, settings.MinColorNight)); @@ -371,7 +368,7 @@ static void developingforround(Layer * layer, GContext * ctx){ strcat(datenow, convertday); graphics_context_set_fill_color(ctx, ColorSelect(settings.HourColor, settings.HourColorNight)); GRect date_rect_right=GRect(hour_rect.origin.x+hour_rect.size.w+1, hour_rect.origin.y+8, 30, hour_rect.size.h); - GRect date_rect_left=GRect(hour_rect.origin.x-date_rect_right.size.w-1, date_rect_right.origin.y, + GRect date_rect_left=GRect(hour_rect.origin.x-date_rect_right.size.w-1, date_rect_right.origin.y, date_rect_right.size.w, date_rect_right.size.h); if (clock_is_24h_style()){ graphics_draw_text(ctx, datenow, FontDate, date_rect_right, GTextOverflowModeWordWrap, GTextAlignmentLeft, NULL); @@ -381,18 +378,20 @@ static void developingforround(Layer * layer, GContext * ctx){ } } // Complications - //Settings by Default + //Settings by Default GRect loc_rect=GRect(hour_rect.origin.x-17, hour_rect.origin.y-20, hour_rect.size.w+34, 25); GRect temprect = GRect(hour_rect.origin.x - 10,hour_rect.origin.y + hour_rect.size.h + 1, hour_rect.size.w / 2 + 9,(inner.size.h / 2 - hour_rect.size.h / 2) / 2); GRect condrect = GRect(hour_rect.origin.x + hour_rect.size.w / 2 + 1,temprect.origin.y, hour_rect.size.w / 2 +5,(inner.size.h / 2 - hour_rect.size.h / 2) / 2); - GRect iconstep=GRect(loc_rect.origin.x, loc_rect.origin.y, 20, loc_rect.size.h); - //Alt location - GRect loc_rect_alt=GRect(loc_rect.origin.x, hour_rect.origin.y+hour_rect.size.h-5, loc_rect.size.w, loc_rect.size.h); + GRect iconstep=GRect(temprect.origin.x, loc_rect.origin.y, 20, loc_rect.size.h); + //Alt location + GRect loc_rect_alt=GRect(loc_rect.origin.x+5, temprect.origin.y, loc_rect.size.w-10, loc_rect.size.h+10); GRect temprect_alt=GRect(temprect.origin.x, hour_rect.origin.y-temprect.size.h+5, temprect.size.w, temprect.size.h); GRect condrect_alt=GRect(condrect.origin.x, temprect_alt.origin.y, condrect.size.w, condrect.size.h); - GRect iconstep_alt=GRect(loc_rect_alt.origin.x, loc_rect_alt.origin.y, 20, loc_rect_alt.size.h); + GRect iconstep_alt=GRect(iconstep.origin.x, loc_rect_alt.origin.y, 20, loc_rect_alt.size.h); + GRect numstep=GRect(iconstep.origin.x+iconstep.size.w, iconstep.origin.y, loc_rect_alt.size.w-iconstep_alt.size.w, loc_rect.size.h); + GRect numstep_alt=GRect(iconstep_alt.origin.x+iconstep_alt.size.w, iconstep_alt.origin.y, loc_rect_alt.size.w-iconstep_alt.size.w, loc_rect_alt.size.h); if (settings.TopComp>=0 || settings.BottomComp>=0){ if (!settings.BTOn){ graphics_draw_text(ctx, "a", FontSymbol, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); @@ -404,30 +403,30 @@ static void developingforround(Layer * layer, GContext * ctx){ snprintf(stepstring, sizeof(stepstring), "%d", s_steps); if (settings.TopComp==3){ graphics_draw_text(ctx, "c", FontSymbol, iconstep, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, stepstring, FontTemp , loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, stepstring, FontTemp , numstep, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } else if (settings.BottomComp==3){ graphics_draw_text(ctx, "c", FontSymbol, iconstep_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - graphics_draw_text(ctx, stepstring, FontTemp , loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, stepstring, FontTemp , numstep_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } } } if (settings.DisplayTemp || settings.DisplayLoc){ - if (!settings.GPSOn){ + if (!settings.GPSOn){ if (settings.TopComp==3){ - graphics_draw_text(ctx, "b", FontSymbol, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, "b", FontSymbol, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } else { graphics_draw_text(ctx, "b", FontSymbol, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - } + } } else { if (settings.DisplayLoc){ if (settings.TopComp==1){ - graphics_draw_text(ctx, citistring, FontCiti, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, citistring, FontCiti, loc_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } else if (settings.BottomComp==1){ - graphics_draw_text(ctx, citistring, FontCiti, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, citistring, FontCiti, loc_rect_alt, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); } } if (settings.DisplayTemp){ @@ -437,7 +436,7 @@ static void developingforround(Layer * layer, GContext * ctx){ } else if (settings.TopComp==2){ graphics_draw_text(ctx, tempstring, FontTemp, temprect_alt, GTextOverflowModeTrailingEllipsis, GTextAlignmentRight, NULL); - graphics_draw_text(ctx, condstring, FontCond, condrect_alt, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); + graphics_draw_text(ctx, condstring, FontCond, condrect_alt, GTextOverflowModeTrailingEllipsis, GTextAlignmentCenter, NULL); } } } @@ -447,11 +446,11 @@ static void developingforround(Layer * layer, GContext * ctx){ } //Update main layer static void layer_update_proc(Layer * layer, GContext * ctx){ -//BT Handlers + //BT Handlers //If it was disconnected fetch new values onreconnection(settings.BTOn, connection_service_peek_pebble_app_connection()); // Update connection toggle - bluetooth_callback(connection_service_peek_pebble_app_connection()); + bluetooth_callback(connection_service_peek_pebble_app_connection()); int Round=PBL_IF_ROUND_ELSE(1, 0); if (Round==0){ APP_LOG(APP_LOG_LEVEL_DEBUG, "Square Pebble"); @@ -569,24 +568,24 @@ static void prv_inbox_received_handler(DictionaryIterator * iter, void * context } Tuple * topcomp_t=dict_find(iter, MESSAGE_KEY_TopComp); if (topcomp_t){ - settings.TopComp=atoi(topcomp_t->value->cstring); + settings.TopComp=atoi(topcomp_t->value->cstring); } Tuple * bottomcomp_t=dict_find(iter, MESSAGE_KEY_BottomComp); if (bottomcomp_t){ - settings.BottomComp=atoi(bottomcomp_t->value->cstring); - } + settings.BottomComp=atoi(bottomcomp_t->value->cstring); + } if (settings.TopComp==1 || settings.BottomComp==1){ settings.DisplayLoc=true; } else { settings.DisplayLoc=false; } - if (settings.TopComp==2 || settings.BottomComp==2){ + if (settings.TopComp==2 || settings.BottomComp==2){ settings.DisplayTemp=true; } else { settings.DisplayTemp=false; - } + } Tuple * disntheme_t = dict_find(iter, MESSAGE_KEY_NightTheme); if (disntheme_t){ if (disntheme_t -> value -> int32 == 0){ @@ -598,7 +597,7 @@ static void prv_inbox_received_handler(DictionaryIterator * iter, void * context if (clockmode_t){ settings.ClockMode=atoi(clockmode_t->value->cstring); APP_LOG(APP_LOG_LEVEL_DEBUG, "Mode %d",settings.ClockMode); - } + } //Update colors layer_mark_dirty(s_canvas); window_set_background_color(s_window, ColorSelect( settings.BackgroundColor, settings.BackgroundColorNight)); @@ -647,7 +646,8 @@ static void tick_handler(struct tm * time_now, TimeUnits changed){ if (s_countdown == 0){ //Reset s_countdown = settings.UpSlider; - } else{ + } + else{ s_countdown = s_countdown - 1; } APP_LOG(APP_LOG_LEVEL_DEBUG, "Countdown to update %d", s_countdown); @@ -730,15 +730,15 @@ static void init(){ else { Health=false; } - // subscribe to health events + // subscribe to health events if (Health){ APP_LOG(APP_LOG_LEVEL_DEBUG, "Try health!"); if(health_service_events_subscribe(health_handler, NULL)) { // force initial steps display health_handler(HealthEventMovementUpdate, NULL); APP_LOG(APP_LOG_LEVEL_DEBUG, "Health OK"); - } - else { + } + else { APP_LOG(APP_LOG_LEVEL_DEBUG, "Health not available!"); } } diff --git a/src/pkjs/config.js b/src/pkjs/config.js index 1377911..5ac416a 100644 --- a/src/pkjs/config.js +++ b/src/pkjs/config.js @@ -349,7 +349,7 @@ module.exports = [ }, { "type": "heading", - "defaultValue": "version v2.0", + "defaultValue": "version v2.1", "size":6 }, {