mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-19 06:56:16 +02:00
tstimg.c (tstimg): display timing parameters
This commit is contained in:
parent
eabd0b53f6
commit
30079397f5
@ -454,6 +454,7 @@ static void ctext(void **f, int xres, int x, int y, const char *s, int n,
|
|||||||
void tstimg(void **f, int xres, int yres)
|
void tstimg(void **f, int xres, int yres)
|
||||||
{
|
{
|
||||||
char buf[20];
|
char buf[20];
|
||||||
|
double line_freq_hz;
|
||||||
|
|
||||||
grid(f, xres, yres);
|
grid(f, xres, yres);
|
||||||
sides(f, xres, yres);
|
sides(f, xres, yres);
|
||||||
@ -462,4 +463,14 @@ void tstimg(void **f, int xres, int yres)
|
|||||||
sprintf(buf, "UBB-VGA %dx%d", xres, yres);
|
sprintf(buf, "UBB-VGA %dx%d", xres, yres);
|
||||||
ctext(f, xres, xres/2, yres/2-GRID*0.75, buf, 10, WHITE, 3);
|
ctext(f, xres, xres/2, yres/2-GRID*0.75, buf, 10, WHITE, 3);
|
||||||
ctext(f, xres, xres/2, yres*(CBAR_Y0+CBAR_Y1)/2, buf, 2, 0, 0);
|
ctext(f, xres, xres/2, yres*(CBAR_Y0+CBAR_Y1)/2, buf, 2, 0, 0);
|
||||||
|
|
||||||
|
sprintf(buf, "PIXEL %5.2f MHZ", 336.0/(mode->clkdiv+1));
|
||||||
|
text(f, xres, xres/8, yres/8, buf, 5, WHITE, 1);
|
||||||
|
|
||||||
|
line_freq_hz = 112000000.0/(mode->line_cycles);
|
||||||
|
sprintf(buf, "LINE %5.2f KHZ", line_freq_hz/1000);
|
||||||
|
text(f, xres, xres/8, yres/8+5*6, buf, 5, WHITE, 1);
|
||||||
|
|
||||||
|
sprintf(buf, "FRAME %5.2f HZ", line_freq_hz/(mode->yres+32+14));
|
||||||
|
text(f, xres, xres/8, yres/8+5*12, buf, 5, WHITE, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user