This commit is contained in:
Pascal Serrarens 2025-06-04 09:42:52 +02:00
parent 29b37d91c1
commit 2d0acd2a82
2 changed files with 2 additions and 5 deletions

View File

@ -45,18 +45,15 @@ namespace RoboidControl {
public static void SendQuat32(byte[] buffer, ref byte ix, SwingTwist s) {
Quat32 q32 = Quat32.FromSwingTwist(s);
System.Console.Write($"send q32: {q32.x} {q32.y} {q32.z} {q32.w}");
SendQuat32(buffer, ref ix, q32);
}
public static void SendSwingTwist(byte[] buffer, ref byte ix, SwingTwist r) {
System.Console.Write($"send st: {r.swing.horizontal} {r.swing.vertical} {r.twist}");
SendAngle8(buffer, ref ix, r.swing.horizontal);
SendAngle8(buffer, ref ix, r.swing.vertical);
SendAngle8(buffer, ref ix, r.twist);
}
public static SwingTwist ReceiveSwingTwist(byte[] data, ref byte ix) {
float horizontal = ReceiveAngle8(data, ref ix);
float vertical = ReceiveAngle8(data, ref ix);

View File

@ -50,7 +50,7 @@ namespace RoboidControl {
float pidP = 0.1F;
float pidD = 0.0F;
float pidI = 0.0F;
//float pidI = 0.0F;
public override void Update(ulong currentTimeMs, bool recurse = false) {
float actualSpeed = this.encoder.angularSpeed;