Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2020-03-25 12:33:53 +01:00
34 changed files with 788 additions and 497 deletions
+11
View File
@@ -150,6 +150,16 @@ enum FrSkyDataState {
#define ESC_RPM_CONS_LAST_ID 0x0B6f
#define ESC_TEMPERATURE_FIRST_ID 0x0B70
#define ESC_TEMPERATURE_LAST_ID 0x0B7f
#define RB3040_OUTPUT_FIRST_ID 0x0B80
#define RB3040_OUTPUT_LAST_ID 0x0B8F
#define RB3040_CH1_2_FIRST_ID 0x0B90
#define RB3040_CH1_2_LAST_ID 0x0B9F
#define RB3040_CH3_4_FIRST_ID 0x0BA0
#define RB3040_CH3_4_LAST_ID 0x0BAF
#define RB3040_CH5_6_FIRST_ID 0x0BB0
#define RB3040_CH5_6_LAST_ID 0x0BBF
#define RB3040_CH7_8_FIRST_ID 0x0BC0
#define RB3040_CH7_8_LAST_ID 0x0BCF
#define X8R_FIRST_ID 0x0c20
#define X8R_LAST_ID 0x0c2F
#define S6R_FIRST_ID 0x0c30
@@ -177,6 +187,7 @@ enum FrSkyDataState {
#define DIY_STREAM_FIRST_ID 0x5000
#define DIY_STREAM_LAST_ID 0x50FF
#define FACT_TEST_ID 0xF000
#define FRAME_LOSS_RATE_ID 0xF010
#define RSSI_ID 0xF101
#define ADC1_ID 0xF102
#define ADC2_ID 0xF103
+6
View File
@@ -86,6 +86,12 @@ void processReceiverSettingsFrame(uint8_t module, const uint8_t * frame)
if (frame[4] & PXX2_RX_SETTINGS_FLAG1_TELEMETRY_DISABLED)
destination->telemetryDisabled = 1;
if (frame[4] & PXX2_RX_SETTINGS_FLAG1_TELEMETRY_25MW)
destination->telemetry25mw = 1;
if (frame[4] & PXX2_RX_SETTINGS_FLAG1_ENABLE_PWM_CH5_CH6)
destination->enablePwmCh5Ch6 = 1;
uint8_t outputsCount = min<uint8_t>(16, frame[0] - 4);
destination->outputsCount = outputsCount;
for (uint8_t pin = 0; pin < outputsCount; pin++) {
+14
View File
@@ -30,6 +30,7 @@ struct FrSkySportSensor {
};
const FrSkySportSensor sportSensors[] = {
{ FRAME_LOSS_RATE_ID, FRAME_LOSS_RATE_ID, 0, ZSTR_FLR, UNIT_PERCENT, 0 },
{ RSSI_ID, RSSI_ID, 0, STR_SENSOR_RSSI, UNIT_DB, 0 },
#if defined(MULTIMODULE)
{ TX_RSSI_ID, TX_RSSI_ID, 0, STR_SENSOR_TX_RSSI , UNIT_DB , 0 },
@@ -84,6 +85,15 @@ const FrSkySportSensor sportSensors[] = {
{ GASSUIT_AVG_FLOW_FIRST_ID, GASSUIT_AVG_FLOW_LAST_ID, 0, STR_SENSOR_GASSUIT_AVG_FLOW, UNIT_MILLILITERS_PER_MINUTE, 0 },
{ SBEC_POWER_FIRST_ID, SBEC_POWER_LAST_ID, 0, STR_SENSOR_SBEC_VOLTAGE, UNIT_VOLTS, 2 },
{ SBEC_POWER_FIRST_ID, SBEC_POWER_LAST_ID, 1, STR_SENSOR_SBEC_CURRENT, UNIT_AMPS, 2 },
{ RB3040_OUTPUT_FIRST_ID, RB3040_OUTPUT_LAST_ID, 0, ZSTR_RB3040_EXTRA_STATE, UNIT_BITFIELD, 0 },
{ RB3040_CH1_2_FIRST_ID, RB3040_CH1_2_LAST_ID, 0, ZSTR_RB3040_CHANNEL1, UNIT_AMPS, 2 },
{ RB3040_CH1_2_FIRST_ID, RB3040_CH1_2_LAST_ID, 1, ZSTR_RB3040_CHANNEL2, UNIT_AMPS, 2 },
{ RB3040_CH3_4_FIRST_ID, RB3040_CH3_4_LAST_ID, 0, ZSTR_RB3040_CHANNEL3, UNIT_AMPS, 2 },
{ RB3040_CH3_4_FIRST_ID, RB3040_CH3_4_LAST_ID, 1, ZSTR_RB3040_CHANNEL4, UNIT_AMPS, 2 },
{ RB3040_CH5_6_FIRST_ID, RB3040_CH5_6_LAST_ID, 0, ZSTR_RB3040_CHANNEL5, UNIT_AMPS, 2 },
{ RB3040_CH5_6_FIRST_ID, RB3040_CH5_6_LAST_ID, 1, ZSTR_RB3040_CHANNEL6, UNIT_AMPS, 2 },
{ RB3040_CH7_8_FIRST_ID, RB3040_CH7_8_LAST_ID, 0, ZSTR_RB3040_CHANNEL7, UNIT_AMPS, 2 },
{ RB3040_CH7_8_FIRST_ID, RB3040_CH7_8_LAST_ID, 1, ZSTR_RB3040_CHANNEL8, UNIT_AMPS, 2 },
{ 0, 0, 0, NULL, UNIT_RAW, 0 } // sentinel
};
@@ -308,6 +318,10 @@ void sportProcessTelemetryPacketWithoutCrc(uint8_t origin, const uint8_t * packe
}
#endif
}
else if (dataId >= RB3040_CH1_2_FIRST_ID && dataId <= RB3040_CH7_8_LAST_ID) {
sportProcessTelemetryPacket(dataId, 0, instance, data & 0xffff);
sportProcessTelemetryPacket(dataId, 1, instance, (data >> 16u) & 0xffff);
}
else {
sportProcessTelemetryPacket(dataId, 0, instance, data);
}
+3
View File
@@ -24,6 +24,9 @@
#include "frsky.h"
#include "io/frsky_sport.h"
#include "crossfire.h"
#include "myeeprom.h"
#include "io/frsky_sport.h"
#if defined(MULTIMODULE)
#include "spektrum.h"
#include "flysky_ibus.h"
+1
View File
@@ -22,6 +22,7 @@
#define _TELEMETRY_HOLDERS_H_
#include <inttypes.h>
#include <string.h>
#include "../timers.h"
#define TELEMETRY_AVERAGE_COUNT 3 // we actually average one more reading!