Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESC Setup / programming (bidirectional telemetry / forward programming) - implemented for YGE and Scorpion ESCs #108

Merged
merged 107 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from 104 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
0ab083b
Added OpenYGE transport - TODO frame deserialization
bob01 Feb 9, 2024
7bc27d7
Implemented support for progressive decreasing frame-period during ra…
bob01 Feb 9, 2024
f23afba
Implemented OpenYGE frame deserializer
bob01 Feb 9, 2024
de22429
ESC frame byte alignment workaround
bob01 Feb 9, 2024
7ab2cf8
Remove byte alignment workaround, v1.03539 frames good
bob01 Feb 9, 2024
7ee059f
Added OpenYGE status1 documentation (motor status) - TODO: warning flags
bob01 Feb 9, 2024
b9f0a59
Added status / warning flag documentation
bob01 Feb 9, 2024
2ca6ca4
Added status / warning flag documentation
bob01 Feb 9, 2024
0b01a95
More documentation, fix BB ESC_SENSOR and ESC_SENSOR_DATA values - DE…
bob01 Feb 9, 2024
f78b992
OpenYGE - capture BEC temperature as escSensorData.temperature2
bob01 Feb 9, 2024
364192c
Capture DEBUG_FRAME_BUFFER (use readBytes vs bufferPos)
bob01 Feb 11, 2024
0e14283
Merge branch 'devel' into esc_sensor_openyge
bob01 Feb 11, 2024
74f5b6d
escSensorData - added temperature3 (for ESC's with additional tempera…
bob01 Feb 11, 2024
e6e3de7
escSensorData - esc sensor parity for gps reuse sources
bob01 Feb 11, 2024
3dcf5f1
escSensorData - replaced .temperature3 with .extra1 and .extra2, for …
bob01 Feb 11, 2024
7bdaf01
escSensorData - added ESC sensor protocol CALIBRATE - use to dial in …
bob01 Feb 11, 2024
653a69f
escSensorData - expose new common ESC telemetry fields as reuse sources
bob01 Feb 11, 2024
85307d6
OpenYGE - frame updates for frame version 1
bob01 Feb 12, 2024
c8070a4
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 12, 2024
2d84a3a
OpenYGE - final protocol refinements, requires ESC firmware v1.03543 …
bob01 Feb 13, 2024
075cfcd
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 13, 2024
0a3c50e
OpenYGE - final protocol refinements, requires ESC firmware v1.03543 …
bob01 Feb 13, 2024
abbd23c
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 13, 2024
e28ed43
ESC setup - MSP UI POC - max MSP buffer seems to be btwn 80 and 128 t…
bob01 Feb 13, 2024
985af10
OpenYGE - enable single-wire for future bidirectional use
bob01 Feb 13, 2024
1da134e
OpenYGE - enable single-wire for future bidirectional use
bob01 Feb 13, 2024
1e1e4b4
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 13, 2024
5e5f6d6
OpenYGE - enable single-wire for future bidirectional use, enable txr…
bob01 Feb 13, 2024
1a889ca
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 13, 2024
2601bb2
OpenYGE - reduced ramp interval based on 3543 LA captures
bob01 Feb 14, 2024
e5e6177
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 14, 2024
8af91f5
Merge branch 'esc_sensor_data_plus' into esc_poc
bob01 Feb 14, 2024
dacb474
OpenYGE - disable single-wire telemetry for initial release (ie use R…
bob01 Feb 15, 2024
72cbfd3
ESC Setup - msp - dont send any parameter data until all parameters c…
bob01 Feb 17, 2024
1c77538
YGE ESC - msp - save
bob01 Feb 17, 2024
8099c55
ESC Setup - minor cosmetic
bob01 Feb 18, 2024
3eddc0c
Tribunus - poc - added request/response one-wire protocol variant
bob01 Feb 19, 2024
ac143f9
Tribunus - poc - add request/response one-wire protocol variant - wip
bob01 Feb 19, 2024
6d485f5
Tribunus - poc - add request/response one-wire protocol variant - wip 1
bob01 Feb 20, 2024
4b2b29b
Tribunus - poc - add request/response one-wire protocol variant - wip 2
bob01 Feb 20, 2024
3d183a5
Merge branch 'devel' into esc_sensor_openyge
bob01 Feb 21, 2024
eef1e19
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Feb 21, 2024
0cad4d8
Merge branch 'esc_sensor_data_plus' into esc_yge_poc
bob01 Feb 21, 2024
71a482a
Merge branch 'esc_yge_poc' into esc_trib_poc
bob01 Feb 21, 2024
dbddd99
RFF-78 - escdata - escSensorData_t extended to capture esc provided B…
bob01 Feb 22, 2024
12b5d62
RFF-78 - reuse - additional CRSF reuse sources to expose extended esc…
bob01 Feb 22, 2024
db0ef66
Merge branch 'esc_sensor_data_plus' into esc_yge_poc
bob01 Feb 22, 2024
a7f61bd
Merge branch 'esc_yge_poc' into esc_trib_poc
bob01 Feb 22, 2024
8c95aca
ESC MSP - more generic impl pulled back from more advanced branch
bob01 Feb 22, 2024
3827ec9
Merge branch 'esc_yge_poc' into esc_trib_poc
bob01 Feb 22, 2024
30f3c06
Tribunus - poc - add request/response one-wire protocol variant - wip 3
bob01 Feb 25, 2024
3141627
Tribunus - poc - add request/response one-wire protocol variant - wip 4
bob01 Feb 26, 2024
29a0894
ESC Setup - Scorpion ported and validated on RRFSM (shared request/re…
bob01 Feb 28, 2024
d703cf5
ESC Setup - OpenYGE validated on RRFSM
bob01 Feb 28, 2024
2011fc9
ESC Setup - Scorpion setup params - wip
bob01 Feb 28, 2024
949d271
ESC Setup - Scorpion setup params - wip2
bob01 Feb 28, 2024
7253de2
SCORP ESC - extended payload to include stick min/max Us
bob01 Feb 28, 2024
513ea57
ESC Setup - Scorpion setup params - UNC test
bob01 Feb 29, 2024
7f27c7a
ESC Setup - RRFSM validation
bob01 Mar 1, 2024
9bec61a
OpenYGE - reverted temp offset change (original implementation was co…
bob01 Mar 1, 2024
664e3af
OpenYGE - save param - wip
bob01 Mar 2, 2024
a165778
Merge branch 'devel' into esc_sensor_openyge
bob01 Mar 3, 2024
47bd054
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Mar 3, 2024
db0b3a6
Merge branch 'esc_sensor_data_plus' into esc_rrfsm
bob01 Mar 3, 2024
e513247
OpenYGE - save param - RFP-02 impl
bob01 Mar 3, 2024
a4806d7
ESC Setup - hack / poc to validate scorpion read/write while in UNC mode
bob01 Mar 4, 2024
a4d4b8b
ESC Setup - scorpion read/write while in UNC mode - cleanup of second…
bob01 Mar 5, 2024
e2c22d3
ESC Setup - scorpion read/write while in UNC mode - cleanup of second…
bob01 Mar 6, 2024
93f3d3c
ESC Setup - scorpion - support IQ22 settings gov P and I
bob01 Mar 8, 2024
2bb662d
ESC Setup - scorpion - support IQ22 settings gov P and I
bob01 Mar 8, 2024
f2ac75d
ESC Setup - scorpion - msp params extended to include ESC commands, a…
bob01 Mar 9, 2024
32303a7
ESC Setup - minor code cleanup
bob01 Mar 9, 2024
7ed0800
OpenYGE - support v3 frame header extension
bob01 Mar 15, 2024
803a75c
Merge branch 'esc_sensor_openyge' into esc_sensor_data_plus
bob01 Mar 15, 2024
8613208
Merge branch 'esc_sensor_data_plus' into esc_rrfsm_unc_setup
bob01 Mar 15, 2024
a1d7b16
OpenYGE - support v3 frame header extension - documentation
bob01 Mar 15, 2024
05ef888
OpenYGE - support v3 frame header extension - documentation
bob01 Mar 15, 2024
043a0ee
ESC Setup - RRFSM / serial port init cleanup
bob01 Mar 16, 2024
a0f752a
ESC Setup - support PARAM_HEADER_RDONLY (0x40) e.g. no bidirectional …
bob01 Mar 16, 2024
075bf99
Tribunus - const cleanup
bob01 Mar 17, 2024
cdbb6a5
OpenYGE - ESC_SENSOR voltage and current fixes
bob01 Mar 17, 2024
ba227d0
OpenYGE - const cleanup
bob01 Mar 17, 2024
f631388
OpenYGE - draft bidirectional impl w/ fallback to auto mode, structs …
bob01 Mar 17, 2024
22e5de7
OpenYGE - draft bidirectional impl. cosmetic and doc cleanup
bob01 Mar 17, 2024
a1a9993
ESC Setup - parameter exchange cleanup
bob01 Mar 19, 2024
80f7bff
OpenYGE - telemetry - BEC voltage and current fix
bob01 Mar 22, 2024
58373c0
OpenYGE - telemetry - BEC voltage and current fix
bob01 Mar 22, 2024
03883e4
OpenYGE - master - assume role after last auto telemetry frame w/ del…
bob01 Mar 22, 2024
01c4628
OpenYGE - master - assume role ~24ms quiet time after seeing v3 auto …
bob01 Mar 24, 2024
fa85892
OpenYGE - setup - params read only if frame_version < v3
bob01 Mar 28, 2024
4898b76
ESC Setup - params - invalidate param payload and param on param comm…
bob01 Mar 28, 2024
d23d6c4
OpenYGE - fix: address possible frame underflow condition, add 2nd pa…
bob01 Mar 29, 2024
db34025
ESC status - send reserved bit to force recognition of status == 0
bob01 Mar 31, 2024
f230f66
Merge branch 'master' into esc_sensor_data_plus
bob01 Apr 15, 2024
9140133
RFF-78 - escSensorData - added .throttle to. capture input setpoint a…
bob01 Apr 2, 2024
37a9038
Merge branch 'esc_sensor_data_plus' into esc_sensor_hd
bob01 Apr 15, 2024
a0c6452
REUSE - added BEC, BUS, MPU voltage sources to GPS sensor options
bob01 Apr 15, 2024
d7d437c
CRSF - reuse - expose additional ESC sources on ATT 16-bit sensors - …
bob01 Mar 25, 2024
a3086bf
CRSF - reuse - minor code consistency - missing comma
bob01 Mar 31, 2024
8444656
ESC Setup - scorpion - unc timeout fixes, minor cosmetics
bob01 Apr 19, 2024
2fda453
ESC Setup - scorpion - remove enc telemetry data
bob01 Apr 19, 2024
fdd8278
ESC Setup - pre-pr code cosmetics, more defined constants, removed de…
bob01 Apr 25, 2024
c590e54
Merge branch 'master' into esc_sensor_hd_pr
bob01 Apr 27, 2024
bdc7a9b
hd - void signature fixes, kon status as 32 bit
bob01 May 1, 2024
3f0eb6a
hd - IQ22 - use float vs double - tests ok for range of values used
bob01 May 9, 2024
0f3d27b
hd - IQ22 - improper use of round(...) w/ float type, replace with ro…
bob01 May 10, 2024
11767f1
Merge branch 'master' into esc_sensor_hd_pr
rotorflight May 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/cli/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,11 @@ const char * const lookupTableCrsfFmReuse[] = {
};

const char * const lookupTableCrsfAttReuse[] = {
"NONE", "THROTTLE", "ESC_TEMP", "MCU_TEMP", "MCU_LOAD", "SYS_LOAD", "RT_LOAD", "BEC_VOLTAGE", "BUS_VOLTAGE", "MCU_VOLTAGE",
"NONE", "THROTTLE", "ESC_TEMP", "ESC_PWM", "ESC_BEC_VOLTAGE", "ESC_BEC_CURRENT", "ESC_BEC_TEMP", "ESC_STATUS", "ESC_STATUS2", "MCU_TEMP", "MCU_LOAD", "SYS_LOAD", "RT_LOAD", "BEC_VOLTAGE", "BUS_VOLTAGE", "MCU_VOLTAGE",
};

const char * const lookupTableCrsfGpsReuse[] = {
"NONE", "HEADSPEED", "THROTTLE", "ESC_TEMP", "MCU_TEMP", "MCU_LOAD", "SYS_LOAD", "RT_LOAD",
"NONE", "HEADSPEED", "THROTTLE", "ESC_TEMP", "ESC_PWM", "ESC_THROTTLE", "ESC_BEC_VOLTAGE", "ESC_BEC_CURRENT", "ESC_BEC_TEMP", "ESC_STATUS", "ESC_STATUS2", "MCU_TEMP", "MCU_LOAD", "SYS_LOAD", "RT_LOAD", "BEC_VOLTAGE", "BUS_VOLTAGE", "MCU_VOLTAGE",
};

const char * const lookupTableCrsfGpsSatsReuse[] = {
Expand Down
23 changes: 23 additions & 0 deletions src/main/msp/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,16 @@ static bool mspCommonProcessOutCommand(int16_t cmdMSP, sbuf_t *dst, mspPostProce
sbufWriteU8(dst, escSensorConfig()->hw4_current_gain);
sbufWriteU8(dst, escSensorConfig()->hw4_voltage_gain);
break;

case MSP_ESC_PARAMETERS:
{
const uint8_t len = escGetParamBufferLength();
if (len == 0)
return false;

sbufWriteData(dst, escGetParamBuffer(), len);
}
break;
#endif

case MSP_BATTERY_STATE:
Expand Down Expand Up @@ -2641,6 +2651,19 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
escSensorConfigMutable()->hw4_current_gain = sbufReadU8(src);
escSensorConfigMutable()->hw4_voltage_gain = sbufReadU8(src);
break;

case MSP_SET_ESC_PARAMETERS:
{
const uint8_t len = escGetParamBufferLength();
if (len == 0)
return MSP_RESULT_ERROR;

sbufReadData(src, escGetParamUpdBuffer(), len);

if (!escCommitParameters())
return MSP_RESULT_ERROR;
}
break;
#endif

case MSP_EEPROM_WRITE:
Expand Down
3 changes: 3 additions & 0 deletions src/main/msp/msp_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@
#define MSP_SET_NAV_CONFIG 215
#define MSP_SET_ESC_SENSOR_CONFIG 216

#define MSP_ESC_PARAMETERS 217
#define MSP_SET_ESC_PARAMETERS 218

#define MSP_SET_RESET_CURR_PID 219
#define MSP_SET_SENSOR_ALIGNMENT 220
#define MSP_SET_LED_STRIP_MODECOLOR 221
Expand Down
Loading