HTC One M7 Android 4.4.2

Official forum for open source FreePIE discussion and development.
Post Reply
Amantis
One Eyed Hopeful
Posts: 7
Joined: Wed Jul 02, 2014 10:24 am

HTC One M7 Android 4.4.2

Post by Amantis »

I can't get freepie working and I'm not sure whats wrong, maybe someone can help me troubleshoot?

Here's what I have so far. My port (5555) is forwarded, freepie is "On". I'm connected to the correct IP, freepie is running on the computer and I pressed "Start Script" but my mouse just doesn't move when I move my phone.
I've tried these 2 scripts.

Code: Select all

def update():   
    #Apply deadband filter to avoid drift
    #And continousRotation filter to yaw axis to avoid jumps when passing tracker center
    x = filters.deadband(filters.delta(math.degrees(filters.continousRotation(android[0].yaw))), deadband)
    y = filters.deadband(filters.delta(math.degrees(-android[0].pitch)), deadband)
      
    mouse.deltaX = x * multiply
    mouse.deltaY = y * multiply
   
if starting: 
    deadband = 0.01
    multiply = 5
    android[0].update += update
and

Code: Select all

def update():
   global yaw
   global roll
   global pitch
   yaw = android[0].googleYaw + math.pi
   roll = android[0].googleRoll
   pitch = android[0].googlePitch

if starting:
   yaw = 0
   roll = 0
   pitch = 0
   enabled = False
   android[0].update += update

deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
deltaRoll = filters.delta(roll)

if math.fabs(deltaYaw) >= math.pi:
   deltaYaw = 0

if (enabled):
   mouse.deltaX = -deltaYaw*100
   mouse.deltaY = -deltaRoll*200

toggle = keyboard.getPressed(Key.Z)

if toggle:
   enabled = not enabled
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: HTC One M7 Android 4.4.2

Post by CyberVillain »

Strange, works with my M8

If you tick the debug checkbox do you see values when running the app?
Amantis
One Eyed Hopeful
Posts: 7
Joined: Wed Jul 02, 2014 10:24 am

Re: HTC One M7 Android 4.4.2

Post by Amantis »

Yes I see the values
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: HTC One M7 Android 4.4.2

Post by CyberVillain »

Firewall on the PC turned on etc? Dont forget to turn on the wifi on the phone etc
Amantis
One Eyed Hopeful
Posts: 7
Joined: Wed Jul 02, 2014 10:24 am

Re: HTC One M7 Android 4.4.2

Post by Amantis »

Firewalls off, both devices are on the same wifi. Is there some sort of debug or error log or way to ping it that could help you more?
Amantis
One Eyed Hopeful
Posts: 7
Joined: Wed Jul 02, 2014 10:24 am

Re: HTC One M7 Android 4.4.2

Post by Amantis »

Ok I got it to work with the first (deadband) script, by restarting my phone, but freepie (the apk, on the phone) crashes constantly, cant keep it running long enough to actually play anything, and the mouse tracking is pretty unusable, the movement doesn't translate to the mouse well at all, almost like its just moving at random. Other script still does nothing.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: HTC One M7 Android 4.4.2

Post by CyberVillain »

Have you tried both Yaw and Orientation? You need to change the script between the two, googleYaw uses Orientation while yaw uses Raw
Amantis
One Eyed Hopeful
Posts: 7
Joined: Wed Jul 02, 2014 10:24 am

Re: HTC One M7 Android 4.4.2

Post by Amantis »

Ok, I have gotten it working. Apparently I'm stupid. Here's how: restarted my phone, figured out you have to press "M" to toggle the second script on. Second script works great. First script is still dodgey as hell. Played a bit of Minecrift
Post Reply

Return to “FreePIE”