Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

User description

Reverts PR #11025 which added CRSF temperature, RPM, and AirSpeed telemetry support.

Changes Reverted

  • src/main/rx/crsf.h: Removed frame type definitions (CRSF_FRAMETYPE_AIRSPEED_SENSOR, CRSF_FRAMETYPE_RPM, CRSF_FRAMETYPE_TEMP) and payload size constant
  • src/main/telemetry/crsf.c: Removed crsfFrameAirSpeedSensor(), crsfRpm(), crsfTemperature() functions, helper crsfSerialize24(), and associated frame scheduling logic

Created via git revert -m 1 acefeca61de5ef01883c14d262688dbd4cd3d298.

Original prompt

Create a new pull request that reverts the changes introduced by merged pull request #11025: #11025.

Scope of work (actionable steps the agent should perform):

  1. Identify the merge commit that merged PR [crsf] add temperature, RPM and AirSpeed telemetry #11025 and create a new branch from the repository default branch (use the repo default branch if known; otherwise create from the default remote branch).
  2. Create a single revert commit that reverts the merge commit for PR [crsf] add temperature, RPM and AirSpeed telemetry #11025 using git revert -m 1 (this must correctly target the parent so the revert applies cleanly).
  3. Ensure the revert commit message follows the conventional style and includes: "Revert "[crsf] add temperature, RPM and AirSpeed telemetry"\n\nThis reverts commit (PR [crsf] add temperature, RPM and AirSpeed telemetry #11025)." and a short rationale: "Reverting because these telemetry additions caused regressions/compatibility issues." (rationale may be edited by maintainers)
  4. Run repository lint or build steps if the agent supports that to verify no immediate compilation errors are introduced by the revert; if build/lint fails, include notes in the PR description explaining failures and the rationale for the revert.
  5. Update CHANGELOG.md or HISTORY.md if present by adding an entry under "Unreleased" or the top of the file noting the revert and reference to PR [crsf] add temperature, RPM and AirSpeed telemetry #11025.
  6. Push the new branch and open a pull request against the repository's default branch with a title: "Revert "[crsf] add temperature, RPM and AirSpeed telemetry" (PR [crsf] add temperature, RPM and AirSpeed telemetry #11025)" and a description that links to the original PR: [crsf] add temperature, RPM and AirSpeed telemetry #11025, explains why the revert is needed, and lists any follow-ups (e.g., re-introduce later with fixes, run additional tests).

Do NOT assign reviewers or merge the PR. Leave the PR draft state as appropriate if uncertain, but ensure the PR is opened.

Repository: iNavFlight/inav
Additional references:

Do not include any assignees in the problem statement.

If any required information is missing (for example the exact merge commit SHA or default branch), detect and fetch it from the repository automatically.

Return a created pull request url and branch name in the tool's result.

This pull request was created as a result of the following prompt from Copilot chat.

Create a new pull request that reverts the changes introduced by merged pull request #11025: #11025.

Scope of work (actionable steps the agent should perform):

  1. Identify the merge commit that merged PR [crsf] add temperature, RPM and AirSpeed telemetry #11025 and create a new branch from the repository default branch (use the repo default branch if known; otherwise create from the default remote branch).
  2. Create a single revert commit that reverts the merge commit for PR [crsf] add temperature, RPM and AirSpeed telemetry #11025 using git revert -m 1 (this must correctly target the parent so the revert applies cleanly).
  3. Ensure the revert commit message follows the conventional style and includes: "Revert "[crsf] add temperature, RPM and AirSpeed telemetry"\n\nThis reverts commit (PR [crsf] add temperature, RPM and AirSpeed telemetry #11025)." and a short rationale: "Reverting because these telemetry additions caused regressions/compatibility issues." (rationale may be edited by maintainers)
  4. Run repository lint or build steps if the agent supports that to verify no immediate compilation errors are introduced by the revert; if build/lint fails, include notes in the PR description explaining failures and the rationale for the revert.
  5. Update CHANGELOG.md or HISTORY.md if present by adding an entry under "Unreleased" or the top of the file noting the revert and reference to PR [crsf] add temperature, RPM and AirSpeed telemetry #11025.
  6. Push the new branch and open a pull request against the repository's default branch with a title: "Revert "[crsf] add temperature, RPM and AirSpeed telemetry" (PR [crsf] add temperature, RPM and AirSpeed telemetry #11025)" and a description that links to the original PR: [crsf] add temperature, RPM and AirSpeed telemetry #11025, explains why the revert is needed, and lists any follow-ups (e.g., re-introduce later with fixes, run additional tests).

Do NOT assign reviewers or merge the PR. Leave the PR draft state as appropriate if uncertain, but ensure the PR is opened.

Repository: iNavFlight/inav
Additional references:

Do not include any assignees in the problem statement.

If any required information is missing (for example the exact merge commit SHA or default branch), detect and fetch it from the repository automatically.

Return a created pull request url and branch name in the tool's result.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


PR Type

Bug fix


Description

  • Reverts CRSF telemetry additions that caused regressions

  • Removes airspeed, RPM, and temperature frame support

  • Removes associated sensor includes and helper functions

  • Simplifies frame scheduling logic and reduces payload complexity


Diagram Walkthrough

flowchart LR
  A["CRSF Telemetry Module"] -->|Remove| B["Airspeed Frame Type"]
  A -->|Remove| C["RPM Frame Type"]
  A -->|Remove| D["Temperature Frame Type"]
  A -->|Remove| E["Sensor Dependencies"]
  E -->|Remove| F["ESC Sensor Include"]
  E -->|Remove| G["Pitot Meter Include"]
  E -->|Remove| H["Temperature Sensor Include"]
  A -->|Simplify| I["Frame Scheduling"]
Loading

File Walkthrough

Relevant files
Bug fix
crsf.h
Remove CRSF telemetry frame type definitions                         

src/main/rx/crsf.h

  • Removed CRSF_FRAME_AIRSPEED_PAYLOAD_SIZE constant definition
  • Removed frame type enums: CRSF_FRAMETYPE_AIRSPEED_SENSOR,
    CRSF_FRAMETYPE_RPM, CRSF_FRAMETYPE_TEMP
  • Cleaned up CRSF protocol frame type definitions
+0/-4     
crsf.c
Remove CRSF telemetry functions and sensor support             

src/main/telemetry/crsf.c

  • Removed includes: flight/mixer.h, sensors/esc_sensor.h,
    sensors/pitotmeter.h, sensors/temperature.h
  • Removed functions: crsfFrameAirSpeedSensor(), crsfRpm(),
    crsfTemperature(), and helper crsfSerialize24()
  • Removed frame scheduling entries for airspeed, RPM, and temperature
    telemetry
  • Simplified crsfSchedule array from uint16_t to uint8_t type
  • Removed conditional frame processing blocks for RPM, temperature, and
    airspeed sensors
  • Removed sensor initialization logic in initCrsfTelemetry() for ESC and
    pitot sensors
+2/-131 

This reverts commit acefeca, reversing
changes made to 6aedd1a.
Copilot AI changed the title [WIP] Revert changes introduced by PR #11025 Revert "[crsf] add temperature, RPM and AirSpeed telemetry" Nov 28, 2025
Copilot AI requested a review from sensei-hacker November 28, 2025 16:26
Copilot finished work on behalf of sensei-hacker November 28, 2025 16:26
@sensei-hacker sensei-hacker marked this pull request as ready for review November 28, 2025 17:27
@sensei-hacker sensei-hacker merged commit 7d5b39f into master Nov 28, 2025
42 checks passed
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

Comment on lines 465 to +472
CRSF_FRAME_GPS_INDEX,
CRSF_FRAME_VARIO_SENSOR_INDEX,
CRSF_FRAME_BAROMETER_ALTITUDE_INDEX,
CRSF_FRAME_TEMP_INDEX,
CRSF_FRAME_RPM_INDEX,
CRSF_FRAME_AIRSPEED_INDEX,
CRSF_SCHEDULE_COUNT_MAX
} crsfFrameTypeIndex_e;

static uint8_t crsfScheduleCount;
static uint16_t crsfSchedule[CRSF_SCHEDULE_COUNT_MAX];
static uint8_t crsfSchedule[CRSF_SCHEDULE_COUNT_MAX];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Add a compile-time assert that the highest used index fits in the schedule mask width and update any docs/comments to reflect removed frames to prevent future mismatches. [Learned best practice, importance: 6]

New proposed code:
 typedef enum {
     CRSF_FRAME_ATTITUDE_INDEX,
     CRSF_FRAME_BATTERY_SENSOR_INDEX,
     CRSF_FRAME_FLIGHT_MODE_INDEX,
     CRSF_FRAME_DEVICE_INFO_INDEX,
     CRSF_FRAME_GPS_INDEX,
     CRSF_FRAME_VARIO_SENSOR_INDEX,
     CRSF_FRAME_BAROMETER_ALTITUDE_INDEX,
     CRSF_SCHEDULE_COUNT_MAX
 } crsfFrameTypeIndex_e;
 
 static uint8_t crsfScheduleCount;
 static uint8_t crsfSchedule[CRSF_SCHEDULE_COUNT_MAX];
+
+_Static_assert(CRSF_SCHEDULE_COUNT_MAX <= 8, "crsfSchedule bitmask exceeds uint8_t width");
 
 ...
 const uint8_t currentSchedule = crsfSchedule[crsfScheduleIndex];
 
 if (currentSchedule & BV(CRSF_FRAME_ATTITUDE_INDEX)) {
     ...
 }
 if (currentSchedule & BV(CRSF_FRAME_BATTERY_SENSOR_INDEX)) {
     ...
 }
 if (currentSchedule & BV(CRSF_FRAME_FLIGHT_MODE_INDEX)) {
     ...
 }
 ...
 if (currentSchedule & BV(CRSF_FRAME_VARIO_SENSOR_INDEX)) {
     ...
 }
 if (currentSchedule & BV(CRSF_FRAME_BAROMETER_ALTITUDE_INDEX)) {
     ...
 }

@sensei-hacker sensei-hacker added this to the 9.0 milestone Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants