diff --git a/docs/Telemetry.md b/docs/Telemetry.md index 05ab199082..b9871c58d1 100644 --- a/docs/Telemetry.md +++ b/docs/Telemetry.md @@ -107,7 +107,10 @@ Use the latest Graupner firmware for your transmitter and receiver. Older HoTT transmitters required the EAM and GPS modules to be enabled in the telemetry menu of the transmitter. (e.g. on MX-20) -Serial ports use two wires but HoTT uses a single wire so some electronics are required so that the signals don't get mixed up. The TX and RX pins of +You can connect HoTT-Telemetry in two ways: + +#### Old way: +Serial ports use two wires but HoTT uses a single wire so some electronics are required so that the signals don't get mixed up. The TX and RX pins of a serial port should be connected using a diode and a single wire to the `T` port on a HoTT receiver. Connect as follows: @@ -122,6 +125,11 @@ The diode should be arranged to allow the data signals to flow the right way ``` 1N4148 diodes have been tested and work with the GR-24. + +When using the diode disable `tlm_halfduplex`, go to CLI and type `set tlm_halfduplex = OFF`, don't forget a `save` afterwards. + +#### New way: +You can use a single connection, connect HoTT RX/TX only to serial TX, leave serial RX open and make sure `tlm_halfduplex` is ON. As noticed by Skrebber the GR-12 (and probably GR-16/24, too) are based on a PIC 24FJ64GA-002, which has 5V tolerant digital pins. diff --git a/src/main/fc/config.c b/src/main/fc/config.c index 55ddccd9b6..421af8c316 100644 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -213,16 +213,6 @@ static void validateAndFixConfig(void) if (featureConfigured(FEATURE_RX_PARALLEL_PWM)) { featureClear(FEATURE_RX_SERIAL | FEATURE_RX_MSP | FEATURE_RX_PPM | FEATURE_RX_SPI); -#if defined(STM32F10X) - // rssi adc needs the same ports - featureClear(FEATURE_RSSI_ADC); - // current meter needs the same ports - if (batteryConfig()->currentMeterSource == CURRENT_METER_ADC) { - batteryConfigMutable()->currentMeterSource = CURRENT_METER_NONE; - } -#endif // STM32F10X - // software serial needs free PWM ports - featureClear(FEATURE_SOFTSERIAL); } #ifdef USE_SOFTSPI diff --git a/src/main/flight/gps_rescue.c b/src/main/flight/gps_rescue.c index 3b089b90e0..792344f4b6 100644 --- a/src/main/flight/gps_rescue.c +++ b/src/main/flight/gps_rescue.c @@ -303,6 +303,11 @@ void idleTasks() return; } + // Don't update any rescue flight statistics if we haven't applied a proper altitude offset yet + if (!isAltitudeOffset()) { + return; + } + gpsRescueAngle[AI_PITCH] = 0; gpsRescueAngle[AI_ROLL] = 0; diff --git a/src/main/flight/position.c b/src/main/flight/position.c index 8d510e7f15..771baa0f04 100644 --- a/src/main/flight/position.c +++ b/src/main/flight/position.c @@ -44,12 +44,13 @@ static int32_t estimatedAltitude = 0; // in cm #if defined(USE_BARO) || defined(USE_GPS) +static bool altitudeOffsetSet = false; + void calculateEstimatedAltitude(timeUs_t currentTimeUs) { static timeUs_t previousTimeUs = 0; static int32_t baroAltOffset = 0; static int32_t gpsAltOffset = 0; - static bool altitudeOffsetSet = false; const uint32_t dTime = currentTimeUs - previousTimeUs; if (dTime < BARO_UPDATE_FREQUENCY_40HZ) { @@ -109,8 +110,12 @@ if (sensors(SENSOR_GPS) && STATE(GPS_FIX)) { DEBUG_SET(DEBUG_ALTITUDE, 1, baroAlt); DEBUG_SET(DEBUG_ALTITUDE, 2, gpsAlt); } -#endif +bool isAltitudeOffset(void) +{ + return altitudeOffsetSet; +} +#endif int32_t getEstimatedAltitude(void) { diff --git a/src/main/flight/position.h b/src/main/flight/position.h index af7a3b3eca..c7b98173b4 100644 --- a/src/main/flight/position.h +++ b/src/main/flight/position.h @@ -22,6 +22,7 @@ #include "common/time.h" +bool isAltitudeOffset(void); void calculateEstimatedAltitude(timeUs_t currentTimeUs); int32_t getEstimatedAltitude(void); int16_t getEstimatedVario(void); \ No newline at end of file