-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Loiter direction #4036
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
Loiter direction #4036
Conversation
* Update pid.h * Update pid.c * Update navigation.h * Update navigation_fixedwing.c * Update Cli.md
| pt1FilterReset(&fwPosControllerCorrectionFilterState, 0.0f); | ||
| } | ||
|
|
||
| static int8_t loiterDirection(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is unnecessarily verbose to use a function for this. Could you define instead a variable at the beginning of calculateVirtualPositionTarget_FW like:
int8_t loiterDirectionSign = pidProfile()->loiter_direction == NAV_LOITER_LEFT ? -1 : 1;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to leave it in function because in the future I would like to:
have an option to change the direction ... wit a channel switch
have an option to change it in flight by using the rudder stick
Besides, I use it also in function updatePositionHeadingController_FW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hali9 That seems reasonable too
docs/Cli.md
Outdated
| | fw_iterm_throw_limit | 165 | Limits max/min I-term value in stabilization PID controller in case of Fixed Wing. It solves the problem of servo saturation before take-off/throwing the airplane into the air. By default, error accumulated in I-term can not exceed 1/3 of servo throw (around 165us). Set 0 to disable completely. | | ||
| | fw_reference_airspeed | 1000 | Reference airspeed. Set this to airspeed at which PIDs were tuned. Usually should be set to cruise airspeed. Also used for coordinated turn calculation if airspeed sensor is not present. | | ||
| | fw_turn_assist_yaw_gain | 1 | Gain required to keep the yaw rate consistent with the turn rate for a coordinated turn (in TURN_ASSIST mode). Value significantly different from 1.0 indicates a problem with the airspeed calibration (if present) or value of `fw_reference_airspeed` parameter | | ||
| | fw_loiter_direction | RIGHT | Direction of loitering: center point on right wing (clockwise - default), or center point on left wing (counterclockwise) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it is confusing to specify clockwise/counter-clockwise which is relative to the point of view. Center on right/left wing is enough and always the same no matter the point of view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it important to specify "clockwise / counter-clockwise" due to the author of the issue and to make it clear that the "clockwise" is on the right and the counter-clockwise on the left.
| .fixedWingItermThrowLimit = FW_ITERM_THROW_LIMIT_DEFAULT, | ||
| .fixedWingReferenceAirspeed = 1000, | ||
| .fixedWingCoordinatedYawGain = 1.0f, | ||
| .loiter_direction = NAV_LOITER_RIGHT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to increase the PG version. 4 to 5
PG_REGISTER_PROFILE_WITH_RESET_TEMPLATE(pidProfile_t, pidProfile, PG_PID_PROFILE, 4);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
shellixyz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Are you going to implement the direction change with an aux channel or rudder in this PR ?
|
I intend to implement it, but not in this PR, because there is no good weather to test it. |
|
I added a new box - LOITER CHANGE. It is active for airplane when poshold is active. |
|
@hali9 can you please rebase? |
digitalentity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Enforce spinup time even for idle throttle * Improve AHI: support for -180..180° roll angles (iNavFlight#3641) * Improve AHI: support for -180..180 roll angles * Improve AHI: configurable max pitch * Improve AHI: increase horizontal size * Improve AHI: add possibility to resize it easily * Use 5 bits to encode setting words Saves 1672 bits on F3 without any lost functionality. Retriving a setting name is significantly slower, but still not slow enough to be problematic. * CLI.md update * revierw changes * Add new target DALRCF722DUAL and add DALRCF405 board description Add new target DALRCF722DUAL and add DALRCF405 board description to development branch * Decrement rem_symbols when a symbol slot is used Spotted by @alexbirkett * [MATEKF722SE] Fix beeper; Enable LEDSTRIP * [FOXEERF405] Add new board, initial cut * Update README Quick update * [FOXEERF722DUAL] Initial cut on target * Add docs * [FOXEER] Enable DSHOT; Remap S5/S6 of F722 board to adopt 6-channel DSHOT * Port Betaflight fpv_mix_degrees setting and camera mix logic for acro mode * Fix incorrect return value in bitArrayFindFirstSet() when using non-zero start When the first bit set is in the same 4-byte group that the start (with start > 31), the returned index is off by the last multiple of 32 <= start. This could cause unnecessary updates in the OSD driver, since a non-dirty char would be actually updated while it hadn't changed. * Add bitarray functions for setting and clearing all the array - bitArraySetAll() and bitArrayClrAll() set and clear the whole array, with the size (in bytes) specified by the caller (to make them work like bitArrayFindFirstSet()) - macros BITARRAY_SET_ALL() and BITARRAY_CLR_ALL() call those two new functions using sizeof(array) as its size * Cleanup geo* functions - Rename gpsOrigin_s type to gpsOrigin_t - Make geo* conversion functions return wether they succeeded or not - Reorder geo* functions arguments to follow the (output, inputs) convention - Document all the geo* functions * Add navCalculatePathToDestination() function Calculates distance and bearing to the given location in local coordinate space. Added navDestinationPath_t, which encapsulates distance and bearing. Refactor calculateDistanceToDestination() and calculateBearingToDestination() a bit to move the calculations to static functions that can be reused by navCalculatePathTo() * Adding altitude / sea (MSL) * Update cms_menu_osd.c * [GPS] Improve handling of SBAS and GALILEO supportability; Increase GPS failure timeout * [F7] Move ADC to DMA2_Stream0; Clean up F7 timer DMA * [MATEKF722] Enable DSHOT; Remap outputs to be DSHOT-compatible * [FOXEERF722] Fix M4 for DSHOT * [F4] Move ADC to DMA2_Stream0 * Fix comment * [OMNIBUSF4] Enable DSHOT * [ASGARD] Enable DSHOT * [ASGARDF7] Fix M1 DMA for DSHOT * [ASGARD32F4] Fix M1 for DSHOT * LM75 I²C temperature sensor preliminary support * Max7456 symbols cleanup (v2) (iNavFlight#4122) * OSD symbols cleanup * Update osd.c * Output the number of bits used for encoding characters from settings.rb Instead of hardcoding the number of bits in both settings.c and settings.rb, make the latter output a constant to the settings_generated.h file. * Refactor code for locking access to MAX7456 to functions Rename max7456Lock var to max7455Mutex. Add max7456Lock(), max7456Unlock() and max7456TryLock(). * Add support for read/write MAX7456 NVM for chars > 256 Add max7456Character_t, which represents the data for character a single MAX7456 character. Use max7456Character_t to read and pass character data around. Change max7456WriteNvm() to accept a 2-byte character address. Change MSP handler for MSP_OSD_CHAR_WRITE to accept 2 byte character addresses. To keep backwards compatibility, check wether the caller sent 55 or 56 bytes. Add max7456ReadNvm() to read a character from the MAX7456 NVM, which will eventually be used for font metadata. * Add workaround for corrupted characters when uploading MAX7456 fonts Restore the previous behavior of rebooting after uploading characters, but add a comment explaining why it needs to be done. * Add support for OSD characters > 255, refactor MAX7456 Change display(Read|Write)Char* functions to use an uint16_t character. This lets callers which need characters > 255 use these functions, while keeping most strings in ASCII to save memory ( the string based functions still take a cosnt char *). Change display drivers to support 16 bit characters when writing a single character. Note that some drivers might silently truncate the character, it's the responsability of the caller to check wether the display supports characters > 255 (API will follow in the next commit). Refactor and cleanup the MAX7456 driver: - Move global state to a struct, for better encapsulation - Make max7456DrawScreenPartial() static, expose instead the new function max7456Update(), which calls max7456StallCheck() and max7456DrawScreenPartial() instead of doing all the work on a single function. - Rewrite max7456RefreshAll() to use HW based screen clearing, then leverage max7456DrawScreenPartial() to redraw only non-blank characters. This should make full screen redraws faster while reducing complexity and flash usage (we no longer have 2 paths for drawing). - Support writing characters > 255, switching to 8bit mode on demand. * Add support for font metadata, use it for detecting extended fonts Also, add boot logo on OSD when the font supports it. If the font is invalid or out of date, show an "INVALID FONT" message. * Call max7456Init() before displayInit() Otherwise the display initialization might call methods on the max7456 driver on an uninitialized device * Ensure the MAX7456 detects a valid signal before accepting it Code was not checking for the Loss-of-Sync bit, causing it to detect PAL too early in some cases. * Refactor the rest of the MAX7456 driver - Cleanup init sequence to perform as much initialization as possible in max7456Init(). - Initialize the OSD as soon as video sync is detected. If no video sync is detected at 1.5s, start as PAL but then continue probing until we find a valid video signal. - Wait for the software reset to finish during initialization. - Remove extern variable for maxScreenSize, replace it with max7456GetScreenSize(). - Make sure that when disabling the OSD for reading/writing to NVM we only enable it again if it was enabled before. - Rewrite prototypes in the header file to use the same style and formatting as the rest of the code. - Delay call to millis() in max7456StallCheck() to avoid calling it when it's not strictly needed. * Rename displayFontMetadata() to displayGetFontMetadata() * Add comment explaining the shift by 2 bits when writing to DMDI * Rename fontMetadata in display driver's vTable to getFontMetadata * smix reverse removed as obsolete * Align OSD_FLYMODE to 13th column by default Since OSD_FLYMODE is 4 characters and the display is 30 characters, to center it we should place it on the 13th instead of the 12th. * Enable MR Braking on Omnibus target * Fix fly time bug Closes iNavFlight#4141 * Enable pitot and LM75 temperature sensor on all targets >= F4 * [ADC] Implement ADC averaging on F7, enable ADC averaging on all targets * Enable LM75 temperature sensors on all targets >= F4 * fix * [F3] Remove some features; Reduce heap size * Re-enable SPRACINGF3NEO for automated builds * Add support for encoding coordinates with OLC Just encoding support and a few tests * fix 2 * Fix compilation warnings * Add OSD_PLUS_CODE Displays the +code of the current coordinates, saving a lot of screen space, while providing enough information to locate the vehicle. * fix 3 * [VTX] Remove VTX_COMMON which is always defined * [VTX] Initial cut on FFPV protocol * [VTX] Fix FFPV receiving code. Verified to work * [VTX/CMS] Add FFPV 2.4G VTX to CMS menu * [VTX/CMS] Missing files * [VTX] Remove FFPV VTX control from SPRACINGF3 NEO * Override the OSD layout for 10 seconds when configuring an item When configuring the OSD via MSP (e.g. from the configurator), the layout that was just altered is shown in the OSD for 10 seconds, regardless of the selected OSD layout via modes. This allows configuring the layouts when looking at them in the goggles while the radio is powered off. * Enable Feature Airmode by default * IMU orientation sanity check improvements * Refactor pitot tube sensor; Change filtering and defaults; Change I2C driver code to handle 0xFF register address; Better MS4525 sensor * [PITOT] Some refactoring * [NAV] Fix failsafe RTH getting stuck if RTH->other_NAV_mode transition is not handled * [MATEKF722SE] Enable DSHOT * Make sure olc_encode() uses the same units as the GPS Namely, 1e7. To accomplish this, we need to carefully convert the values to unsigned after the initial normalization, because OLC normalizes all values to lat to [0, 180] and lon to [0, 360] and 360 * 1e7 overflows an int32. Also, import all the tests from the original OLC C library. * Enable MSP_DISPLAYPORT on targets with flash > 128 and no OSD MSP_DISPLAYPORT is used to display CMS on MWOSD, which is useful for targets without a builtin OSD. Since those targets also have a bit more flash/ram to spare, we have room for this feature as long as no builtin OSD is present. * Loiter direction (iNavFlight#4036) * Loiter direction iNavFlight#3002 * Experimental biquad RC fitler instead of RC interpolation * [F3] Disable PCA9685 drifer for targets with <256K Flash (F3) * Disable PWM servo driver on SPRF3NEO * OSD fixing & into + Changed the "&" in CMS home, so it does not use ASCII char 38 that is actually the left side of the default crossair. * Adding the +code in the OSD arming screen * 1 extra row needed * Add MATEKF722SE to release targets * [USB] Increase CDC buffer on F7 boards to accomodate max MSP packet size * [RANGEFINDER] Enable rangefinder by default on all targets * [GPS] Change autobaud logic for UBX protocol to send baud change command in bulk * [AGL] Fix non-working AGL estimation * Updated target defaults for F722SE * Fix detection of NTSC signal after 1.5s Due to a logic error during refactor, signal was always being stored internally as PAL when more than 1.5s had elapsed since boot. The MAX7456 kept reporting that the signal was actually NTSC, causing the reinitialization sequence to trigger and the OSD to blink once every second, but since the data cached in RAM was always stored as PAL this continued forever. Fixes iNavFlight#4183 * Add flash blackbox to MATEKF722SE target * DSHOT enabled on AirbotF4 * Fix a few compilation warnings * [TARGET] MATEKF722MINI target (a variant of F722SE with SPIFLASH); A temporary solution until SPI mode is defined per device in device registry * Add support for generating debug ASM files during build time Generation is enabled by setting the environment variable GENERATE_ASM to 1. To avoid overwriting files generated by -save-objs, we use file.txt.S as the filename (-save-objs generates a file.s for each file.c, and using s and S would break on case insensitive filesystems). * TASK_VTXCTRL revert to 5Hz * Replace ABS(float) with fabsf(float) Disregarding loads and stores, fabfs() compiles to a single vabs.f32 instruction, which completes in 1 cycle. ABS(float), however, compiles to vcmpe.f32, a branch and vneg.f32, which needs 2 cycles + branching. The compiler is not able to perform this transformation because (f < 0 ? -f : f) doesn't always yield the absolute value for floats (e.g. ABS(-0) will yield -0). * [TIMER] Fix race condition in timer DMA * [DSHOT] Make sure DSHOT scheduler doesn't use stale currentTimeUs * Add missing files for MATEKF722MINI * Fix Fake GPS * Change previousHeadingError type from float to int32_t * Fix compilation without USE_DTERM_NOTCH notchFilterApplyFn is only defined when USE_DTERM_NOTCH is enabled * [NAV] Restrict MC RoC/RoD rate-limiting to the case where we actually accelerate * [I2C] Make usage of 0xFF register address to access bus directly per-device setting * Use signbit() * Fix SoftI2C * Replace old wind estimation reference * Invalid value spacing * Update Cli.md Remove ASYNC traces * Delete looptime.md Looptime.md does not provide useful infos once we have dropped ASYNC * [VL53L0X] Fix infinite timeout (hang) during init * Only use BOOTLOG on 256K+ targets (F4 and above); Enable debug-trace on VCP by default (don't enable the feature) * [CALIBRATION] Separate library for zero calibration with variance calculation (time based, with retry); Migrate GYRO and ACC to new calibration; Implement movement threshold for acc calibration to discard shaky measurements * [UNIT] Fix unittests and related bugs * [BARO] Migrate to new calibration framework * [PITOT] Migrate pitot to new calibration * [NAV] Migrate gravity calibration to new framework * fix for decimal value of battery voltage (in cli-status and oled display) * Check the correct bit in VM0 to detect screen size Check VM0 against VIDEO_MODE_PAL (bit 6 = 1). Previous check was a typo that always returned true. Fixes iNavFlight#4268 * Rangefinder enabled for MATEKF405SE on bus i2c-2 * MSP safety fixes (iNavFlight#4281) * add DSHOT setings to cli documentation * Update Cli.md * increase bbl denom range (cleanup) * fixes iNavFlight#4288 * Update Board - Matek F411 Wing.md * Fix MATEKF411_SFTSRL2 softserial (iNavFlight#4315) * Update Controls.md * Update StickPositions images * Used the svg source and then built the png * Change something to get Travis CI unstuck * Change something to get Travis CI unstuck * Revert inscape settings * Add 1-Wire support through the DS2482 IF chip * Add driver for the DS18B20 1-Wire temperature sensors * Improve temperature framework - Support for multiple LM75 sensors - Support for the DS18B20 sensors - CLI command temp_sensor to configure sensors - Logging of all temperature sensor values - Display of all temperature sensor values on the OSD with support for alarms - New MSP messages to query and set sensor configuration and read temperatures * Enable 1-Wire and DS18B20 temp sensors on all F4 and F7 targets * Couple fixes * Add generic 1-Wire interface, use camel case and clean DS18B20 driver * Use ptThreads for reading temp sensors * 1-Wire add macros * DS18B20 delay tweak * ds2482OwMatchRomCommand fix * DS18B20 factorize * Increase servo mix max rate (iNavFlight#4306) * Update RSSI source when rssi_channel changes via MSP (iNavFlight#4307) Otherwise RSSI will not work until next reboot when channel is changed from/to none. * MSP over TBS Crossfire (iNavFlight#4094) * MSP over Crossfire CRSF protocol * Added crsfFrameDeviceInfo * Made WAIT more correct, added althold and home reset * Fixed indentation * Update config.h * Changes for fiam * Remove `boardIdentifier` from config * Use TARGET_BOARD_IDENTIFIER directly * Update target.h * Disable pitot on SP Racing F3 NEO * Remove duplicate defines * OSD, adding the "near home" icon (iNavFlight#4256) When the aircraft is closer than min_rth_distance, the arrow to home is replaced by a different icon to show close home proximity. Using OSD char n°122 * Nox board support (iNavFlight#4216) * Add NOX target to release (iNavFlight#4331) * Some temperature changes * Fix logging of total PID output to BB log; Add a lot of debug logging via a GENERIC logging type * Make blackbox-logged stateFlags 32-bit wide * Move braking mode code to multicopter-specific code; Fix issue with incorrect boostFactor calculation; Make sure braking mode is correctly reset when we switch out of navitation modes or reset position controller * Remove excess debug logging of VelXY controller * Temperature sensor: DS18B20: don't wait for SkipRom before conversion * Add temperature sensors documentation (iNavFlight#4338) * Fix temp sensors label (iNavFlight#4339) * Minor temperature label handling improvement (iNavFlight#4346) * Improve temperature sensors documentation (iNavFlight#4347)
* [ASGARD32F4] Fix M1 for DSHOT * LM75 I²C temperature sensor preliminary support * Max7456 symbols cleanup (v2) (iNavFlight#4122) * OSD symbols cleanup * Update osd.c * Output the number of bits used for encoding characters from settings.rb Instead of hardcoding the number of bits in both settings.c and settings.rb, make the latter output a constant to the settings_generated.h file. * Refactor code for locking access to MAX7456 to functions Rename max7456Lock var to max7455Mutex. Add max7456Lock(), max7456Unlock() and max7456TryLock(). * Add support for read/write MAX7456 NVM for chars > 256 Add max7456Character_t, which represents the data for character a single MAX7456 character. Use max7456Character_t to read and pass character data around. Change max7456WriteNvm() to accept a 2-byte character address. Change MSP handler for MSP_OSD_CHAR_WRITE to accept 2 byte character addresses. To keep backwards compatibility, check wether the caller sent 55 or 56 bytes. Add max7456ReadNvm() to read a character from the MAX7456 NVM, which will eventually be used for font metadata. * Add workaround for corrupted characters when uploading MAX7456 fonts Restore the previous behavior of rebooting after uploading characters, but add a comment explaining why it needs to be done. * Add support for OSD characters > 255, refactor MAX7456 Change display(Read|Write)Char* functions to use an uint16_t character. This lets callers which need characters > 255 use these functions, while keeping most strings in ASCII to save memory ( the string based functions still take a cosnt char *). Change display drivers to support 16 bit characters when writing a single character. Note that some drivers might silently truncate the character, it's the responsability of the caller to check wether the display supports characters > 255 (API will follow in the next commit). Refactor and cleanup the MAX7456 driver: - Move global state to a struct, for better encapsulation - Make max7456DrawScreenPartial() static, expose instead the new function max7456Update(), which calls max7456StallCheck() and max7456DrawScreenPartial() instead of doing all the work on a single function. - Rewrite max7456RefreshAll() to use HW based screen clearing, then leverage max7456DrawScreenPartial() to redraw only non-blank characters. This should make full screen redraws faster while reducing complexity and flash usage (we no longer have 2 paths for drawing). - Support writing characters > 255, switching to 8bit mode on demand. * Add support for font metadata, use it for detecting extended fonts Also, add boot logo on OSD when the font supports it. If the font is invalid or out of date, show an "INVALID FONT" message. * Call max7456Init() before displayInit() Otherwise the display initialization might call methods on the max7456 driver on an uninitialized device * Ensure the MAX7456 detects a valid signal before accepting it Code was not checking for the Loss-of-Sync bit, causing it to detect PAL too early in some cases. * Refactor the rest of the MAX7456 driver - Cleanup init sequence to perform as much initialization as possible in max7456Init(). - Initialize the OSD as soon as video sync is detected. If no video sync is detected at 1.5s, start as PAL but then continue probing until we find a valid video signal. - Wait for the software reset to finish during initialization. - Remove extern variable for maxScreenSize, replace it with max7456GetScreenSize(). - Make sure that when disabling the OSD for reading/writing to NVM we only enable it again if it was enabled before. - Rewrite prototypes in the header file to use the same style and formatting as the rest of the code. - Delay call to millis() in max7456StallCheck() to avoid calling it when it's not strictly needed. * Rename displayFontMetadata() to displayGetFontMetadata() * Add comment explaining the shift by 2 bits when writing to DMDI * Rename fontMetadata in display driver's vTable to getFontMetadata * smix reverse removed as obsolete * Align OSD_FLYMODE to 13th column by default Since OSD_FLYMODE is 4 characters and the display is 30 characters, to center it we should place it on the 13th instead of the 12th. * Enable MR Braking on Omnibus target * Fix fly time bug Closes iNavFlight#4141 * Enable pitot and LM75 temperature sensor on all targets >= F4 * [ADC] Implement ADC averaging on F7, enable ADC averaging on all targets * Enable LM75 temperature sensors on all targets >= F4 * fix * [F3] Remove some features; Reduce heap size * Re-enable SPRACINGF3NEO for automated builds * Add support for encoding coordinates with OLC Just encoding support and a few tests * fix 2 * Fix compilation warnings * Add OSD_PLUS_CODE Displays the +code of the current coordinates, saving a lot of screen space, while providing enough information to locate the vehicle. * fix 3 * [VTX] Remove VTX_COMMON which is always defined * [VTX] Initial cut on FFPV protocol * [VTX] Fix FFPV receiving code. Verified to work * [VTX/CMS] Add FFPV 2.4G VTX to CMS menu * [VTX/CMS] Missing files * [VTX] Remove FFPV VTX control from SPRACINGF3 NEO * Override the OSD layout for 10 seconds when configuring an item When configuring the OSD via MSP (e.g. from the configurator), the layout that was just altered is shown in the OSD for 10 seconds, regardless of the selected OSD layout via modes. This allows configuring the layouts when looking at them in the goggles while the radio is powered off. * Enable Feature Airmode by default * IMU orientation sanity check improvements * Refactor pitot tube sensor; Change filtering and defaults; Change I2C driver code to handle 0xFF register address; Better MS4525 sensor * [PITOT] Some refactoring * [NAV] Fix failsafe RTH getting stuck if RTH->other_NAV_mode transition is not handled * [MATEKF722SE] Enable DSHOT * Make sure olc_encode() uses the same units as the GPS Namely, 1e7. To accomplish this, we need to carefully convert the values to unsigned after the initial normalization, because OLC normalizes all values to lat to [0, 180] and lon to [0, 360] and 360 * 1e7 overflows an int32. Also, import all the tests from the original OLC C library. * Enable MSP_DISPLAYPORT on targets with flash > 128 and no OSD MSP_DISPLAYPORT is used to display CMS on MWOSD, which is useful for targets without a builtin OSD. Since those targets also have a bit more flash/ram to spare, we have room for this feature as long as no builtin OSD is present. * Loiter direction (iNavFlight#4036) * Loiter direction iNavFlight#3002 * Experimental biquad RC fitler instead of RC interpolation * [F3] Disable PCA9685 drifer for targets with <256K Flash (F3) * Disable PWM servo driver on SPRF3NEO * OSD fixing & into + Changed the "&" in CMS home, so it does not use ASCII char 38 that is actually the left side of the default crossair. * Adding the +code in the OSD arming screen * 1 extra row needed * Add MATEKF722SE to release targets * [USB] Increase CDC buffer on F7 boards to accomodate max MSP packet size * [RANGEFINDER] Enable rangefinder by default on all targets * [GPS] Change autobaud logic for UBX protocol to send baud change command in bulk * [AGL] Fix non-working AGL estimation * Updated target defaults for F722SE * Fix detection of NTSC signal after 1.5s Due to a logic error during refactor, signal was always being stored internally as PAL when more than 1.5s had elapsed since boot. The MAX7456 kept reporting that the signal was actually NTSC, causing the reinitialization sequence to trigger and the OSD to blink once every second, but since the data cached in RAM was always stored as PAL this continued forever. Fixes iNavFlight#4183 * Add flash blackbox to MATEKF722SE target * DSHOT enabled on AirbotF4 * Fix a few compilation warnings * [TARGET] MATEKF722MINI target (a variant of F722SE with SPIFLASH); A temporary solution until SPI mode is defined per device in device registry * Add support for generating debug ASM files during build time Generation is enabled by setting the environment variable GENERATE_ASM to 1. To avoid overwriting files generated by -save-objs, we use file.txt.S as the filename (-save-objs generates a file.s for each file.c, and using s and S would break on case insensitive filesystems). * TASK_VTXCTRL revert to 5Hz * Replace ABS(float) with fabsf(float) Disregarding loads and stores, fabfs() compiles to a single vabs.f32 instruction, which completes in 1 cycle. ABS(float), however, compiles to vcmpe.f32, a branch and vneg.f32, which needs 2 cycles + branching. The compiler is not able to perform this transformation because (f < 0 ? -f : f) doesn't always yield the absolute value for floats (e.g. ABS(-0) will yield -0). * [TIMER] Fix race condition in timer DMA * [DSHOT] Make sure DSHOT scheduler doesn't use stale currentTimeUs * Add missing files for MATEKF722MINI * Fix Fake GPS * Change previousHeadingError type from float to int32_t * Fix compilation without USE_DTERM_NOTCH notchFilterApplyFn is only defined when USE_DTERM_NOTCH is enabled * [NAV] Restrict MC RoC/RoD rate-limiting to the case where we actually accelerate * [I2C] Make usage of 0xFF register address to access bus directly per-device setting * Use signbit() * Fix SoftI2C * Replace old wind estimation reference * Invalid value spacing * Update Cli.md Remove ASYNC traces * Delete looptime.md Looptime.md does not provide useful infos once we have dropped ASYNC * [VL53L0X] Fix infinite timeout (hang) during init * Only use BOOTLOG on 256K+ targets (F4 and above); Enable debug-trace on VCP by default (don't enable the feature) * [CALIBRATION] Separate library for zero calibration with variance calculation (time based, with retry); Migrate GYRO and ACC to new calibration; Implement movement threshold for acc calibration to discard shaky measurements * [UNIT] Fix unittests and related bugs * [BARO] Migrate to new calibration framework * [PITOT] Migrate pitot to new calibration * [NAV] Migrate gravity calibration to new framework * fix for decimal value of battery voltage (in cli-status and oled display) * Check the correct bit in VM0 to detect screen size Check VM0 against VIDEO_MODE_PAL (bit 6 = 1). Previous check was a typo that always returned true. Fixes iNavFlight#4268 * Rangefinder enabled for MATEKF405SE on bus i2c-2 * MSP safety fixes (iNavFlight#4281) * add DSHOT setings to cli documentation * Update Cli.md * increase bbl denom range (cleanup) * fixes iNavFlight#4288 * Update Board - Matek F411 Wing.md * Fix MATEKF411_SFTSRL2 softserial (iNavFlight#4315) * Update Controls.md * Update StickPositions images * Used the svg source and then built the png * Change something to get Travis CI unstuck * Change something to get Travis CI unstuck * Revert inscape settings * Add 1-Wire support through the DS2482 IF chip * Add driver for the DS18B20 1-Wire temperature sensors * Improve temperature framework - Support for multiple LM75 sensors - Support for the DS18B20 sensors - CLI command temp_sensor to configure sensors - Logging of all temperature sensor values - Display of all temperature sensor values on the OSD with support for alarms - New MSP messages to query and set sensor configuration and read temperatures * Enable 1-Wire and DS18B20 temp sensors on all F4 and F7 targets * Couple fixes * Add generic 1-Wire interface, use camel case and clean DS18B20 driver * Use ptThreads for reading temp sensors * 1-Wire add macros * DS18B20 delay tweak * ds2482OwMatchRomCommand fix * DS18B20 factorize * Increase servo mix max rate (iNavFlight#4306) * Update RSSI source when rssi_channel changes via MSP (iNavFlight#4307) Otherwise RSSI will not work until next reboot when channel is changed from/to none. * MSP over TBS Crossfire (iNavFlight#4094) * MSP over Crossfire CRSF protocol * Added crsfFrameDeviceInfo * Made WAIT more correct, added althold and home reset * Fixed indentation * Update config.h * Changes for fiam * Remove `boardIdentifier` from config * Use TARGET_BOARD_IDENTIFIER directly * Update target.h * Disable pitot on SP Racing F3 NEO * Remove duplicate defines * OSD, adding the "near home" icon (iNavFlight#4256) When the aircraft is closer than min_rth_distance, the arrow to home is replaced by a different icon to show close home proximity. Using OSD char n°122 * Nox board support (iNavFlight#4216) * Add NOX target to release (iNavFlight#4331) * Some temperature changes * Fix logging of total PID output to BB log; Add a lot of debug logging via a GENERIC logging type * Make blackbox-logged stateFlags 32-bit wide * Move braking mode code to multicopter-specific code; Fix issue with incorrect boostFactor calculation; Make sure braking mode is correctly reset when we switch out of navitation modes or reset position controller * Remove excess debug logging of VelXY controller * Temperature sensor: DS18B20: don't wait for SkipRom before conversion * Add temperature sensors documentation (iNavFlight#4338) * Fix temp sensors label (iNavFlight#4339) * Minor temperature label handling improvement (iNavFlight#4346) * Add new target WingFC Where to buy: https://inavflight.com/shop/s/bg/1318626 Closes iNavFlight#4337 * Improve temperature sensors documentation (iNavFlight#4347) * [BARO] Relax baro calibration threshold; Make it a configurable option * Fix missing min/max ranges for baro_cal_tolerance * Change default value * update Cli.md for post RC3 options * Add missing target/FF_F35_LIGHTNING/WINGFC.mk (iNavFlight#4360) * Update RX documentation * Remove mention of the rxfail command * Fix grammar * Add MATEKF722_HEXSERVO to release targets * CLI doc: specify fw_min_throttle_down_pitch units * Add OMNIBUSF4V6 target (iNavFlight#4369) * Add OMNIBUSF4V6 target * Update docs (iNavFlight#4373) * Update Display documentation The feature name for enabling the display is not DISPLAY it is DASHBOARD * Fix controls documentation * Prevent unexpected takeoff in RTH LANDED state. * [IMU] Decouple Mag/CoG; Prefer MAG if available, if not - use CoG * [IMU] Post-review cleanups * Correct typo in docs/Battery.md * Rewrite mixer documentation * Add docs/Servo.md * Added DSHOT to SPRACINGF7DUAL target - Added #define USE_DSHOT to SPRACINGF7DUAL target.h * Don't use POS and YAW controller when landed. * [ACC] Accept up to 5% variance in accelerometer readings when calibrating * Update target.c Fixed an issue where motor 2 would not spin up. * Fix gimbal (iNavFlight#4398) Pitch only goes from -90° to 90° * New temperature related OSD features + bugfix (iNavFlight#4407) * Add symbols for OSD temperature sensor values * Add OSD setting to chose temperature sensor label alignment * Update temperature sensor documentation * Fix buffer overflow in osdDisplayTemperature * Skip temperature sensor OSD elements if USE_TEMPERATURE_SENSOR is not defined * Fixed PWM mapping and timers for KFC32F3_INAV * Update CLI documentation
|
@hali9 or anyone here. Have any of you tried this feature? Specifically the YAW stick activation of the loiter direction change. I can't get it to operate by the YAW stick. The stick will just change the planes loiter direction until i release the rudder stick. Then it continues to loiter CW (default right). |
|
Did You set in cli? |
|
I have tested this, but not extensively. Could it be that you yaw channel center is a little to the right? |
|
@hali9 @avsaase Thanks for the feedback. This is with 2.6. I was hoping that I had overlooked something. Next time I go out in a few days. I will try the function via mode switch selection. |
|
@hali9 I tested out this function today via modes switch and it worked fine. I did notice it takes about 180° of loiter circuit after the mode switch it triggered, before the loiter direction changes. Can I ask how the activation takes place. Does the stick have to be held for a time? Does the stick have to be moved full deflection? Does it matter if the stick is moved right or left to activate it? Thanks |
Implement #3002
I was test it on SPRacingF3.