dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Pixel OSD

Fonts for OSD. More...

Files

file  onscreendisplay.h
 OSD gen module, handles OSD draw. Parts from CL-OSD and SUPEROSD projects.
 
file  osd_menu.h
 OSD Menu.
 
file  osd_utils.h
 OSD Utility Functions.
 
file  onscreendisplay.c
 Process OSD information.
 
file  osd_menu.c
 OSD Menu.
 
file  osd_utils.c
 OSD Utility Functions.
 

Data Structures

struct  FontEntry
 
struct  FontDimensions
 
struct  point_t
 

Macros

#define NUM_FONTS   4
 
#define FONT8X10   0
 
#define FONT_OUTLINED8X14   1
 
#define FONT12X18   2
 
#define FONT_OUTLINED8X8   3
 
#define SIZEOF_ARRAY(x)   (sizeof(x) / sizeof((x)[0]))
 
#define HUD_VSCALE_FLAG_CLEAR   1
 
#define HUD_VSCALE_FLAG_NO_NEGATIVE   2
 
#define PIXELS_PER_BIT   (8 / PIOS_VIDEO_BITS_PER_PIXEL)
 
#define CALC_BIT_IN_WORD(x)   (2 * ((x) & 3))
 
#define CALC_BITSHIFT_WORD(x)   (2 * ((x) & 3))
 
#define CALC_BIT_MASK(x)   (3 << (6 - CALC_BITSHIFT_WORD(x)))
 
#define PACK_BITS(mask, level)   (level << 7 | mask << 6 | level << 5 | mask << 4 | level << 3 | mask << 2 | level << 1 | mask)
 
#define CALC_BIT0_IN_WORD(x)   (2 * ((x) & 3))
 
#define CALC_BIT1_IN_WORD(x)   (2 * ((x) & 3) + 1)
 
#define COMPUTE_HLINE_EDGE_L_MASK(b)   ((1 << (7 - (b))) - 1)
 
#define COMPUTE_HLINE_EDGE_R_MASK(b)   (~((1 << (6 - (b))) - 1))
 
#define CALC_BUFF_ADDR(x, y)   (((x) / PIXELS_PER_BIT) + ((y) * BUFFER_WIDTH))
 
#define DEBUG_DELAY
 
#define WRITE_WORD_MODE(buff, addr, mask, mode)
 
#define WRITE_WORD_NAND(buff, addr, mask)   { buff[addr] &= ~mask; DEBUG_DELAY; }
 
#define WRITE_WORD_OR(buff, addr, mask)   { buff[addr] |= mask; DEBUG_DELAY; }
 
#define WRITE_WORD_XOR(buff, addr, mask)   { buff[addr] ^= mask; DEBUG_DELAY; }
 
#define WRITE_WORD(buff, addr, mask, value)   { buff[addr] = (buff[addr] & ~mask) | (value & mask);}
 
#define COMPUTE_HLINE_ISLAND_MASK(b0, b1)   (COMPUTE_HLINE_EDGE_L_MASK(b0) ^ COMPUTE_HLINE_EDGE_L_MASK(b1));
 
#define SETUP_STROKE_FILL(stroke, fill, mode)
 
#define ENDCAP_NONE   0
 
#define ENDCAP_ROUND   1
 
#define ENDCAP_FLAT   2
 
#define DRAW_ENDCAP_HLINE(e, x, y, s, f, l)
 
#define DRAW_ENDCAP_VLINE(e, x, y, s, f, l)
 
#define CIRCLE_PLOT_8(buff, cx, cy, x, y, mode)
 
#define CIRCLE_PLOT_4(buff, cx, cy, x, y, mode)
 
#define FONT_BOLD   1
 
#define FONT_INVERT   2
 
#define TEXT_VA_TOP   0
 
#define TEXT_VA_MIDDLE   1
 
#define TEXT_VA_BOTTOM   2
 
#define TEXT_HA_LEFT   0
 
#define TEXT_HA_CENTER   1
 
#define TEXT_HA_RIGHT   2
 
#define MAX3(a, b, c)   MAX(a, MAX(b, c))
 
#define MIN3(a, b, c)   MIN(a, MIN(b, c))
 
#define LIMIT(x, l, h)   MAX(l, MIN(x, h))
 
#define CHECK_COORDS(x, y)   if (x < GRAPHICS_LEFT || x > GRAPHICS_RIGHT || y < GRAPHICS_TOP || y > GRAPHICS_BOTTOM) { return; }
 
#define CHECK_COORD_X(x)   if (x < GRAPHICS_LEFT || x > GRAPHICS_RIGHT) { return; }
 
#define CHECK_COORD_Y(y)   if (y < GRAPHICS_TOP || y > GRAPHICS_BOTTOM) { return; }
 
#define CLIP_COORDS(x, y)   { CLIP_COORD_X(x); CLIP_COORD_Y(y); }
 
#define CLIP_COORD_X(x)   { x = x < GRAPHICS_LEFT ? GRAPHICS_LEFT : x > GRAPHICS_RIGHT ? GRAPHICS_RIGHT : x; }
 
#define CLIP_COORD_Y(y)   { y = y < GRAPHICS_TOP ? GRAPHICS_TOP : y > GRAPHICS_BOTTOM ? GRAPHICS_BOTTOM : y; }
 
#define SWAP(a, b)   { a ^= b; b ^= a; a ^= b; }
 
#define ASSERT_CONCAT_(a, b)   a ## b
 
#define ASSERT_CONCAT(a, b)   ASSERT_CONCAT_(a, b)
 
#define STATIC_ASSERT(e, m)   { enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) }; }
 
#define STACK_SIZE_BYTES   2048
 
#define TASK_PRIORITY   PIOS_THREAD_PRIO_LOW
 
#define BLINK_INTERVAL_FRAMES   12
 
#define BOOT_DISPLAY_TIME_MS   (10*1000)
 
#define STATS_DELAY_MS   1500
 
#define MS_TO_KMH   3.6f
 
#define MS_TO_MPH   2.23694f
 
#define M_TO_FEET   3.28084f
 
#define VERTICAL_SCALE_FILLED_NUMBER
 
#define VSCALE_FONT   FONT8X10
 
#define COMPASS_SMALL_NUMBER
 
#define CENTER_BODY   3
 
#define CENTER_WING   7
 
#define CENTER_RUDDER   5
 
#define PITCH_STEP   10
 
#define STATS_LINE_SPACING   11
 
#define STATS_LINE_Y   40
 
#define STATS_LINE_X   (GRAPHICS_LEFT + 10)
 
#define STATS_FONT   FONT8X10
 
#define BLANK_TIME   2000
 
#define INTRO_TIME   5500
 

Functions

int32_t OnScreenDisplayInitialize (void)
 
int render_stats ()
 
void render_osd_menu ()
 
void clearGraphics ()
 
void draw_image (uint16_t x, uint16_t y, const struct Image *image)
 
void plotFourQuadrants (int32_t centerX, int32_t centerY, int32_t deltaX, int32_t deltaY)
 
void ellipse (int centerX, int centerY, int horizontalRadius, int verticalRadius)
 
void drawArrow (uint16_t x, uint16_t y, uint16_t angle, uint16_t size_quarter)
 
void drawBox (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
 
void write_pixel_lm (int x, int y, int mmode, int lmode)
 
void write_hline_lm (int x0, int x1, int y, int lmode, int mmode)
 
void write_hline_outlined (int x0, int x1, int y, int endcap0, int endcap1, int mode, int mmode)
 
void write_vline_lm (int x, int y0, int y1, int lmode, int mmode)
 
void write_vline_outlined (int x, int y0, int y1, int endcap0, int endcap1, int mode, int mmode)
 
void write_filled_rectangle_lm (int x, int y, int width, int height, int lmode, int mmode)
 
void write_rectangle_outlined (int x, int y, int width, int height, int mode, int mmode)
 
void write_circle_outlined (int cx, int cy, int r, int dashp, int bmode, int mode, int mmode)
 
void write_line_lm (int x0, int y0, int x1, int y1, int mmode, int lmode)
 
void write_line_outlined (int x0, int y0, int x1, int y1, __attribute__((unused)) int endcap0, __attribute__((unused)) int endcap1, int mode, int mmode)
 
void write_line_outlined_dashed (int x0, int y0, int x1, int y1, __attribute__((unused)) int endcap0, __attribute__((unused)) int endcap1, int mode, int mmode, int dots)
 
const struct FontEntryget_font_info (int font)
 
void calc_text_dimensions (char *str, const struct FontEntry *font, int xs, int ys, struct FontDimensions *dim)
 
void write_string (char *str, int x, int y, int xs, int ys, int va, int ha, int flags, int font)
 
void draw_polygon (int16_t x, int16_t y, float angle, const point_t *points, uint8_t n_points, int mode, int mmode)
 
void lla_to_ned (int32_t lat, int32_t lon, float alt, float *NED)
 
uint8_t PIOS_Board_Revision (void)
 
static void onScreenDisplayTask (void *parameters)
 
void drawBattery (uint16_t x, uint16_t y, uint8_t battery, uint16_t size)
 
void hud_draw_vertical_scale (int v, int range, int halign, int x, int y, int height, int mintick_step, int majtick_step, int mintick_len, int majtick_len, int boundtick_len, __attribute__((unused)) int max_val, int flags)
 
void hud_draw_linear_compass (int v, int home_dir, int range, int width, int x, int y, int mintick_step, int majtick_step, int mintick_len, int majtick_len, __attribute__((unused)) int flags)
 
void simple_artificial_horizon (float roll, float pitch, int16_t x, int16_t y, int16_t width, int16_t height, int8_t max_pitch, uint8_t n_pitch_steps, bool show_horizon, OnScreenDisplayPageSettingsCenterMarkOptions center_mark)
 
void draw_flight_mode (int x, int y, int xs, int ys, int va, int ha, int flags, int font)
 
void draw_alarms (int x, int y, int xs, int ys, int va, int ha, int flags, int font)
 
void draw_map_home_center (int width_px, int height_px, int width_m, int height_m, bool show_wp, bool show_home, bool show_tablet)
 
void draw_map_uav_center (int width_px, int height_px, int width_m, int height_m, bool show_wp, bool show_uav, bool show_tablet)
 
void introGraphics (int16_t x, int16_t y)
 
void introText (int16_t x, int16_t y)
 
void printFWVersion (int16_t x, int16_t y)
 
void showVideoType (int16_t x, int16_t y)
 
void render_user_page (OnScreenDisplayPageSettingsData *page)
 
void set_ntsc_pal_settings (enum pios_video_system video_system)
 
int32_t OnScreenDisplayStart (void)
 
 MODULE_INITCALL (OnScreenDisplayInitialize, OnScreenDisplayStart)
 
static float get_accessorydesired (int idx)
 
static void onScreenDisplayTask (__attribute__((unused)) void *parameters)
 
void write_pixel (int x, int y, uint8_t value)
 
void write_hline (int x0, int x1, int y, uint8_t value)
 
void write_vline (int x, int y0, int y1, uint8_t value)
 
void write_filled_rectangle (int x, int y, int width, int height, uint8_t value)
 
void write_line (int x0, int y0, int x1, int y1, uint8_t value)
 
void write_word_misaligned_NAND (uint8_t *buff, uint16_t word, unsigned int addr, unsigned int xoff)
 
void write_word_misaligned_OR (uint8_t *buff, uint16_t word, unsigned int addr, unsigned int xoff)
 
void write_word_misaligned_MASKED (uint8_t *buff, uint16_t word, uint16_t mask, unsigned int addr, unsigned int xoff)
 
void write_char (uint8_t ch, int x, int y, const struct FontEntry *font_info)
 

Variables

const uint16_t data_font8x10 []
 
const uint16_t data_font_outlined8x14 []
 
const uint32_t data_font12x18 []
 
const uint16_t data_font_outlined8x8 []
 
const uint8_t lookup_font8x10 []
 
const uint8_t lookup_font_outlined8x14 []
 
const uint8_t lookup_font12x18 []
 
const uint8_t lookup_font_outlined8x8 []
 
static const struct FontEntry font_font8x10
 
static const struct FontEntry font_font_outlined8x14
 
static const struct FontEntry font_font12x18
 
static const struct FontEntry font_font_outlined8x8
 
const struct FontEntryfonts [NUM_FONTS] = {&font_font8x10, &font_font_outlined8x14, &font_font12x18, &font_font_outlined8x8}
 
uint8_t * draw_buffer_level
 
uint8_t * draw_buffer_mask
 
const char METRIC_DIST_UNIT_LONG [] = "km"
 
const char METRIC_DIST_UNIT_SHORT [] = "m"
 
const char METRIC_SPEED_UNIT [] = "km/h"
 
const char IMPERIAL_DIST_UNIT_LONG [] = "M"
 
const char IMPERIAL_DIST_UNIT_SHORT [] = "ft"
 
const char IMPERIAL_SPEED_UNIT [] = "MPH"
 
volatile bool video_active
 
const point_t HOME_ARROW []
 
uint16_t frame_counter = 0
 
static bool module_enabled = false
 
static bool has_battery = false
 
static bool has_gps = false
 
static bool has_nav = false
 
static bool has_baro = false
 
static bool has_mag = false
 
static struct pios_thread * taskHandle
 
struct pios_semaphoreonScreenDisplaySemaphore = NULL
 
float convert_speed
 
float convert_distance
 
float convert_distance_divider
 
const char * dist_unit_long = METRIC_DIST_UNIT_LONG
 
const char * dist_unit_short = METRIC_DIST_UNIT_SHORT
 
const char * speed_unit = METRIC_SPEED_UNIT
 
const char digits [16] = "0123456789abcdef"
 
float home_baro_altitude = 0
 
static volatile bool osd_settings_updated = true
 
static volatile bool osd_page_updated = true
 
static OnScreenDisplaySettingsData osd_settings
 
static bool blink
 
struct FontEntryfonts [NUM_FONTS]
 
uint8_t * draw_buffer
 
uint8_t * disp_buffer
 

Detailed Description

Fonts for OSD.

OSD Utility Functions.

OSD Menu.

Process OSD information.

Macro Definition Documentation

#define ASSERT_CONCAT (   a,
 
)    ASSERT_CONCAT_(a, b)

Definition at line 42 of file onscreendisplay.c.

#define ASSERT_CONCAT_ (   a,
 
)    a ## b

Definition at line 41 of file onscreendisplay.c.

#define BLANK_TIME   2000

Main osd task. It does not return.

Definition at line 1730 of file onscreendisplay.c.

#define BLINK_INTERVAL_FRAMES   12

Definition at line 125 of file onscreendisplay.c.

#define BOOT_DISPLAY_TIME_MS   (10*1000)

Definition at line 126 of file onscreendisplay.c.

#define CALC_BIT0_IN_WORD (   x)    (2 * ((x) & 3))

Definition at line 63 of file osd_utils.h.

#define CALC_BIT1_IN_WORD (   x)    (2 * ((x) & 3) + 1)

Definition at line 64 of file osd_utils.h.

#define CALC_BIT_IN_WORD (   x)    (2 * ((x) & 3))

Definition at line 59 of file osd_utils.h.

#define CALC_BIT_MASK (   x)    (3 << (6 - CALC_BITSHIFT_WORD(x)))

Definition at line 61 of file osd_utils.h.

#define CALC_BITSHIFT_WORD (   x)    (2 * ((x) & 3))

Definition at line 60 of file osd_utils.h.

#define CALC_BUFF_ADDR (   x,
 
)    (((x) / PIXELS_PER_BIT) + ((y) * BUFFER_WIDTH))

Definition at line 72 of file osd_utils.h.

#define CENTER_BODY   3

Definition at line 517 of file onscreendisplay.c.

#define CENTER_RUDDER   5

Definition at line 519 of file onscreendisplay.c.

#define CENTER_WING   7

Definition at line 518 of file onscreendisplay.c.

#define CHECK_COORD_X (   x)    if (x < GRAPHICS_LEFT || x > GRAPHICS_RIGHT) { return; }

Definition at line 144 of file osd_utils.h.

#define CHECK_COORD_Y (   y)    if (y < GRAPHICS_TOP || y > GRAPHICS_BOTTOM) { return; }

Definition at line 145 of file osd_utils.h.

#define CHECK_COORDS (   x,
 
)    if (x < GRAPHICS_LEFT || x > GRAPHICS_RIGHT || y < GRAPHICS_TOP || y > GRAPHICS_BOTTOM) { return; }

Definition at line 143 of file osd_utils.h.

#define CIRCLE_PLOT_4 (   buff,
  cx,
  cy,
  x,
  y,
  mode 
)
Value:
write_pixel(buff, (cx) + (x), (cy) + (y), mode); \
write_pixel(buff, (cx) - (x), (cy) + (y), mode); \
write_pixel(buff, (cx) + (x), (cy) - (y), mode); \
write_pixel(buff, (cx) - (x), (cy) - (y), mode);
enum channel_mode mode
Definition: pios_servo.c:58
void write_pixel(int x, int y, uint8_t value)
Definition: osd_utils.c:241

Definition at line 120 of file osd_utils.h.

#define CIRCLE_PLOT_8 (   buff,
  cx,
  cy,
  x,
  y,
  mode 
)
Value:
CIRCLE_PLOT_4(buff, cx, cy, x, y, mode); \
if ((x) != (y)) { CIRCLE_PLOT_4(buff, cx, cy, y, x, mode); }
#define CIRCLE_PLOT_4(buff, cx, cy, x, y, mode)
Definition: osd_utils.h:120
enum channel_mode mode
Definition: pios_servo.c:58
if(BaroAltitudeHandle()!=NULL)

Definition at line 116 of file osd_utils.h.

#define CLIP_COORD_X (   x)    { x = x < GRAPHICS_LEFT ? GRAPHICS_LEFT : x > GRAPHICS_RIGHT ? GRAPHICS_RIGHT : x; }

Definition at line 149 of file osd_utils.h.

#define CLIP_COORD_Y (   y)    { y = y < GRAPHICS_TOP ? GRAPHICS_TOP : y > GRAPHICS_BOTTOM ? GRAPHICS_BOTTOM : y; }

Definition at line 150 of file osd_utils.h.

#define CLIP_COORDS (   x,
 
)    { CLIP_COORD_X(x); CLIP_COORD_Y(y); }

Definition at line 148 of file osd_utils.h.

#define COMPASS_SMALL_NUMBER

hud_draw_compass: Draw a compass.

Parameters
vvalue for the compass
rangerange about value to display (+/- range/2 each direction)
widthlength in pixels
xx displacement
yy displacement
mintick_stephow often a minor tick is shown
majtick_stephow often a major tick (heading "xx") is shown
mintick_lenminor tick length
majtick_lenmajor tick length
flagsspecial flags (see hud.h.)

Definition at line 399 of file onscreendisplay.c.

#define COMPUTE_HLINE_EDGE_L_MASK (   b)    ((1 << (7 - (b))) - 1)

Definition at line 67 of file osd_utils.h.

#define COMPUTE_HLINE_EDGE_R_MASK (   b)    (~((1 << (6 - (b))) - 1))

Definition at line 68 of file osd_utils.h.

#define COMPUTE_HLINE_ISLAND_MASK (   b0,
  b1 
)    (COMPUTE_HLINE_EDGE_L_MASK(b0) ^ COMPUTE_HLINE_EDGE_L_MASK(b1));

Definition at line 89 of file osd_utils.h.

#define DEBUG_DELAY

Definition at line 73 of file osd_utils.h.

#define DRAW_ENDCAP_HLINE (   e,
  x,
  y,
  s,
  f,
 
)
Value:
if ((e) == ENDCAP_ROUND) /* single pixel endcap */ \
{ write_pixel_lm(x, y, f, l); } \
else if ((e) == ENDCAP_FLAT) /* flat endcap: FIXME, quicker to draw a vertical line(?) */ \
{ write_pixel_lm(x, y - 1, s, l); write_pixel_lm(x, y, s, l); write_pixel_lm(x, y + 1, s, l); }
#define ENDCAP_ROUND
Definition: osd_utils.h:100
tuple f
Definition: px_mkfw.py:81
#define ENDCAP_FLAT
Definition: osd_utils.h:101
void write_pixel_lm(int x, int y, int mmode, int lmode)
Definition: osd_utils.c:261

Definition at line 103 of file osd_utils.h.

#define DRAW_ENDCAP_VLINE (   e,
  x,
  y,
  s,
  f,
 
)
Value:
if ((e) == ENDCAP_ROUND) /* single pixel endcap */ \
{ write_pixel_lm(x, y, f, l); } \
else if ((e) == ENDCAP_FLAT) /* flat endcap: FIXME, quicker to draw a horizontal line(?) */ \
{ write_pixel_lm(x - 1, y, s, l); write_pixel_lm(x, y, s, l); write_pixel_lm(x + 1, y, s, l); }
#define ENDCAP_ROUND
Definition: osd_utils.h:100
tuple f
Definition: px_mkfw.py:81
#define ENDCAP_FLAT
Definition: osd_utils.h:101
void write_pixel_lm(int x, int y, int mmode, int lmode)
Definition: osd_utils.c:261

Definition at line 109 of file osd_utils.h.

#define ENDCAP_FLAT   2

Definition at line 101 of file osd_utils.h.

#define ENDCAP_NONE   0

Definition at line 99 of file osd_utils.h.

#define ENDCAP_ROUND   1

Definition at line 100 of file osd_utils.h.

#define FONT12X18   2

Definition at line 54 of file fonts.h.

#define FONT8X10   0

Definition at line 52 of file fonts.h.

#define FONT_BOLD   1

Definition at line 127 of file osd_utils.h.

#define FONT_INVERT   2

Definition at line 128 of file osd_utils.h.

#define FONT_OUTLINED8X14   1

Definition at line 53 of file fonts.h.

#define FONT_OUTLINED8X8   3

Definition at line 55 of file fonts.h.

#define HUD_VSCALE_FLAG_CLEAR   1

Definition at line 43 of file osd_utils.h.

#define HUD_VSCALE_FLAG_NO_NEGATIVE   2

Definition at line 44 of file osd_utils.h.

#define INTRO_TIME   5500

Definition at line 1731 of file onscreendisplay.c.

#define LIMIT (   x,
  l,
 
)    MAX(l, MIN(x, h))

Definition at line 140 of file osd_utils.h.

#define M_TO_FEET   3.28084f

Definition at line 173 of file onscreendisplay.c.

#define MAX3 (   a,
  b,
 
)    MAX(a, MAX(b, c))

Definition at line 138 of file osd_utils.h.

#define MIN3 (   a,
  b,
 
)    MIN(a, MIN(b, c))

Definition at line 139 of file osd_utils.h.

#define MS_TO_KMH   3.6f

Definition at line 171 of file onscreendisplay.c.

#define MS_TO_MPH   2.23694f

Definition at line 172 of file onscreendisplay.c.

#define NUM_FONTS   4

Definition at line 50 of file fonts.h.

#define PACK_BITS (   mask,
  level 
)    (level << 7 | mask << 6 | level << 5 | mask << 4 | level << 3 | mask << 2 | level << 1 | mask)

Definition at line 62 of file osd_utils.h.

#define PITCH_STEP   10

Definition at line 520 of file onscreendisplay.c.

#define PIXELS_PER_BIT   (8 / PIOS_VIDEO_BITS_PER_PIXEL)

Definition at line 58 of file osd_utils.h.

#define SETUP_STROKE_FILL (   stroke,
  fill,
  mode 
)
Value:
stroke = 0; fill = 0; \
if (mode == 0) { stroke = 0; fill = 1; } \
if (mode == 1) { stroke = 1; fill = 0; } \
enum channel_mode mode
Definition: pios_servo.c:58
if(BaroAltitudeHandle()!=NULL)

Definition at line 93 of file osd_utils.h.

#define SIZEOF_ARRAY (   x)    (sizeof(x) / sizeof((x)[0]))

Definition at line 41 of file osd_utils.h.

#define STACK_SIZE_BYTES   2048

Definition at line 123 of file onscreendisplay.c.

#define STATIC_ASSERT (   e,
 
)    { enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) }; }

Definition at line 52 of file onscreendisplay.c.

#define STATS_DELAY_MS   1500

Definition at line 127 of file onscreendisplay.c.

#define STATS_FONT   FONT8X10

Definition at line 1540 of file onscreendisplay.c.

#define STATS_LINE_SPACING   11

Definition at line 1537 of file onscreendisplay.c.

#define STATS_LINE_X   (GRAPHICS_LEFT + 10)

Definition at line 1539 of file onscreendisplay.c.

#define STATS_LINE_Y   40

Definition at line 1538 of file onscreendisplay.c.

#define SWAP (   a,
 
)    { a ^= b; b ^= a; a ^= b; }

Definition at line 153 of file osd_utils.h.

#define TASK_PRIORITY   PIOS_THREAD_PRIO_LOW

Definition at line 124 of file onscreendisplay.c.

#define TEXT_HA_CENTER   1

Definition at line 134 of file osd_utils.h.

#define TEXT_HA_LEFT   0

Definition at line 133 of file osd_utils.h.

#define TEXT_HA_RIGHT   2

Definition at line 135 of file osd_utils.h.

#define TEXT_VA_BOTTOM   2

Definition at line 132 of file osd_utils.h.

#define TEXT_VA_MIDDLE   1

Definition at line 131 of file osd_utils.h.

#define TEXT_VA_TOP   0

Definition at line 130 of file osd_utils.h.

#define VERTICAL_SCALE_FILLED_NUMBER

hud_draw_vertical_scale: Draw a vertical scale.

Parameters
vvalue to display as an integer
rangerange about value to display (+/- range/2 each direction)
halignhorizontal alignment: -1 = left, +1 = right.
xx displacement
yy displacement
heightheight of scale
mintick_stephow often a minor tick is shown
majtick_stephow often a major tick is shown
mintick_lenminor tick length
majtick_lenmajor tick length
boundtick_lenboundary tick length
max_valmaximum expected value (used to compute size of arrow ticker)
flagsspecial flags (see hud.h.)

Definition at line 235 of file onscreendisplay.c.

#define VSCALE_FONT   FONT8X10

Definition at line 236 of file onscreendisplay.c.

#define WRITE_WORD (   buff,
  addr,
  mask,
  value 
)    { buff[addr] = (buff[addr] & ~mask) | (value & mask);}

Definition at line 85 of file osd_utils.h.

#define WRITE_WORD_MODE (   buff,
  addr,
  mask,
  mode 
)
Value:
switch (mode) { \
case 0: buff[addr] &= ~mask; break; \
case 1: buff[addr] |= mask; break; \
case 2: buff[addr] ^= mask; break; }
enum channel_mode mode
Definition: pios_servo.c:58

Definition at line 76 of file osd_utils.h.

#define WRITE_WORD_NAND (   buff,
  addr,
  mask 
)    { buff[addr] &= ~mask; DEBUG_DELAY; }

Definition at line 82 of file osd_utils.h.

#define WRITE_WORD_OR (   buff,
  addr,
  mask 
)    { buff[addr] |= mask; DEBUG_DELAY; }

Definition at line 83 of file osd_utils.h.

#define WRITE_WORD_XOR (   buff,
  addr,
  mask 
)    { buff[addr] ^= mask; DEBUG_DELAY; }

Definition at line 84 of file osd_utils.h.

Function Documentation

void calc_text_dimensions ( char *  str,
const struct FontEntry font,
int  xs,
int  ys,
struct FontDimensions dim 
)

calc_text_dimensions: Calculate the dimensions of a string in a given font. Supports new lines and carriage returns in text.

Parameters
strstring to calculate dimensions of
font_infofont info structure
xshorizontal spacing
ysvertical spacing
dimreturn result: struct FontDimensions

Definition at line 1308 of file osd_utils.c.

void clearGraphics ( )

Definition at line 60 of file osd_utils.c.

void draw_alarms ( int  x,
int  y,
int  xs,
int  ys,
int  va,
int  ha,
int  flags,
int  font 
)

Definition at line 733 of file onscreendisplay.c.

void draw_flight_mode ( int  x,
int  y,
int  xs,
int  ys,
int  va,
int  ha,
int  flags,
int  font 
)

Definition at line 635 of file onscreendisplay.c.

void draw_image ( uint16_t  x,
uint16_t  y,
const struct Image image 
)

Definition at line 70 of file osd_utils.c.

void draw_map_home_center ( int  width_px,
int  height_px,
int  width_m,
int  height_m,
bool  show_wp,
bool  show_home,
bool  show_tablet 
)

Definition at line 769 of file onscreendisplay.c.

void draw_map_uav_center ( int  width_px,
int  height_px,
int  width_m,
int  height_m,
bool  show_wp,
bool  show_uav,
bool  show_tablet 
)

Definition at line 879 of file onscreendisplay.c.

void draw_polygon ( int16_t  x,
int16_t  y,
float  angle,
const point_t points,
uint8_t  n_points,
int  mode,
int  mmode 
)

Draw a polygon

Definition at line 1396 of file osd_utils.c.

void drawArrow ( uint16_t  x,
uint16_t  y,
uint16_t  angle,
uint16_t  size_quarter 
)

Definition at line 199 of file osd_utils.c.

void drawBattery ( uint16_t  x,
uint16_t  y,
uint8_t  battery,
uint16_t  size 
)

Definition at line 209 of file onscreendisplay.c.

void drawBox ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2 
)

Definition at line 214 of file osd_utils.c.

void ellipse ( int  centerX,
int  centerY,
int  horizontalRadius,
int  verticalRadius 
)

Implements the midpoint ellipse drawing algorithm which is a bresenham style DDF.

Parameters
centerXthe x coordinate of the center of the ellipse
centerYthe y coordinate of the center of the ellipse
horizontalRadiusthe horizontal radius of the ellipse
verticalRadiusthe vertical radius of the ellipse
colorthe color of the ellipse border

Definition at line 152 of file osd_utils.c.

static float get_accessorydesired ( int  idx)
static

Definition at line 1711 of file onscreendisplay.c.

const struct FontEntry * get_font_info ( int  font)

fetch_font_info: Fetch font info structs.

Parameters
fontfont id

Definition at line 1290 of file osd_utils.c.

void hud_draw_linear_compass ( int  v,
int  home_dir,
int  range,
int  width,
int  x,
int  y,
int  mintick_step,
int  majtick_step,
int  mintick_len,
int  majtick_len,
__attribute__((unused)) int  flags 
)

Definition at line 401 of file onscreendisplay.c.

void hud_draw_vertical_scale ( int  v,
int  range,
int  halign,
int  x,
int  y,
int  height,
int  mintick_step,
int  majtick_step,
int  mintick_len,
int  majtick_len,
int  boundtick_len,
__attribute__((unused)) int  max_val,
int  flags 
)

Definition at line 237 of file onscreendisplay.c.

void introGraphics ( int16_t  x,
int16_t  y 
)

Definition at line 1028 of file onscreendisplay.c.

void introText ( int16_t  x,
int16_t  y 
)

Definition at line 1040 of file onscreendisplay.c.

void lla_to_ned ( int32_t  lattitude,
int32_t  longitude,
float  altitude,
float *  NED 
)

Convert LLA to NED coordinates

Parameters
latitude
longitude
altitude
output

Definition at line 1447 of file osd_utils.c.

MODULE_INITCALL ( OnScreenDisplayInitialize  ,
OnScreenDisplayStart   
)
int32_t OnScreenDisplayInitialize ( void  )

Initialize the osd module

Definition at line 1656 of file onscreendisplay.c.

int32_t OnScreenDisplayStart ( void  )

Start the osd module

Definition at line 1633 of file onscreendisplay.c.

static void onScreenDisplayTask ( void *  parameters)
static
static void onScreenDisplayTask ( __attribute__((unused)) void *  parameters)
static

Definition at line 1732 of file onscreendisplay.c.

uint8_t PIOS_Board_Revision ( void  )
void plotFourQuadrants ( int32_t  centerX,
int32_t  centerY,
int32_t  deltaX,
int32_t  deltaY 
)

Draws four points relative to the given center point.

  • centerX + X, centerY + Y
  • centerX + X, centerY - Y
  • centerX - X, centerY + Y
  • centerX - X, centerY - Y
Parameters
centerXthe x coordinate of the center point
centerYthe y coordinate of the center point
deltaXthe difference between the centerX coordinate and each pixel drawn
deltaYthe difference between the centerY coordinate and each pixel drawn
colorthe color to draw the pixels with.

Definition at line 136 of file osd_utils.c.

void printFWVersion ( int16_t  x,
int16_t  y 
)

Definition at line 1045 of file onscreendisplay.c.

void render_osd_menu ( )
int render_stats ( )

Definition at line 1542 of file onscreendisplay.c.

void render_user_page ( OnScreenDisplayPageSettingsData *  page)

Definition at line 1087 of file onscreendisplay.c.

void set_ntsc_pal_settings ( enum pios_video_system  video_system)

Definition at line 1618 of file onscreendisplay.c.

void showVideoType ( int16_t  x,
int16_t  y 
)

Definition at line 1078 of file onscreendisplay.c.

void simple_artificial_horizon ( float  roll,
float  pitch,
int16_t  x,
int16_t  y,
int16_t  width,
int16_t  height,
int8_t  max_pitch,
uint8_t  n_pitch_steps,
bool  show_horizon,
OnScreenDisplayPageSettingsCenterMarkOptions  center_mark 
)

Definition at line 521 of file onscreendisplay.c.

void write_char ( uint8_t  ch,
int  x,
int  y,
const struct FontEntry font_info 
)

write_char: Draw a character on the current draw buffer.

Parameters
chcharacter to write
xx coordinate (left)
yy coordinate (top)
font_infofont to use

Definition at line 1206 of file osd_utils.c.

void write_circle_outlined ( int  cx,
int  cy,
int  r,
int  dashp,
int  bmode,
int  mode,
int  mmode 
)
void write_filled_rectangle ( int  x,
int  y,
int  width,
int  height,
uint8_t  value 
)

write_filled_rectangle: draw a filled rectangle.

Uses an optimised algorithm which is similar to the horizontal line writing algorithm, but optimised for writing the lines multiple times without recalculating lots of stuff.

Parameters
buffpointer to buffer to write in
xx coordinate (left)
yy coordinate (top)
widthrectangle width
heightrectangle height
mode0 = clear, 1 = set, 2 = toggle

Definition at line 594 of file osd_utils.c.

void write_filled_rectangle_lm ( int  x,
int  y,
int  width,
int  height,
int  lmode,
int  mmode 
)

write_filled_rectangle_lm: draw a filled rectangle on both draw buffers.

Parameters
xx coordinate (left)
yy coordinate (top)
widthrectangle width
heightrectangle height
lmode0 = clear, 1 = set, 2 = toggle
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 659 of file osd_utils.c.

void write_hline ( int  x0,
int  x1,
int  y,
uint8_t  value 
)

write_hline: optimised horizontal line writing algorithm

Parameters
buffpointer to buffer to write in
x0x0 coordinate
x1x1 coordinate
yy coordinate
mode0 = clear, 1 = set, 2 = toggle

Definition at line 324 of file osd_utils.c.

void write_hline_lm ( int  x0,
int  x1,
int  y,
int  lmode,
int  mmode 
)

write_hline_lm: write both level and mask buffers.

Parameters
x0x0 coordinate
x1x1 coordinate
yy coordinate
lmode0 = clear, 1 = set, 2 = toggle
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 372 of file osd_utils.c.

void write_hline_outlined ( int  x0,
int  x1,
int  y,
int  endcap0,
int  endcap1,
int  mode,
int  mmode 
)

write_hline_outlined: outlined horizontal line with varying endcaps Always uses draw buffer.

Parameters
x0x0 coordinate
x1x1 coordinate
yy coordinate
endcap00 = none, 1 = single pixel, 2 = full cap
endcap10 = none, 1 = single pixel, 2 = full cap
mode0 = black outline, white body, 1 = white outline, black body
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 397 of file osd_utils.c.

void write_line ( int  x0,
int  y0,
int  x1,
int  y1,
uint8_t  value 
)

write_line: Draw a line of arbitrary angle.

Parameters
buffpointer to buffer to write in
x0first x coordinate
y0first y coordinate
x1second x coordinate
y1second y coordinate
mode0 = clear, 1 = set, 2 = toggle

Definition at line 873 of file osd_utils.c.

void write_line_lm ( int  x0,
int  y0,
int  x1,
int  y1,
int  mmode,
int  lmode 
)

write_line_lm: Draw a line of arbitrary angle.

Parameters
x0first x coordinate
y0first y coordinate
x1second x coordinate
y1second y coordinate
mmode0 = clear, 1 = set, 2 = toggle
lmode0 = clear, 1 = set, 2 = toggle

Definition at line 922 of file osd_utils.c.

void write_line_outlined ( int  x0,
int  y0,
int  x1,
int  y1,
__attribute__((unused)) int  endcap0,
__attribute__((unused)) int  endcap1,
int  mode,
int  mmode 
)

write_line_outlined: Draw a line of arbitrary angle, with an outline.

Parameters
x0first x coordinate
y0first y coordinate
x1second x coordinate
y1second y coordinate
endcap00 = none, 1 = single pixel, 2 = full cap
endcap10 = none, 1 = single pixel, 2 = full cap
mode0 = black outline, white body, 1 = white outline, black body
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 945 of file osd_utils.c.

void write_line_outlined_dashed ( int  x0,
int  y0,
int  x1,
int  y1,
__attribute__((unused)) int  endcap0,
__attribute__((unused)) int  endcap1,
int  mode,
int  mmode,
int  dots 
)

write_line_outlined_dashed: Draw a line of arbitrary angle, with an outline, potentially dashed.

Parameters
x0first x coordinate
y0first y coordinate
x1second x coordinate
y1second y coordinate
endcap00 = none, 1 = single pixel, 2 = full cap
endcap10 = none, 1 = single pixel, 2 = full cap
mode0 = black outline, white body, 1 = white outline, black body
mmode0 = clear, 1 = set, 2 = toggle
dots0 = not dashed, > 0 = # of set/unset dots for the dashed innards

Definition at line 1029 of file osd_utils.c.

void write_pixel ( int  x,
int  y,
uint8_t  value 
)

Definition at line 241 of file osd_utils.c.

void write_pixel_lm ( int  x,
int  y,
int  mmode,
int  lmode 
)

write_pixel_lm: write the pixel on both surfaces (level and mask.) Uses current draw buffer.

Parameters
xx coordinate
yy coordinate
mmode0 = clear, 1 = set, 2 = toggle
lmode0 = black, 1 = white, 2 = toggle

Definition at line 261 of file osd_utils.c.

void write_rectangle_outlined ( int  x,
int  y,
int  width,
int  height,
int  mode,
int  mmode 
)

write_rectangle_outlined: draw an outline of a rectangle. Essentially a convenience wrapper for draw_hline_outlined and draw_vline_outlined.

Parameters
xx coordinate (left)
yy coordinate (top)
widthrectangle width
heightrectangle height
mode0 = black outline, white body, 1 = white outline, black body
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 681 of file osd_utils.c.

void write_string ( char *  str,
int  x,
int  y,
int  xs,
int  ys,
int  va,
int  ha,
int  flags,
int  font 
)

write_string: Draw a string on the screen with certain alignment parameters.

Parameters
strstring to write
xx coordinate
yy coordinate
xshorizontal spacing
yshorizontal spacing
vavertical align
hahorizontal align
flagsflags (passed to write_char)
fontfont

Definition at line 1344 of file osd_utils.c.

void write_vline ( int  x,
int  y0,
int  y1,
uint8_t  value 
)

write_vline: optimised vertical line writing algorithm

Parameters
buffpointer to buffer to write in
xx coordinate
y0y0 coordinate
y1y1 coordinate
mode0 = clear, 1 = set, 2 = toggle

Definition at line 448 of file osd_utils.c.

void write_vline_lm ( int  x,
int  y0,
int  y1,
int  lmode,
int  mmode 
)

write_vline_lm: write both level and mask buffers.

Parameters
xx coordinate
y0y0 coordinate
y1y1 coordinate
lmode0 = clear, 1 = set, 2 = toggle
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 483 of file osd_utils.c.

void write_vline_outlined ( int  x,
int  y0,
int  y1,
int  endcap0,
int  endcap1,
int  mode,
int  mmode 
)

write_vline_outlined: outlined vertical line with varying endcaps Always uses draw buffer.

Parameters
xx coordinate
y0y0 coordinate
y1y1 coordinate
endcap00 = none, 1 = single pixel, 2 = full cap
endcap10 = none, 1 = single pixel, 2 = full cap
mode0 = black outline, white body, 1 = white outline, black body
mmode0 = clear, 1 = set, 2 = toggle

Definition at line 508 of file osd_utils.c.

void write_word_misaligned_MASKED ( uint8_t *  buff,
uint16_t  word,
uint16_t  mask,
unsigned int  addr,
unsigned int  xoff 
)

write_word_misaligned_OR: Write a misaligned word across two addresses with an x offset, using an OR mask.

This allows for many pixels to be set in one write.

Parameters
buffbuffer to write in
wordword to write (16 bits)
addraddress of first word
xoffx offset (0-15)

This is identical to calling write_word_misaligned with a mode of 1 but it doesn't go through a lot of switch logic which slows down text writing a lot.

Definition at line 1183 of file osd_utils.c.

void write_word_misaligned_NAND ( uint8_t *  buff,
uint16_t  word,
unsigned int  addr,
unsigned int  xoff 
)

write_word_misaligned_NAND: Write a misaligned word across two addresses with an x offset, using a NAND mask.

This allows for many pixels to be set in one write.

Parameters
buffbuffer to write in
wordword to write (16 bits)
addraddress of first word
xoffx offset (0-15)

This is identical to calling write_word_misaligned with a mode of 0 but it doesn't go through a lot of switch logic which slows down text writing a lot.

Definition at line 1129 of file osd_utils.c.

void write_word_misaligned_OR ( uint8_t *  buff,
uint16_t  word,
unsigned int  addr,
unsigned int  xoff 
)

write_word_misaligned_OR: Write a misaligned word across two addresses with an x offset, using an OR mask.

This allows for many pixels to be set in one write.

Parameters
buffbuffer to write in
wordword to write (16 bits)
addraddress of first word
xoffx offset (0-15)

This is identical to calling write_word_misaligned with a mode of 1 but it doesn't go through a lot of switch logic which slows down text writing a lot.

Definition at line 1156 of file osd_utils.c.

Variable Documentation

bool blink
static

Definition at line 198 of file onscreendisplay.c.

float convert_distance

Definition at line 187 of file onscreendisplay.c.

float convert_distance_divider

Definition at line 188 of file onscreendisplay.c.

float convert_speed

Definition at line 186 of file onscreendisplay.c.

const uint32_t data_font12x18[]

Definition at line 1060 of file fonts.c.

const uint16_t data_font8x10[]

Definition at line 797 of file fonts.c.

const uint16_t data_font_outlined8x14[]

Definition at line 893 of file fonts.c.

const uint16_t data_font_outlined8x8[]

Definition at line 1494 of file fonts.c.

const char digits[16] = "0123456789abcdef"

Definition at line 192 of file onscreendisplay.c.

uint8_t* disp_buffer
const char* dist_unit_long = METRIC_DIST_UNIT_LONG

Definition at line 189 of file onscreendisplay.c.

const char* dist_unit_short = METRIC_DIST_UNIT_SHORT

Definition at line 190 of file onscreendisplay.c.

uint8_t* draw_buffer
uint8_t* draw_buffer_level
uint8_t* draw_buffer_mask
const struct FontEntry font_font12x18
static
Initial value:
= {
.width = 12,
.height = 18,
.lookup = lookup_font12x18,
.data = (uint16_t*)data_font12x18
}
const uint8_t lookup_font12x18[]
Definition: fonts.c:1591
const uint32_t data_font12x18[]
Definition: fonts.c:1060

Definition at line 1644 of file fonts.c.

const struct FontEntry font_font8x10
static
Initial value:
= {
.width = 8,
.height = 10,
.lookup = lookup_font8x10,
.data = (uint16_t*)data_font8x10
}
const uint8_t lookup_font8x10[]
Definition: fonts.c:1555
const uint16_t data_font8x10[]
Definition: fonts.c:797

Definition at line 1628 of file fonts.c.

const struct FontEntry font_font_outlined8x14
static
Initial value:
= {
.width = 8,
.height = 14,
.data = (uint16_t*)data_font_outlined8x14
}
const uint16_t data_font_outlined8x14[]
Definition: fonts.c:893
const uint8_t lookup_font_outlined8x14[]
Definition: fonts.c:1573

Definition at line 1636 of file fonts.c.

const struct FontEntry font_font_outlined8x8
static
Initial value:
= {
.width = 8,
.height = 8,
.data = (uint16_t*)data_font_outlined8x8
}
const uint16_t data_font_outlined8x8[]
Definition: fonts.c:1494
const uint8_t lookup_font_outlined8x8[]
Definition: fonts.c:1609

Definition at line 1652 of file fonts.c.

struct FontEntry* fonts[NUM_FONTS]

Definition at line 1660 of file fonts.c.

Definition at line 1660 of file fonts.c.

uint16_t frame_counter = 0

Definition at line 177 of file onscreendisplay.c.

bool has_baro = false
static

Definition at line 182 of file onscreendisplay.c.

bool has_battery = false
static

Definition at line 179 of file onscreendisplay.c.

bool has_gps = false
static

Definition at line 180 of file onscreendisplay.c.

bool has_mag = false
static

Definition at line 183 of file onscreendisplay.c.

bool has_nav = false
static

Definition at line 181 of file onscreendisplay.c.

const point_t HOME_ARROW[]
Initial value:
= {
{
.x = 0,
.y = -10,
},
{
.x = 9,
.y = 1,
},
{
.x = 3,
.y = 1,
},
{
.x = 3,
.y = 8,
},
{
.x = -3,
.y = 8,
},
{
.x = -3,
.y = 1,
},
{
.x = -9,
.y = 1,
}
}

Definition at line 139 of file onscreendisplay.c.

float home_baro_altitude = 0

Definition at line 194 of file onscreendisplay.c.

const char IMPERIAL_DIST_UNIT_LONG[] = "M"

Definition at line 133 of file onscreendisplay.c.

const char IMPERIAL_DIST_UNIT_SHORT[] = "ft"

Definition at line 134 of file onscreendisplay.c.

const char IMPERIAL_SPEED_UNIT[] = "MPH"

Definition at line 135 of file onscreendis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_LONG[] = "km"

Definition at line 129 of file onscreendisplay.c.

const char METRIC_DIST_UNIT_SHORT[] = "m"

Definition at line 130 of file onscreendisplay.c.

const char METRIC_SPEED_UNIT[] = "km/h"

Definition at line 131 of file onscreendisplay.c.

bool module_enabled = false
static

Definition at line 178 of file onscreendisplay.c.

struct pios_semaphore* onScreenDisplaySemaphore = NULL

Definition at line 185 of file onscreendisplay.c.

volatile bool osd_page_updated = true
static

Definition at line 196 of file onscreendisplay.c.

OnScreenDisplaySettingsData osd_settings
static

Definition at line 197 of file onscreendisplay.c.

volatile bool osd_settings_updated = true
static

Definition at line 195 of file onscreendisplay.c.

const char* speed_unit = METRIC_SPEED_UNIT

Definition at line 191 of file onscreendisplay.c.

struct pios_thread* taskHandle
static

Definition at line 184 of file onscreendisplay.c.

volatile bool video_active

Definition at line 137 of file onscreendisplay.c.