From 9d6dfee6ccbee379cfb9209d67b938d995487ae3 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Wed, 23 May 2012 22:38:18 -0500 Subject: [PATCH] Use memset to clear screen. --- flight/Modules/Osd/osdgen/osdgen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flight/Modules/Osd/osdgen/osdgen.c b/flight/Modules/Osd/osdgen/osdgen.c index 26fe6712e..d86216c5a 100644 --- a/flight/Modules/Osd/osdgen/osdgen.c +++ b/flight/Modules/Osd/osdgen/osdgen.c @@ -190,10 +190,8 @@ uint16_t mirror(uint16_t source) } void clearGraphics() { - for (uint16_t x = 0; x < GRAPHICS_WIDTH*GRAPHICS_HEIGHT; ++x) { - draw_buffer_level[x] = 0x0000; - draw_buffer_mask[x] = 0x0000; - } + memset((uint8_t *) draw_buffer_mask, 0, GRAPHICS_WIDTH * GRAPHICS_HEIGHT * 2); + memset((uint8_t *) draw_buffer_level, 0, GRAPHICS_WIDTH * GRAPHICS_HEIGHT * 2); } void copyimage(uint16_t offsetx, uint16_t offsety, int image) {