Compare commits

..

No commits in common. "833200d2f25756a177a339e0ea629b4b86c7c014" and "4e6259541f7e70bd0b78f4ef783ad3a4cf3c46b0" have entirely different histories.

2 changed files with 6 additions and 8 deletions

View File

@ -129,8 +129,6 @@ void WatchFaceGravel::Refresh() {
}
lv_label_set_text(labelTimeAMPM, ampmChar);
}
uint16_t pointCount = refreshStepLinePoints(dateTimeController.Seconds(), 60);
lv_line_set_points(stepLine, stepLinePoints.data(), pointCount);
lv_label_set_text_fmt(labelTime, "%02d:%02d", hour, minute);
lv_obj_align_origo(labelTime, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
@ -143,11 +141,11 @@ void WatchFaceGravel::Refresh() {
lv_obj_realign(labelDate);
}
/*stepCount = motionController.NbSteps();
stepCount = motionController.NbSteps();
if (stepCount.IsUpdated()) {
uint16_t pointCount = refreshStepLinePoints(std::min(stepCount.Get(), settingsController.GetStepsGoal()), settingsController.GetStepsGoal());
uint16_t pointCount = refreshStepLinePoints(std::min(stepCount.Get(), settingsController.GetStepsGoal()));
lv_line_set_points(stepLine, stepLinePoints.data(), pointCount);
}*/
}
lv_obj_realign(stepLine);
isCharging = batteryController.IsCharging();
@ -257,7 +255,7 @@ WatchFaceGravel::DrawStop WatchFaceGravel::getDrawEnd(float percent, uint16_t wi
}
// Credit to https://github.com/mrwonderman/android-square-progressbar for original source
uint16_t WatchFaceGravel::refreshStepLinePoints(uint32_t stepCount, uint32_t max) {
uint16_t WatchFaceGravel::refreshStepLinePoints(uint32_t stepCount) {
uint16_t currentPointIndex = 0;
if (stepCount == 0)
@ -273,7 +271,7 @@ uint16_t WatchFaceGravel::refreshStepLinePoints(uint32_t stepCount, uint32_t max
stepLinePoints[currentPointIndex++] = {.x = x, .y = y};
};
float progress = static_cast<float>(stepCount * 100) / static_cast<float>(max);
float progress = static_cast<float>(stepCount * 100) / static_cast<float>(settingsController.GetStepsGoal());
float percent = (scope / 100.0F) * progress;
auto drawEnd = getDrawEnd(percent, barWidth, barHeight);

View File

@ -76,7 +76,7 @@ namespace Pinetime {
} DrawStop;
DrawStop getDrawEnd(float percent, uint16_t width, uint16_t height);
uint16_t refreshStepLinePoints(uint32_t stepCount, uint32_t max);
uint16_t refreshStepLinePoints(uint32_t stepCount);
void updateBatteryBar(uint8_t percent);
void toggleBatteryChargingAnimation(bool enabled, uint8_t percent);
};