Fixes for the touchpad API.

ugfx_release_2.6
mobyfab 2012-09-07 22:57:35 +02:00
parent 8cbb746065
commit 11d299114f
2 changed files with 4 additions and 2 deletions

View File

@ -73,6 +73,7 @@ extern "C" {
void tpInit(const TOUCHPADDriver *tp);
uint16_t tpReadX(void);
uint16_t tpReadY(void);
void tpCalibrate(void);
#if TOUCHPAD_HAS_IRQ
uint8_t tpIRQ(void);

View File

@ -196,11 +196,12 @@ uint16_t tpReadY(void) {
}
void tpCalibrate(void) {
uint16_t cross[2][2] = {{40,50}, {200, 280}};
const uint16_t h = gdispGetHeight();
const uint16_t w = gdispGetWidth();
const uint16_t cross[2][2] = {{(w/8), (h/8)}, {(w-(w/8)) , (h-(h/8))}};
uint16_t points[2][2];
uint8_t i;
//gdispSetOrientation(portrait);
gdispClear(Red);
gdispFillStringBox(0, 10, gdispGetWidth(), 30, "Calibration", &fontUI2Double, White, Red, justifyCenter);