-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,323 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using uint8_t = System.Byte; | ||
using uint16_t = System.UInt16; | ||
using uint32_t = System.UInt32; | ||
using uint64_t = System.UInt64; | ||
|
||
using int8_t = System.SByte; | ||
using int16_t = System.Int16; | ||
using int32_t = System.Int32; | ||
using int64_t = System.Int64; | ||
|
||
using float32 = System.Single; | ||
|
||
using System; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace DroneCAN | ||
{ | ||
public partial class DroneCAN | ||
{ | ||
public partial class com_tmotor_esc_FocCtrl: IDroneCANSerialize | ||
{ | ||
public const int COM_TMOTOR_ESC_FOCCTRL_MAX_PACK_SIZE = 8; | ||
public const ulong COM_TMOTOR_ESC_FOCCTRL_DT_SIG = 0x598143612FBC000B; | ||
public const int COM_TMOTOR_ESC_FOCCTRL_DT_ID = 1035; | ||
|
||
public uint8_t esc_index = new uint8_t(); | ||
public uint8_t esc_mode = new uint8_t(); | ||
public uint8_t esc_fdb_rate = new uint8_t(); | ||
public uint8_t esc_cmd = new uint8_t(); | ||
public int32_t esc_cmd_val = new int32_t(); | ||
|
||
public void encode(dronecan_serializer_chunk_cb_ptr_t chunk_cb, object ctx, bool fdcan = false) | ||
{ | ||
encode_com_tmotor_esc_FocCtrl(this, chunk_cb, ctx, fdcan); | ||
} | ||
|
||
public void decode(CanardRxTransfer transfer, bool fdcan = false) | ||
{ | ||
decode_com_tmotor_esc_FocCtrl(transfer, this, fdcan); | ||
} | ||
|
||
public static com_tmotor_esc_FocCtrl ByteArrayToDroneCANMsg(byte[] transfer, int startoffset, bool fdcan = false) | ||
{ | ||
var ans = new com_tmotor_esc_FocCtrl(); | ||
ans.decode(new DroneCAN.CanardRxTransfer(transfer.Skip(startoffset).ToArray()), fdcan); | ||
return ans; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using uint8_t = System.Byte; | ||
using uint16_t = System.UInt16; | ||
using uint32_t = System.UInt32; | ||
using uint64_t = System.UInt64; | ||
|
||
using int8_t = System.SByte; | ||
using int16_t = System.Int16; | ||
using int32_t = System.Int32; | ||
using int64_t = System.Int64; | ||
|
||
using float32 = System.Single; | ||
|
||
using System; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace DroneCAN | ||
{ | ||
public partial class DroneCAN | ||
{ | ||
public partial class com_tmotor_esc_PUSHCAN: IDroneCANSerialize | ||
{ | ||
public const int COM_TMOTOR_ESC_PUSHCAN_MAX_PACK_SIZE = 260; | ||
public const ulong COM_TMOTOR_ESC_PUSHCAN_DT_SIG = 0xAACF9B4B2577BC6E; | ||
public const int COM_TMOTOR_ESC_PUSHCAN_DT_ID = 1039; | ||
|
||
public uint32_t data_sequence = new uint32_t(); | ||
public uint8_t data_len; [MarshalAs(UnmanagedType.ByValArray,SizeConst=255)] public uint8_t[] data = Enumerable.Range(1, 255).Select(i => new uint8_t()).ToArray(); | ||
|
||
public void encode(dronecan_serializer_chunk_cb_ptr_t chunk_cb, object ctx, bool fdcan = false) | ||
{ | ||
encode_com_tmotor_esc_PUSHCAN(this, chunk_cb, ctx, fdcan); | ||
} | ||
|
||
public void decode(CanardRxTransfer transfer, bool fdcan = false) | ||
{ | ||
decode_com_tmotor_esc_PUSHCAN(transfer, this, fdcan); | ||
} | ||
|
||
public static com_tmotor_esc_PUSHCAN ByteArrayToDroneCANMsg(byte[] transfer, int startoffset, bool fdcan = false) | ||
{ | ||
var ans = new com_tmotor_esc_PUSHCAN(); | ||
ans.decode(new DroneCAN.CanardRxTransfer(transfer.Skip(startoffset).ToArray()), fdcan); | ||
return ans; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using uint8_t = System.Byte; | ||
using uint16_t = System.UInt16; | ||
using uint32_t = System.UInt32; | ||
using uint64_t = System.UInt64; | ||
|
||
using int8_t = System.SByte; | ||
using int16_t = System.Int16; | ||
using int32_t = System.Int32; | ||
using int64_t = System.Int64; | ||
|
||
using float32 = System.Single; | ||
|
||
using System; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace DroneCAN | ||
{ | ||
public partial class DroneCAN | ||
{ | ||
public partial class com_tmotor_esc_PUSHSCI: IDroneCANSerialize | ||
{ | ||
public const int COM_TMOTOR_ESC_PUSHSCI_MAX_PACK_SIZE = 260; | ||
public const ulong COM_TMOTOR_ESC_PUSHSCI_DT_SIG = 0xCE2B6D6B6BDC0AE8; | ||
public const int COM_TMOTOR_ESC_PUSHSCI_DT_ID = 1038; | ||
|
||
public uint32_t data_sequence = new uint32_t(); | ||
public uint8_t data_len; [MarshalAs(UnmanagedType.ByValArray,SizeConst=255)] public uint8_t[] data = Enumerable.Range(1, 255).Select(i => new uint8_t()).ToArray(); | ||
|
||
public void encode(dronecan_serializer_chunk_cb_ptr_t chunk_cb, object ctx, bool fdcan = false) | ||
{ | ||
encode_com_tmotor_esc_PUSHSCI(this, chunk_cb, ctx, fdcan); | ||
} | ||
|
||
public void decode(CanardRxTransfer transfer, bool fdcan = false) | ||
{ | ||
decode_com_tmotor_esc_PUSHSCI(transfer, this, fdcan); | ||
} | ||
|
||
public static com_tmotor_esc_PUSHSCI ByteArrayToDroneCANMsg(byte[] transfer, int startoffset, bool fdcan = false) | ||
{ | ||
var ans = new com_tmotor_esc_PUSHSCI(); | ||
ans.decode(new DroneCAN.CanardRxTransfer(transfer.Skip(startoffset).ToArray()), fdcan); | ||
return ans; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using uint8_t = System.Byte; | ||
using uint16_t = System.UInt16; | ||
using uint32_t = System.UInt32; | ||
using uint64_t = System.UInt64; | ||
|
||
using int8_t = System.SByte; | ||
using int16_t = System.Int16; | ||
using int32_t = System.Int32; | ||
using int64_t = System.Int64; | ||
|
||
using float32 = System.Single; | ||
|
||
using System; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace DroneCAN | ||
{ | ||
public partial class DroneCAN | ||
{ | ||
public partial class com_tmotor_esc_ParamCfg: IDroneCANSerialize | ||
{ | ||
public const int COM_TMOTOR_ESC_PARAMCFG_MAX_PACK_SIZE = 27; | ||
public const ulong COM_TMOTOR_ESC_PARAMCFG_DT_SIG = 0x948F5E0B33E0EDEE; | ||
public const int COM_TMOTOR_ESC_PARAMCFG_DT_ID = 1033; | ||
|
||
public uint8_t esc_index = new uint8_t(); | ||
public uint32_t esc_uuid = new uint32_t(); | ||
public uint16_t esc_id_set = new uint16_t(); | ||
public uint16_t esc_ov_threshold = new uint16_t(); | ||
public uint16_t esc_oc_threshold = new uint16_t(); | ||
public uint16_t esc_ot_threshold = new uint16_t(); | ||
public uint16_t esc_acc_threshold = new uint16_t(); | ||
public uint16_t esc_dacc_threshold = new uint16_t(); | ||
public int16_t esc_rotate_dir = new int16_t(); | ||
public uint8_t esc_timing = new uint8_t(); | ||
public uint8_t esc_signal_priority = new uint8_t(); | ||
public uint16_t esc_led_mode = new uint16_t(); | ||
public uint8_t esc_can_rate = new uint8_t(); | ||
public uint16_t esc_fdb_rate = new uint16_t(); | ||
public uint8_t esc_save_option = new uint8_t(); | ||
|
||
public void encode(dronecan_serializer_chunk_cb_ptr_t chunk_cb, object ctx, bool fdcan = false) | ||
{ | ||
encode_com_tmotor_esc_ParamCfg(this, chunk_cb, ctx, fdcan); | ||
} | ||
|
||
public void decode(CanardRxTransfer transfer, bool fdcan = false) | ||
{ | ||
decode_com_tmotor_esc_ParamCfg(transfer, this, fdcan); | ||
} | ||
|
||
public static com_tmotor_esc_ParamCfg ByteArrayToDroneCANMsg(byte[] transfer, int startoffset, bool fdcan = false) | ||
{ | ||
var ans = new com_tmotor_esc_ParamCfg(); | ||
ans.decode(new DroneCAN.CanardRxTransfer(transfer.Skip(startoffset).ToArray()), fdcan); | ||
return ans; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.