|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
السلام عليكم اليوم تفاجئت .. وانا اتفصح موقع مايمو الرسمي طبعا مايمو توك ..! لقيت احد الشباب البرمجين قدر يشغل الجهاز بالطول وبالعرض طبعاً غير الطريقة القديمه اللي تكون مو كامله .. اما الحين كامله والكمال لله الشاشه تشوفها بالكامل طبعـاً هذا الفيديو للتأكيد مادام هالمبرمج قدر عليها فـ أبشروا بالتحديث القادم .. انه يكون بالطول وبالعرض N900 يهز الأرض للتحميل من هالرابط http://www.megaupload.com/?d=LAO6ZEF3 الطريقه : The steps to create and install rotate.py are: Create the file in python (or download at the end of post, then go directly to step 4). we can use, for example, the program ConTEXT. Copy and paste the following lines : from ctypes import * import os import sys import time from math import atan2 from pprint import pprint xlib = cdll.LoadLibrary("libX11.so.6") rr = cdll.LoadLibrary("libXrandr.so.2") def get_rotation(): f = open("/sys/class/i2c-adapter/i2c-3/3-001d/coord", 'r' ) coords = [int(w) for w in f.readline().split()] f.close() return coords print get_rotation() def rotate(angle): rr.XRRSetScreenConfigAndRate(display,config,root,s ize,angle,rate,timestamp) display = xlib.XOpenDisplay(os.getenv("DISPLAY")) screen = xlib.XDefaultScreen(display) root = xlib.XDefaultRootWindow(display, screen) class XRRScreenConfiguration(Structure): pass gsi = rr.XRRGetScreenInfo gsi.restype = POINTER(XRRScreenConfiguration) config = gsi(display, root) current_time = c_ulong() rr.XRRTimes.restpye = c_ulong timestamp = rr.XRRTimes(display, screen, byref(current_time)) xccr = rr.XRRConfigCurrentRate xccr.restype = c_int rate = xccr(config) rotation = c_ushort() size = rr.XRRConfigCurrentConfiguration(config, byref(rotation)) while True: [x,y,z] = get_rotation() print x,y,z if y < -500: rotate(1) elif y > 500: rotate(4) elif x < -500: rotate(2) elif x > 500: rotate(8) time.sleep(1) Save the document with the name rotate.py (PY is the Python file extension) Copy in a folder on the N900 the file rotate.py. Start xterm on N900 and type : python rotate.py 1. copy rotate.py to root dir / 2. open xterm: root [enter] cd / [enter] python rotate.py [enter] 3. minimize window and rotate phone! |
مواقع النشر (المفضلة) |
| |