mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
TPキャリブレーションの正当性をチェックする UTL_IsValidCalibration 関数を追加。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1610 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
4292a53edc
commit
462dd812d8
@ -20,6 +20,8 @@
|
||||
#include <sysmenu.h>
|
||||
|
||||
// define data------------------------------------------
|
||||
#define TP_CL_CONFIRM_MARGIN 4 // TPキャリブレーションの座標マージン(キャリブレーション後の座標での値)
|
||||
|
||||
// extern data------------------------------------------
|
||||
// function's prototype declaration---------------------
|
||||
static s64 UTLi_CalcRTCSecOffset( RTCDate *datep, RTCTime *timep );
|
||||
@ -79,6 +81,16 @@ void UTL_CaribrateTP( const LCFGTWLTPCalibData *pCalib )
|
||||
}
|
||||
|
||||
|
||||
// キャリブレーションが正常に行われたかチェック
|
||||
BOOL UTL_IsValidCalibration( u16 x, u16 y, u16 correct_x, u16 correct_y )
|
||||
{
|
||||
return !( x < correct_x - TP_CL_CONFIRM_MARGIN ||
|
||||
x > correct_x + TP_CL_CONFIRM_MARGIN ||
|
||||
y < correct_y - TP_CL_CONFIRM_MARGIN ||
|
||||
y > correct_y + TP_CL_CONFIRM_MARGIN );
|
||||
}
|
||||
|
||||
|
||||
//======================================================================
|
||||
// ƒXƒŠ<C692>[ƒv
|
||||
//======================================================================
|
||||
|
||||
@ -38,7 +38,8 @@ extern u32 UTL_SetBacklightBrightness( u8 brightness ); //
|
||||
extern u32 UTL_GetBacklightBrightness( u8 *pBrightness ); // バックライト輝度ゲット
|
||||
|
||||
// タッチパネル
|
||||
extern void UTL_CaribrateTP( const LCFGTWLTPCalibData *pCalib );
|
||||
extern void UTL_CaribrateTP( const LCFGTWLTPCalibData *pCalib ); // TPキャリブレーション
|
||||
extern BOOL UTL_IsValidCalibration( u16 x, u16 y, u16 correct_x, u16 correct_y ); // TPキャリブレーション後にタッチしたポイントが正確か?
|
||||
|
||||
// スリープ
|
||||
extern void UTL_GoSleepMode( void );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user