Hxmoveapi - PsMoveApi bindings

Hi!

I’ve created some bindings for psmoveapi using ammer. I created a very simple test to check buttons, sensors and leds. I made it public if you want to give it a try.

enjoy!

2 Likes

That’s really cool, I don’t have one, so no point playing, but well done :slight_smile:

Very nice!

If you don’t mind me hijacking the thread a tiny bit – how do you find ammer and its documentation? Is there something you think should be more visible? Anything that is not explained clearly? Features that you would really like?

I also wonder why you used prereturn for the getters – is it to make the fields read-only? Or was this written before I added struct variables? ^^

First of all, thank you Aurel for the library!

If you don’t mind me hijacking the thread a tiny bit – how do you find ammer and its documentation? Is there something you think should be more visible? Anything that is not explained clearly? Features that you would really like?

I began developing this when there was no dedicated documentation page, so it was a big step forward. It helped me a lot and it is very well written for my limited understanding in the matter.

While developing I visited the page usually because I saw it was getting new content constantly. So sometimes I missed something but few days later it was there.

Last time I added something to the bindings (before the confinement) I needed closures to get values I was trying to get in a very weird way but I think the closures and callbacks are now added, aren’t they?

I also wonder why you used prereturn for the getters – is it to make the fields read-only? Or was this written before I added struct variables? ^^

I think yes, it was written before :slight_smile:
It should be done like this?

class AxisVector extends ammer.Pointer<"PSMove_3AxisVector", PsMoveApi> {
    @:ammer.native("x") public var x:Int;
    @:ammer.native("y") public var y:Int;
    @:ammer.native("z") public var z:Int;
}

Thanks again!

1 Like

Yes, closures are now added! The GC rooting modes aren’t quite implemented (just use "once" as the parameter I guess), but that’ll happen soon enough.

And yup, the pointer class looks ok. Maybe there’s no need for the @:ammer.native since they are the same as the Haxe name.