Subversion Repositories dashGPS

Rev

Rev 11 | Rev 15 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 13
Line 5... Line 5...
5
#include "libOLED/fontclass.H"
5
#include "libOLED/fontclass.H"
6
#include "libOLED/displayDial.H"
6
#include "libOLED/displayDial.H"
7
 
7
 
8
#include "libBMP280/bmp280.h"
8
#include "libBMP280/bmp280.h"
9
 
9
 
-
 
10
#include "libSmallPrintf/small_printf.h"
-
 
11
#include "usbd_cdc_if.h"
-
 
12
 
10
namespace
13
namespace
11
{
14
{
12
  int const WIDTH = 128;
15
  int const WIDTH = 128;
13
  int const HEIGHT = 64;
16
  int const HEIGHT = 64;
14
  int const DISPLAY_RAMWIDTH = 132;
17
  int const DISPLAY_RAMWIDTH = 132;
Line 120... Line 123...
120
                                             bmp);
123
                                             bmp);
121
 
124
 
122
          rslt = bmp280_get_comp_pres_32bit (&pres32, ucomp_data.uncomp_press,
125
          rslt = bmp280_get_comp_pres_32bit (&pres32, ucomp_data.uncomp_press,
123
                                             bmp);
126
                                             bmp);
124
 
127
 
-
 
128
          // compile a logger message over USB
-
 
129
           char buffer[100];
-
 
130
           int cnt = small_sprintf(buffer,"$TP,%ld,%ld",temp32,pres32);
-
 
131
           uint8_t sum=0;
-
 
132
           for(int i=1; i<cnt; i++)
-
 
133
             sum += buffer[i];
-
 
134
           cnt+= small_sprintf(buffer+cnt,"*%02X\n",sum);
-
 
135
 
-
 
136
           CDC_Transmit_FS(reinterpret_cast<uint8_t*>(&buffer[0]),cnt);
-
 
137
 
-
 
138
 
125
        }
139
        }
126
    }
140
    }
127
  display1.gotoxy (0, 56);
141
  display1.gotoxy (0, 56);
128
  display1.printString (small_font, "T", 2, WHITE);
142
  display1.printString (small_font, "T", 2, WHITE);
129
  display1.fontDigits (small_font, 4, 1, temp32/10, WHITE);
143
  display1.fontDigits (small_font, 4, 1, temp32/10, WHITE);
130
  display1.printString (small_font, " P", 2, WHITE);
144
  display1.printString (small_font, " P", 2, WHITE);
131
  display1.fontDigits (small_font, 5, 0, pres32/100, WHITE);
145
  display1.fontDigits (small_font, 5, 0, pres32/100, WHITE);
132
  display1.printString (small_font, " ", 1, WHITE);
146
  display1.printString (small_font, " ", 1, WHITE);
133
 
147
 
-
 
148
 
134
  display1.display ();
149
  display1.display ();
135
 
150
 
136
}
151
}