Skip to content

Commit

Permalink
Merge pull request #240 from Open-Smartwatch/comment
Browse files Browse the repository at this point in the history
Remove comment(#240).
  • Loading branch information
RuffaloLavoisier authored Jun 15, 2022
2 parents ae4f317 + b4e4b07 commit 97ef9ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions include/apps/watchfaces/OswAppWatchfaceDual.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ class OswAppWatchfaceDual : public OswApp {
virtual void loop() override;
virtual void stop() override;
~OswAppWatchfaceDual() {};

//for dual-time

static void drawProgressBar(OswUI* ui,uint8_t cx, uint8_t cy, uint8_t jump, uint8_t length, uint8_t value,float angle, uint8_t radius, uint16_t color, uint8_t* goal=nullptr);
void drawAnimSec();

private:
OswUI* ui;
// Blank to make the 2 clocks easier to recognize
};
8 changes: 4 additions & 4 deletions src/apps/tools/OswAppKcalStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ void OswAppKcalStats::showCurvedChart() {
hal->gfx()->setTextCursor(DISP_W / 2 - 7, 185);
hal->gfx()->print(String(OswAppWatchfaceFitness::calculateDistance(hal->environment->getStepsTotalWeek()) / 7 ));
hal->gfx()->setTextCursor(DISP_W / 2 - 7, 195);
hal->gfx()->print(hal->environment->getStepsTotalWeek()/7); // total step counter
hal->gfx()->print(hal->environment->getStepsTotalWeek()/7);
hal->gfx()->setTextCursor(DISP_W / 2 - 7, 205);
hal->gfx()->print(OswAppWatchfaceFitness::calculateKcalorie(hal->environment->getStepsTotalWeek())/7); // total step counter
hal->gfx()->print(OswAppWatchfaceFitness::calculateKcalorie(hal->environment->getStepsTotalWeek())/7);
hal->gfx()->setTextLeftAligned();
hal->gfx()->setTextCursor(DISP_W / 2 + 7, 185);
hal->gfx()->print(OswAppWatchfaceFitness::calculateDistance(hal->environment->getStepsOnDay(wDay))+String(" m"));
hal->gfx()->setTextCursor(DISP_W / 2 + 7, 195);
hal->gfx()->print(hal->environment->getStepsOnDay(wDay) + String(" ") + String(LANG_KCAL_STEP)); // total step counter
hal->gfx()->print(hal->environment->getStepsOnDay(wDay) + String(" ") + String(LANG_KCAL_STEP));
hal->gfx()->setTextCursor(DISP_W / 2 + 7, 205);
hal->gfx()->print(OswAppWatchfaceFitness::calculateKcalorie(hal->environment->getStepsOnDay(wDay))+String(" kcal")); // total step counter
hal->gfx()->print(OswAppWatchfaceFitness::calculateKcalorie(hal->environment->getStepsOnDay(wDay))+String(" kcal"));
}

void OswAppKcalStats::setup() {}
Expand Down
3 changes: 1 addition & 2 deletions src/apps/tools/OswAppStepStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ void OswAppStepStats::drawChart() {
hal->getLocalDate(&dayOfMonth, &weekDay);

for (uint8_t index = 0; index < 7; index++) {
uint32_t weekDayStep = hal->environment->getStepsOnDay(index); // virtual step simulation
uint32_t weekDayStep = hal->environment->getStepsOnDay(index);
uint16_t chartStickValue = ((float)(weekDayStep > goalValue ? goalValue : weekDayStep) / goalValue) * chartStickHeight;

uint16_t barColor = OswConfigAllKeys::stepsPerDay.get() <= weekDayStep ? ui->getSuccessColor() : changeColor(ui->getSuccessColor(),2.85);

chartStickValue = chartStickValue < 2 ? 0 : chartStickValue;
// step bars

if (index == weekDay) {
hal->gfx()->drawThickTick(60 + index * interval, 147, 0, chartStickHeight, 0, 5, ui->getForegroundColor());
Expand Down

0 comments on commit 97ef9ca

Please sign in to comment.