diff --git a/src/c/main.c b/src/c/main.c index 10b5fef..c6be3cc 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -3,7 +3,7 @@ #include #include -#define DEBUG_MODE 1 +// #define DEBUG_MODE 1 // declare settings-derived statics static uint8_t s_is_jellyfin; @@ -53,7 +53,7 @@ static bool s_sleep_session_found; static bool s_sleep_data_accessible; static const uint8_t s_wasted_top_text_pixels = 10; // 10 blank pixels above each line of text -static const uint16_t s_available_height = PBL_DISPLAY_HEIGHT - s_sleep_bar_drop - PBL_IF_ROUND_ELSE(MARGIN / 2, MARGIN) + s_wasted_top_text_pixels; +static const uint16_t s_available_height = PBL_DISPLAY_HEIGHT - s_sleep_bar_drop - MARGIN / 2 + s_wasted_top_text_pixels; // static const uint8_t s_max_rows = s_available_height / LW_FONT_SIZE; static const uint16_t s_screen_center_y = PBL_DISPLAY_HEIGHT / 2; static const uint16_t s_base_shift = s_screen_center_y - (LW_FONT_SIZE / 2) - (s_wasted_top_text_pixels / 2); // base - perfect if there is one row @@ -68,8 +68,8 @@ static void write_last_watched(const char *text) { // if the top extends above the sleep bar, force it below it; // account for blank pixels above text to avoid forcing position when not visually necessary - if (y + s_wasted_top_text_pixels < s_sleep_bar_drop + PBL_IF_ROUND_ELSE(MARGIN / 2, MARGIN)) { - y = s_sleep_bar_drop + PBL_IF_ROUND_ELSE(MARGIN / 2, MARGIN) - s_wasted_top_text_pixels; + if (y + s_wasted_top_text_pixels < s_sleep_bar_drop + MARGIN / 2) { + y = s_sleep_bar_drop + MARGIN / 2 - s_wasted_top_text_pixels; #if PBL_DISPLAY_WIDTH >= 260 && PBL_ROUND y += 3; #endif diff --git a/src/pkjs/index.js b/src/pkjs/index.js index 7471809..3ed3a8e 100644 --- a/src/pkjs/index.js +++ b/src/pkjs/index.js @@ -14,7 +14,7 @@ Pebble.addEventListener("appmessage", function (dict) { // report to user if some configuration is missing if (!cfg || cfg.CLAY_API_HOST == "" || cfg.CLAY_API_KEY == "" || cfg.CLAY_USER == "") { - Pebble.sendAppMessage({ PKJS_LAST_WATCHED: "SOME APP SETTINGS ARE UNSET AND THIS IS A TEST TO SEE WHAT CAN FIT ON THE SCREEN OF A PR2 IT SEEMS THE TEST IS SOMETHING EVIL MAKE IT LONGER" }); + Pebble.sendAppMessage({ PKJS_LAST_WATCHED: "SOME APP SETTINGS ARE UNSET" }); } if (cfg.CLAY_API_IS_JELLYFIN == true) {