mirror of
https://github.com/google/pebble.git
synced 2025-11-19 14:00:59 -05:00
spelling: compensate
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -891,7 +891,7 @@ static void prv_fill_oval_precise(GContext *ctx, GPointPrecise center,
|
|||||||
|
|
||||||
// Adjust to drawing_box offset
|
// Adjust to drawing_box offset
|
||||||
int adjusted_center = center.y.integer + ctx->draw_state.drawing_box.origin.y;
|
int adjusted_center = center.y.integer + ctx->draw_state.drawing_box.origin.y;
|
||||||
// We add one to compenaste in case of odd line needs to be drawn
|
// We add one to compensate in case of odd line needs to be drawn
|
||||||
int adjusted_top = adjusted_center - radius_outer_y.integer - 1;
|
int adjusted_top = adjusted_center - radius_outer_y.integer - 1;
|
||||||
int adjusted_bottom = adjusted_center + radius_outer_y.integer + 1;
|
int adjusted_bottom = adjusted_center + radius_outer_y.integer + 1;
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ static uint64_t prv_now_ms(void) {
|
|||||||
static void prv_advance_by_ms_no_timers(uint64_t ms_delta) {
|
static void prv_advance_by_ms_no_timers(uint64_t ms_delta) {
|
||||||
uint64_t target_ms = prv_now_ms() + ms_delta;
|
uint64_t target_ms = prv_now_ms() + ms_delta;
|
||||||
|
|
||||||
// Comppensate for rounding errors
|
// Compensate for rounding errors
|
||||||
uint64_t new_ticks = rtc_get_ticks() + (ms_delta * RTC_TICKS_HZ + 500 ) / 1000;
|
uint64_t new_ticks = rtc_get_ticks() + (ms_delta * RTC_TICKS_HZ + 500 ) / 1000;
|
||||||
uint64_t new_ms = (new_ticks * 1000 + RTC_TICKS_HZ / 2) / RTC_TICKS_HZ;
|
uint64_t new_ms = (new_ticks * 1000 + RTC_TICKS_HZ / 2) / RTC_TICKS_HZ;
|
||||||
if (new_ms == target_ms - 1) {
|
if (new_ms == target_ms - 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user