Skip to content

Commit

Permalink
Firmware tool (#125)
Browse files Browse the repository at this point in the history
* Firmware tool

* Better naming

* Bring back boardtype string

* Better flash protocol

* Fix board type typo

* Make changes on deviceid and fix typos

* Add provisioning step

---------

Co-authored-by: ImUrX <urielfontan2002@gmail.com>
Co-authored-by: Uriel <imurx@proton.me>
  • Loading branch information
3 people authored Oct 8, 2024
1 parent b182bec commit 9e05a91
Show file tree
Hide file tree
Showing 725 changed files with 71,209 additions and 65,659 deletions.
21,090 changes: 10,999 additions & 10,091 deletions protocol/cpp/include/solarxr_protocol/generated/all_generated.h

Large diffs are not rendered by default.

232 changes: 116 additions & 116 deletions protocol/java/src/solarxr_protocol/MessageBundle.java

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions protocol/java/src/solarxr_protocol/MessageBundleT.java
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class MessageBundleT {
private solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs;
private solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs;
private solarxr_protocol.pub_sub.PubSubHeaderT[] pubSubMsgs;

public solarxr_protocol.data_feed.DataFeedMessageHeaderT[] getDataFeedMsgs() { return dataFeedMsgs; }

public void setDataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs) { this.dataFeedMsgs = dataFeedMsgs; }

public solarxr_protocol.rpc.RpcMessageHeaderT[] getRpcMsgs() { return rpcMsgs; }

public void setRpcMsgs(solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs) { this.rpcMsgs = rpcMsgs; }

public solarxr_protocol.pub_sub.PubSubHeaderT[] getPubSubMsgs() { return pubSubMsgs; }

public void setPubSubMsgs(solarxr_protocol.pub_sub.PubSubHeaderT[] pubSubMsgs) { this.pubSubMsgs = pubSubMsgs; }


public MessageBundleT() {
this.dataFeedMsgs = null;
this.rpcMsgs = null;
this.pubSubMsgs = null;
}
}

// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class MessageBundleT {
private solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs;
private solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs;
private solarxr_protocol.pub_sub.PubSubHeaderT[] pubSubMsgs;

public solarxr_protocol.data_feed.DataFeedMessageHeaderT[] getDataFeedMsgs() { return dataFeedMsgs; }

public void setDataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs) { this.dataFeedMsgs = dataFeedMsgs; }

public solarxr_protocol.rpc.RpcMessageHeaderT[] getRpcMsgs() { return rpcMsgs; }

public void setRpcMsgs(solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs) { this.rpcMsgs = rpcMsgs; }

public solarxr_protocol.pub_sub.PubSubHeaderT[] getPubSubMsgs() { return pubSubMsgs; }

public void setPubSubMsgs(solarxr_protocol.pub_sub.PubSubHeaderT[] pubSubMsgs) { this.pubSubMsgs = pubSubMsgs; }


public MessageBundleT() {
this.dataFeedMsgs = null;
this.rpcMsgs = null;
this.pubSubMsgs = null;
}
}
156 changes: 78 additions & 78 deletions protocol/java/src/solarxr_protocol/data_feed/Bone.java
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.data_feed;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class Bone extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); }
public static Bone getRootAsBone(ByteBuffer _bb) { return getRootAsBone(_bb, new Bone()); }
public static Bone getRootAsBone(ByteBuffer _bb, Bone obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public Bone __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int bodyPart() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
/**
* The global rotation of the bone.
*
* Note that the identity rotation is where a bone's tail is towards -y (assuming
* the head of the bone is the origin)
*/
public solarxr_protocol.datatypes.math.Quat rotationG() { return rotationG(new solarxr_protocol.datatypes.math.Quat()); }
public solarxr_protocol.datatypes.math.Quat rotationG(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(6); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }
public float boneLength() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; }
/**
* The global position of the head of this bone.
*
* The head of a bone is joint/node of the bone touching the parent bone. The
* parent is defined as the bone closer to the HMD.
*/
public solarxr_protocol.datatypes.math.Vec3f headPositionG() { return headPositionG(new solarxr_protocol.datatypes.math.Vec3f()); }
public solarxr_protocol.datatypes.math.Vec3f headPositionG(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }

public static void startBone(FlatBufferBuilder builder) { builder.startTable(4); }
public static void addBodyPart(FlatBufferBuilder builder, int bodyPart) { builder.addByte(0, (byte) bodyPart, (byte) 0); }
public static void addRotationG(FlatBufferBuilder builder, int rotationGOffset) { builder.addStruct(1, rotationGOffset, 0); }
public static void addBoneLength(FlatBufferBuilder builder, float boneLength) { builder.addFloat(2, boneLength, 0.0f); }
public static void addHeadPositionG(FlatBufferBuilder builder, int headPositionGOffset) { builder.addStruct(3, headPositionGOffset, 0); }
public static int endBone(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public Bone get(int j) { return get(new Bone(), j); }
public Bone get(Bone obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public BoneT unpack() {
BoneT _o = new BoneT();
unpackTo(_o);
return _o;
}
public void unpackTo(BoneT _o) {
int _oBodyPart = bodyPart();
_o.setBodyPart(_oBodyPart);
if (rotationG() != null) rotationG().unpackTo(_o.getRotationG());
else _o.setRotationG(null);
float _oBoneLength = boneLength();
_o.setBoneLength(_oBoneLength);
if (headPositionG() != null) headPositionG().unpackTo(_o.getHeadPositionG());
else _o.setHeadPositionG(null);
}
public static int pack(FlatBufferBuilder builder, BoneT _o) {
if (_o == null) return 0;
startBone(builder);
addBodyPart(builder, _o.getBodyPart());
addRotationG(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationG()));
addBoneLength(builder, _o.getBoneLength());
addHeadPositionG(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getHeadPositionG()));
return endBone(builder);
}
}

// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.data_feed;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class Bone extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); }
public static Bone getRootAsBone(ByteBuffer _bb) { return getRootAsBone(_bb, new Bone()); }
public static Bone getRootAsBone(ByteBuffer _bb, Bone obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public Bone __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public int bodyPart() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
/**
* The global rotation of the bone.
*
* Note that the identity rotation is where a bone's tail is towards -y (assuming
* the head of the bone is the origin)
*/
public solarxr_protocol.datatypes.math.Quat rotationG() { return rotationG(new solarxr_protocol.datatypes.math.Quat()); }
public solarxr_protocol.datatypes.math.Quat rotationG(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(6); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }
public float boneLength() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; }
/**
* The global position of the head of this bone.
*
* The head of a bone is joint/node of the bone touching the parent bone. The
* parent is defined as the bone closer to the HMD.
*/
public solarxr_protocol.datatypes.math.Vec3f headPositionG() { return headPositionG(new solarxr_protocol.datatypes.math.Vec3f()); }
public solarxr_protocol.datatypes.math.Vec3f headPositionG(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }

public static void startBone(FlatBufferBuilder builder) { builder.startTable(4); }
public static void addBodyPart(FlatBufferBuilder builder, int bodyPart) { builder.addByte(0, (byte) bodyPart, (byte) 0); }
public static void addRotationG(FlatBufferBuilder builder, int rotationGOffset) { builder.addStruct(1, rotationGOffset, 0); }
public static void addBoneLength(FlatBufferBuilder builder, float boneLength) { builder.addFloat(2, boneLength, 0.0f); }
public static void addHeadPositionG(FlatBufferBuilder builder, int headPositionGOffset) { builder.addStruct(3, headPositionGOffset, 0); }
public static int endBone(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public Bone get(int j) { return get(new Bone(), j); }
public Bone get(Bone obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public BoneT unpack() {
BoneT _o = new BoneT();
unpackTo(_o);
return _o;
}
public void unpackTo(BoneT _o) {
int _oBodyPart = bodyPart();
_o.setBodyPart(_oBodyPart);
if (rotationG() != null) rotationG().unpackTo(_o.getRotationG());
else _o.setRotationG(null);
float _oBoneLength = boneLength();
_o.setBoneLength(_oBoneLength);
if (headPositionG() != null) headPositionG().unpackTo(_o.getHeadPositionG());
else _o.setHeadPositionG(null);
}
public static int pack(FlatBufferBuilder builder, BoneT _o) {
if (_o == null) return 0;
startBone(builder);
addBodyPart(builder, _o.getBodyPart());
addRotationG(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationG()));
addBoneLength(builder, _o.getBoneLength());
addHeadPositionG(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getHeadPositionG()));
return endBone(builder);
}
}
80 changes: 40 additions & 40 deletions protocol/java/src/solarxr_protocol/data_feed/BoneT.java
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.data_feed;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class BoneT {
private int bodyPart;
private solarxr_protocol.datatypes.math.QuatT rotationG;
private float boneLength;
private solarxr_protocol.datatypes.math.Vec3fT headPositionG;

public int getBodyPart() { return bodyPart; }

public void setBodyPart(int bodyPart) { this.bodyPart = bodyPart; }

public solarxr_protocol.datatypes.math.QuatT getRotationG() { return rotationG; }

public void setRotationG(solarxr_protocol.datatypes.math.QuatT rotationG) { this.rotationG = rotationG; }

public float getBoneLength() { return boneLength; }

public void setBoneLength(float boneLength) { this.boneLength = boneLength; }

public solarxr_protocol.datatypes.math.Vec3fT getHeadPositionG() { return headPositionG; }

public void setHeadPositionG(solarxr_protocol.datatypes.math.Vec3fT headPositionG) { this.headPositionG = headPositionG; }


public BoneT() {
this.bodyPart = 0;
this.rotationG = new solarxr_protocol.datatypes.math.QuatT();
this.boneLength = 0.0f;
this.headPositionG = new solarxr_protocol.datatypes.math.Vec3fT();
}
}

// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.data_feed;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class BoneT {
private int bodyPart;
private solarxr_protocol.datatypes.math.QuatT rotationG;
private float boneLength;
private solarxr_protocol.datatypes.math.Vec3fT headPositionG;

public int getBodyPart() { return bodyPart; }

public void setBodyPart(int bodyPart) { this.bodyPart = bodyPart; }

public solarxr_protocol.datatypes.math.QuatT getRotationG() { return rotationG; }

public void setRotationG(solarxr_protocol.datatypes.math.QuatT rotationG) { this.rotationG = rotationG; }

public float getBoneLength() { return boneLength; }

public void setBoneLength(float boneLength) { this.boneLength = boneLength; }

public solarxr_protocol.datatypes.math.Vec3fT getHeadPositionG() { return headPositionG; }

public void setHeadPositionG(solarxr_protocol.datatypes.math.Vec3fT headPositionG) { this.headPositionG = headPositionG; }


public BoneT() {
this.bodyPart = 0;
this.rotationG = new solarxr_protocol.datatypes.math.QuatT();
this.boneLength = 0.0f;
this.headPositionG = new solarxr_protocol.datatypes.math.Vec3fT();
}
}
Loading

0 comments on commit 9e05a91

Please sign in to comment.