diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-03-27 16:59:15 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-03-27 16:59:15 +0000 |
commit | f5211035ab6969ca1d743256f61aedf8316d7439 (patch) | |
tree | ce0fbf634a4a79157ec8554a02933bf935f5ce72 /nuttx/graphics/nxconsole/nxcon_font.c | |
parent | 218b2f16722eb3f07020104e4580574b1b8578ce (diff) | |
download | px4-firmware-f5211035ab6969ca1d743256f61aedf8316d7439.tar.gz px4-firmware-f5211035ab6969ca1d743256f61aedf8316d7439.tar.bz2 px4-firmware-f5211035ab6969ca1d743256f61aedf8316d7439.zip |
Add a test for the NX console device
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4528 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/graphics/nxconsole/nxcon_font.c')
-rw-r--r-- | nuttx/graphics/nxconsole/nxcon_font.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/nuttx/graphics/nxconsole/nxcon_font.c b/nuttx/graphics/nxconsole/nxcon_font.c index 2152d8cbc..c3280046b 100644 --- a/nuttx/graphics/nxconsole/nxcon_font.c +++ b/nuttx/graphics/nxconsole/nxcon_font.c @@ -407,37 +407,37 @@ nxcon_addchar(NXHANDLE hfont, FAR struct nxcon_state_s *priv, uint8_t ch) if (priv->nchars < priv->maxchars) { - /* Yes, setup the bitmap information */ + /* Yes, setup the bitmap information */ - bm = &priv->bm[priv->nchars]; - bm->code = ch; - bm->flags = 0; - bm->pos.x = priv->fpos.x; - bm->pos.y = priv->fpos.y; + bm = &priv->bm[priv->nchars]; + bm->code = ch; + bm->flags = 0; + bm->pos.x = priv->fpos.x; + bm->pos.y = priv->fpos.y; - /* Find (or create) the matching glyph */ + /* Find (or create) the matching glyph */ - glyph = nxcon_getglyph(hfont, priv, ch); - if (!glyph) - { - /* No, there is no font for this code. Just mark this as a space. */ + glyph = nxcon_getglyph(hfont, priv, ch); + if (!glyph) + { + /* No, there is no font for this code. Just mark this as a space. */ - bm->flags |= BMFLAGS_NOGLYPH; + bm->flags |= BMFLAGS_NOGLYPH; - /* Set up the next character position */ + /* Set up the next character position */ - priv->fpos.x += priv->spwidth; - } - else - { - /* Set up the next character position */ + priv->fpos.x += priv->spwidth; + } + else + { + /* Set up the next character position */ - priv->fpos.x += glyph->width; - } + priv->fpos.x += glyph->width; + } - /* Success.. increment nchars to retain this character */ + /* Success.. increment nchars to retain this character */ - priv->nchars++; + priv->nchars++; } return bm; |