ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AP_ESC extended status packet addition

Open Pradeep-Carbonix opened this issue 1 year ago • 8 comments

Added support for ESC extended status telemetry data for CubeOrange and AP_Periph :

  • INPUT_DUTY,
  • OUTPUT_DUTY,
  • STATUS_FLAGS

Pradeep-Carbonix avatar Jun 06 '24 01:06 Pradeep-Carbonix

Do you have a spec for this? I am not finding anything that specifies this.

andyp1per avatar Jun 06 '24 10:06 andyp1per

Binary Name      Text [B]         Data [B]     BSS (B)        Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  ---------------  -----------  -------------  ----------------------------  -------------------------
ardusub          1320 (+0.0838%)  0 (0.0000%)  0 (0.0000%)    1320 (+0.0837%)                                  387144
antennatracker   1252 (+0.0944%)  0 (0.0000%)  -4 (-0.0015%)  1252 (+0.0942%)                                  636060
ardurover        1244 (+0.0760%)  0 (0.0000%)  -4 (-0.0015%)  1244 (+0.0759%)                                  326044
arduplane        1376 (+0.0773%)  0 (0.0000%)  0 (0.0000%)    1376 (+0.0771%)                                  179576
arducopter-heli  1248 (+0.0697%)  0 (0.0000%)  0 (0.0000%)    1248 (+0.0696%)                                  171368
blimp            1268 (+0.0939%)  0 (0.0000%)  -4 (-0.0015%)  1268 (+0.0938%)                                  612848
arducopter       1268 (+0.0711%)  0 (0.0000%)  -4 (-0.0015%)  1268 (+0.0709%)                                  176768

amilcarlucas avatar Jun 06 '24 14:06 amilcarlucas

@andyp1per it is a custom APD code which is made for us. There is no document for it. Even if ardupilot don't accept the APDF120 custom implementation we would still like the ESCX backend support for logging to be merged.

loki077 avatar Jun 11 '24 03:06 loki077

This is the telemetry Structure : The flags: // Enumeration defining bit positions for each flag typedef enum { overTemp_flag = 0, signalLoss_flag, // 200mS since last throttle packet overVoltage_flag, sysRebooted_flag, // After every reboot or power cycle this bit will stay high for 30 seconds for cube to capture it. } flagTypes;

The telem struct: typedef struct { int8_t temperature; uint16_t voltage; uint16_t current; uint16_t consumption; uint16_t rpm; uint8_t inputDuty; uint8_t outputDuty; //mS uint8_t flags; uint8_t crc; }attribute((packed)) telem_t;

loki077 avatar Jun 11 '24 03:06 loki077

https://github.com/dronecan/DSDL/blob/master/uavcan/equipment/esc/1036.StatusExtended.uavcan#L1

loki077 avatar Jun 11 '24 03:06 loki077

@Pradeep-Carbonix @robertlong13 would be a good idea to split this into 2 PR one for ESCX support and other for APDF120 custom Firmware.

loki077 avatar Jun 11 '24 03:06 loki077

Even if ardupilot don't accept the APDF120 custom implementation we would still like the ESCX backend support for logging to be merged.

So its not BLHeli at all. I think we should make this clear in the naming and in the define to enable it. EDT2 is also providing some of this information and some is also available in the BLHeli status frame - we need to not get these muddled up and not trample over one.

andyp1per avatar Jun 11 '24 13:06 andyp1per

This PR now has changes related to DroneCAN ESCX implementation only. BLHeli implementation is removed from this PR.

Pradeep-Carbonix avatar Jun 25 '24 06:06 Pradeep-Carbonix

CI check autotest (sitltest-plane) is failing. Tried to rerun on our VM - ./Tools/autotest/autotest.py --no-clean build.Plane test.Plane.SDCardWPTest PASSED STEP: test.Plane.SDCardWPTest at Fri Jul 12 11:39:05 2024

Pradeep-Carbonix avatar Jul 12 '24 03:07 Pradeep-Carbonix

@Pradeep-Carbonix I have done some the fixes for this PR here: https://github.com/IamPete1/ardupilot/tree/extended_esc. I can push over this branch if that is OK with you. Or you could do it yourself.

IamPete1 avatar Jul 27 '24 20:07 IamPete1

Just to re-iterate, I have done all the fixes that I think this PR needs here: https://github.com/IamPete1/ardupilot/commits/extended_esc/

IamPete1 avatar Jul 31 '24 13:07 IamPete1

patches merged by Pete's PR #27755

tridge avatar Aug 06 '24 00:08 tridge