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

Auto detection fix for Kontronik ESCs - verified Kolibri v3.0/v3.5, Kosmik 200 HV v4.17, JivePro 120 HV v1.13 #100

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

bob01
Copy link
Contributor

@bob01 bob01 commented Apr 15, 2024

Replaces #99 (branch cleanup, single commit cherry picked)

Enhancement to #98 to handle legacy and current Kontronik ESCs

  • assume length unknown

  • while length unknown

  • test at 38 bytes for valid CRC for 32 or 34 byte payload, set expected length == 38 (and crc exclusion) if yes

  • test at 40 bytes for valid CRC, set expected length = 40 if yes, if no as usual

  • when length known

  • use length determined for all subsequent packets

…v3.5, Kosmik 200 HV v4.17, JivePro 120 HV v1.13
}
else if (kontronikPacketLength == 0 && readBytes == KON_FRAME_LENGTH) {
// auto detect 40 byte packet...
uint32_t crc = kontronikDecodeCRC(40 - KON_CRC_LENGTH);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other frame sizes are #defines, 40 is not. Please fix.

Copy link
Contributor Author

@bob01 bob01 Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops - done.
Code path verified w/ Kolibri v3.5.

@rotorflight rotorflight merged commit 26b8745 into rotorflight:master Apr 25, 2024
1 check passed
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request Apr 27, 2024
* master:
  Fix for CMS feature disabled issue on Spektrum telemetry (rotorflight#106)
  Update CMS flight profile menus (rotorflight#104)
  Auto detection fix for Kontronik ESCs (rotorflight#100)
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request May 4, 2024
* Auto detection fix for legacy Kontronik ESCs - verified Kolibri v3.0/v3.5, Kosmik 200 HV v4.17, JivePro 120 HV v1.13
* Auto detection fix for legacy Kontronik ESCs - minor code cleanup - verified w/ Kolibri v3.5
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request May 10, 2024
* Auto detection fix for legacy Kontronik ESCs - verified Kolibri v3.0/v3.5, Kosmik 200 HV v4.17, JivePro 120 HV v1.13
* Auto detection fix for legacy Kontronik ESCs - minor code cleanup - verified w/ Kolibri v3.5
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request May 10, 2024
* esc_sensor_hd_rc3:
  Auto detection fix for Kontronik ESCs (rotorflight#100)
  hd - IQ22 - improper use of round(...) w/ float type, replace with roundf(...)  - unit and device tests ok for range of values used
  hd - IQ22 - use float vs double - tests ok for range of values used
  hd - void signature fixes, kon status as 32 bit
  ESC Setup - pre-pr code cosmetics, more defined constants, removed deprecated unc
  Release Candidate 4.3.0-RC3
  Fix Governor Passthrough IDLE state throttle tracking
  hd - pl5 - added OOB restart + identification, cleanup
  ESC Setup - param - OOB status (restart needed) and device identification
  Use servo pulse limits for output throttle
  Change gov_max_throttle range to 0..100%
  Fix hover drift in PID mode 3
  Fix for CMS feature disabled issue on Spektrum telemetry (rotorflight#106)
  hd - pl5 - added writeparams req, resp, err
  hd - pl5 - enter MSP editor from tele
  hd - pl5 - added: device info & get params req, extended decoder for additional responses, pack param payload for MSP editor
  hd - pl5 - hw5 / pl5 ported to rrfsm
  ESC Setup - scorpion - remove enc telemetry data
  ESC Setup - scorpion - unc timeout fixes, minor cosmetics
  Release Candidate 4.3.0-RC2
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request May 13, 2024
* Auto detection fix for legacy Kontronik ESCs - verified Kolibri v3.0/v3.5, Kosmik 200 HV v4.17, JivePro 120 HV v1.13
* Auto detection fix for legacy Kontronik ESCs - minor code cleanup - verified w/ Kolibri v3.5
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request May 13, 2024
* master:
  Add ESC Forward programming for YGE and Scorpion ESCs (rotorflight#108)
  Improve yaw precomp filtering
  Fix Governor Passthrough IDLE state throttle tracking
  Use servo pulse limits for output throttle
  Change gov_max_throttle range to 0..100%
  Fix CMS label alignment on small screen (rotorflight#109)
  Add CMS Rescue, PID controller and bandwidth menus (rotorflight#107)
  Fix hover drift in PID mode 3
  Fix for CMS feature disabled issue on Spektrum telemetry (rotorflight#106)
  Update CMS flight profile menus (rotorflight#104)
  Auto detection fix for Kontronik ESCs (rotorflight#100)

# Conflicts:
#	src/main/sensors/esc_sensor.c
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request Jun 5, 2024
* Auto detection fix for legacy Kontronik ESCs - verified Kolibri v3.0/v3.5, Kosmik 200 HV v4.17, JivePro 120 HV v1.13
* Auto detection fix for legacy Kontronik ESCs - minor code cleanup - verified w/ Kolibri v3.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants