Skip to content

Commit

Permalink
Cleanup + build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Jan 9, 2024
1 parent db89d2e commit db207a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/drivers/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
#include <stdbool.h>
#include <stdint.h>

#include "drivers/time.h"

#include "config/parameter_group.h"

#define SW_BLINK_CYCLE_MS 200 // 200ms on / 200ms off

#define getBlinkOnOff() ((millis() / SW_BLINK_CYCLE_MS) & 1)
#define getBlinkOnOff() ( (millis() / SW_BLINK_CYCLE_MS) & 1 )

typedef struct osdCharacter_s osdCharacter_t;

Expand Down
2 changes: 1 addition & 1 deletion src/main/io/displayport_msp_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int writeString(displayPort_t *displayPort, uint8_t col, uint8_t row, con
static int drawScreen(displayPort_t *displayPort) // 250Hz
{
static uint8_t counter = 0;
static bool lastBlinkStatus = getBlinkOnOff();
static bool lastBlinkStatus = false;
bool blinkStatus = getBlinkOnOff();

if ((!cmsInMenu && IS_RC_MODE_ACTIVE(BOXOSD)) || (counter++ % DRAW_FREQ_DENOM)) { // 62.5Hz
Expand Down

0 comments on commit db207a1

Please sign in to comment.