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

GOV MODE SENSOR #89

Merged
merged 7 commits into from
Mar 27, 2024
Merged

Conversation

robthomson
Copy link
Contributor

Added sensor 0x5450 to send governor status to frsky as

0 - OFF
1 - IDLE
2 - SPOOLUP
3 - RECOVERY
4 - ACTIVE
5 - THR-OFF
6 - LOST-HS
7 - AUTOROT
8 - BAILOUT
100 - DISABLED
101 - DISARMED

@rotorflight rotorflight force-pushed the RF-4.3.X-FRSKYSENSORS branch from ee7b45d to 56dbede Compare March 22, 2024 19:57
Copy link
Owner

@rotorflight rotorflight left a comment

Choose a reason for hiding this comment

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

Please see the comments

src/main/telemetry/smartport.c Outdated Show resolved Hide resolved
@@ -426,6 +437,8 @@ static void initSmartPortSensors(void)
ADD_SENSOR(FSSP_DATAID_ADJVALUE);
}



Copy link
Owner

Choose a reason for hiding this comment

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

Please remove unnecessary empty lines

src/main/telemetry/smartport.c Outdated Show resolved Hide resolved
Added sensor 0x5450 to send governor status to frsky as

0 - OFF
1 - IDLE
2 - SPOOLUP
3 - RECOVERY
4 - ACTIVE
5 - THR-OFF
6 - LOST-HS
7 - AUTOROT
8 - BAILOUT
100 - DISABLED
101 - DISARMED
…bthomson/rotorflight-firmware into RF-4.3.X-FRSKYSENSORS"

This reverts commit e7f345b, reversing
changes made to ee7b45d.
@robthomson robthomson force-pushed the RF-4.3.X-FRSKYSENSORS branch from 133481d to 6052425 Compare March 22, 2024 21:21
Removed whitespace and renamed sensor id to be more descriptive
@robthomson
Copy link
Contributor Author

Should all be ok now

Copy link
Owner

@rotorflight rotorflight left a comment

Choose a reason for hiding this comment

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

minor fix needed

@@ -130,6 +132,7 @@ enum
FSSP_DATAID_ADJFUNC = 0x5110 , // custom
FSSP_DATAID_ADJVALUE = 0x5111 , // custom
FSSP_DATAID_CAP_USED = 0x5250 ,
FSSP_DATAID_GOV_MODE = 0x5450 , //custom
Copy link
Owner

Choose a reason for hiding this comment

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

Can you keep the = aligned...

@@ -157,7 +160,7 @@ enum
};

// if adding more sensors then increase this value (should be equal to the maximum number of ADD_SENSOR calls)
#define MAX_DATAIDS 24
#define MAX_DATAIDS 26
Copy link
Owner

Choose a reason for hiding this comment

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

You added one sensor. Why increasing this +2 ?

Copy link
Owner

@rotorflight rotorflight left a comment

Choose a reason for hiding this comment

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

Add a telemetry sensor enable for the gov status

@@ -331,6 +334,9 @@ static void initSmartPortSensors(void)
{
frSkyDataIdTableInfo.index = 0;

//prob need configurator option for these?
Copy link
Owner

Choose a reason for hiding this comment

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

That's right, you need to add a telemetry "sensor" for this.

Enabled via:

set telemetry_enable_gov_mode = ON
@rotorflight rotorflight merged commit c4cb69d into rotorflight:master Mar 27, 2024
1 check passed
rotorflight pushed a commit that referenced this pull request Mar 27, 2024
Added sensor 0x5450 to send governor status to frsky as

0 - OFF
1 - IDLE
2 - SPOOLUP
3 - RECOVERY
4 - ACTIVE
5 - THR-OFF
6 - LOST-HS
7 - AUTOROT
8 - BAILOUT
100 - DISABLED
101 - DISARMED

Enabled via:

set telemetry_enable_gov_mode = ON
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request Apr 15, 2024
* master:
  Fix Kontronik telemetry protocol (rotorflight#98)
  Update README.md
  Add Horizon mode inverted self-leveling
  Add CI or PR to the firmware extra version string
  OpenYGE - fix: address possible buffer underflow condition, add 2nd paranoid frame length validation outside ISR/callback (rotorflight#96)
  Fix RPM filter error check with Direct Drive motors (rotorflight#94)
  Fix TTA headroom calculation in Gov Passthrough (rotorflight#92)
  Add GOV_MODE FrSky telemetry sensor (rotorflight#89)
  Add github workflows for CI builds
  OpenYGE - fix to support v3 frame header extension (rotorflight#87)
  chore: fixed scale lights terminology (rotorflight#85)
  Add Releases.md
  Update github workflows
  Reduce default smoothing level
  Simplify RC frame rate calculation
  Change default PID D-gains
  Change default motor protocol to PWM
  Add 'mixer reset' to mixer CLI help

# Conflicts:
#	src/main/sensors/esc_sensor.c
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request Apr 15, 2024
* esc_sensor_data_plus: (21 commits)
  RFF-78 - escSensorData - added .throttle to. capture input setpoint as reported by ESC
  Fix Kontronik telemetry protocol (rotorflight#98)
  Update README.md
  Add Horizon mode inverted self-leveling
  Add CI or PR to the firmware extra version string
  OpenYGE - fix: address possible buffer underflow condition, add 2nd paranoid frame length validation outside ISR/callback (rotorflight#96)
  Fix RPM filter error check with Direct Drive motors (rotorflight#94)
  Fix TTA headroom calculation in Gov Passthrough (rotorflight#92)
  Add GOV_MODE FrSky telemetry sensor (rotorflight#89)
  Add github workflows for CI builds
  OpenYGE - telemetry - BEC voltage and current fix
  OpenYGE - fix to support v3 frame header extension (rotorflight#87)
  OpenYGE - support v3 frame header extension - documentation
  chore: fixed scale lights terminology (rotorflight#85)
  Add Releases.md
  Update github workflows
  Reduce default smoothing level
  Simplify RC frame rate calculation
  Change default PID D-gains
  Change default motor protocol to PWM
  ...

# Conflicts:
#	src/main/sensors/esc_sensor.c
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request Apr 15, 2024
* esc_sensor_data_plus: (21 commits)
  RFF-78 - escSensorData - added .throttle to. capture input setpoint as reported by ESC
  Fix Kontronik telemetry protocol (rotorflight#98)
  Update README.md
  Add Horizon mode inverted self-leveling
  Add CI or PR to the firmware extra version string
  OpenYGE - fix: address possible buffer underflow condition, add 2nd paranoid frame length validation outside ISR/callback (rotorflight#96)
  Fix RPM filter error check with Direct Drive motors (rotorflight#94)
  Fix TTA headroom calculation in Gov Passthrough (rotorflight#92)
  Add GOV_MODE FrSky telemetry sensor (rotorflight#89)
  Add github workflows for CI builds
  OpenYGE - telemetry - BEC voltage and current fix
  OpenYGE - fix to support v3 frame header extension (rotorflight#87)
  OpenYGE - support v3 frame header extension - documentation
  chore: fixed scale lights terminology (rotorflight#85)
  Add Releases.md
  Update github workflows
  Reduce default smoothing level
  Simplify RC frame rate calculation
  Change default PID D-gains
  Change default motor protocol to PWM
  ...

# Conflicts:
#	src/main/sensors/esc_sensor.c
bob01 added a commit to bob01/rotorflight-firmware that referenced this pull request Apr 15, 2024
* esc_sensor_hd: (24 commits)
  CRSF - reuse - minor code consistency - missing comma
  CRSF - reuse - expose additional ESC sources on ATT 16-bit sensors - not enough room on GPS sensors
  REUSE - added BEC, BUS, MPU voltage sources to GPS sensor options
  RFF-78 - escSensorData - added .throttle to. capture input setpoint as reported by ESC
  Fix Kontronik telemetry protocol (rotorflight#98)
  Update README.md
  Add Horizon mode inverted self-leveling
  Add CI or PR to the firmware extra version string
  OpenYGE - fix: address possible buffer underflow condition, add 2nd paranoid frame length validation outside ISR/callback (rotorflight#96)
  Fix RPM filter error check with Direct Drive motors (rotorflight#94)
  Fix TTA headroom calculation in Gov Passthrough (rotorflight#92)
  Add GOV_MODE FrSky telemetry sensor (rotorflight#89)
  Add github workflows for CI builds
  OpenYGE - telemetry - BEC voltage and current fix
  OpenYGE - fix to support v3 frame header extension (rotorflight#87)
  OpenYGE - support v3 frame header extension - documentation
  chore: fixed scale lights terminology (rotorflight#85)
  Add Releases.md
  Update github workflows
  Reduce default smoothing level
  ...

# Conflicts:
#	src/main/cli/settings.c
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