Whitespace and brace fixes (#456)
* Brace style and whitespace fixes * Additional whitespace fixes
This commit is contained in:
parent
3b0fcc2a73
commit
ab59b9b830
2 changed files with 15 additions and 17 deletions
|
@ -22,8 +22,9 @@ void Battery::Update() {
|
||||||
isCharging = !nrf_gpio_pin_read(chargingPin);
|
isCharging = !nrf_gpio_pin_read(chargingPin);
|
||||||
isPowerPresent = !nrf_gpio_pin_read(powerPresentPin);
|
isPowerPresent = !nrf_gpio_pin_read(powerPresentPin);
|
||||||
|
|
||||||
if (isReading)
|
if (isReading) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
// Non blocking read
|
// Non blocking read
|
||||||
samples = 0;
|
samples = 0;
|
||||||
isReading = true;
|
isReading = true;
|
||||||
|
|
|
@ -45,12 +45,11 @@ Steps::Steps(
|
||||||
lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER);
|
lv_label_set_align(lstepsGoal, LV_LABEL_ALIGN_CENTER);
|
||||||
lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 60);
|
lv_obj_align(lstepsGoal, lSteps, LV_ALIGN_OUT_BOTTOM_MID, 0, 60);
|
||||||
|
|
||||||
lv_obj_t * backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
|
lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
|
lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
|
||||||
lv_obj_set_size(backgroundLabel, 240, 240);
|
lv_obj_set_size(backgroundLabel, 240, 240);
|
||||||
lv_obj_set_pos(backgroundLabel, 0, 0);
|
lv_obj_set_pos(backgroundLabel, 0, 0);
|
||||||
lv_label_set_text_static(backgroundLabel, "");
|
lv_label_set_text_static(backgroundLabel, "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Steps::~Steps() {
|
Steps::~Steps() {
|
||||||
|
@ -61,12 +60,10 @@ bool Steps::Refresh() {
|
||||||
|
|
||||||
stepsCount = motionController.NbSteps();
|
stepsCount = motionController.NbSteps();
|
||||||
|
|
||||||
lv_label_set_text_fmt(lSteps,"%li", stepsCount);
|
lv_label_set_text_fmt(lSteps, "%li", stepsCount);
|
||||||
lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -20);
|
lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -20);
|
||||||
|
|
||||||
lv_arc_set_value(stepsArc, int16_t(500 * stepsCount / settingsController.GetStepsGoal()));
|
lv_arc_set_value(stepsArc, int16_t(500 * stepsCount / settingsController.GetStepsGoal()));
|
||||||
|
|
||||||
return running;
|
return running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue