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

Release 6.0 #8763

Merged
merged 64 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
cc8df40
Add GEPRC new target "GEPRC_F722_AIO"
YI-BOYANG Nov 21, 2022
7e564b3
Corrected the project name .
YI-BOYANG Nov 21, 2022
66c2a8f
Corrected the project name .
YI-BOYANG Nov 21, 2022
0e796a7
ESP32 Radar: Replace side arrows with cardinal indicator
MrD-RC Jul 15, 2022
8112c8d
Improvements
MrD-RC Jul 15, 2022
285fa9b
Updates after flight test
MrD-RC Jul 16, 2022
01bb69b
Added OSD symbol for pan servo offset
MrD-RC Jul 18, 2022
10ebb5c
Added customisations and options
MrD-RC Jul 19, 2022
a29726c
Updated docs
MrD-RC Jul 20, 2022
8c46e5a
PG bump
MrD-RC Jul 20, 2022
88b17e3
Update settings.yaml
MrD-RC Jul 20, 2022
7649c5f
Updated the `osd_pan_servo_index` max to 16
MrD-RC Jul 20, 2022
64b23db
Fixed a miscopy/paste
MrD-RC Jul 22, 2022
40cce65
Fixed incorrect degrees in centre position
MrD-RC Oct 2, 2022
3b13709
Reverse pan direction of offset OSD element
MrD-RC Jan 20, 2023
e97c7a6
Add a mapping for 3D kph and mph symbols
DzikuVx Feb 2, 2023
1a75f11
Merge pull request #8699 from iNavFlight/MrD_ESP32-Radar-use-cardinal…
MrD-RC Feb 5, 2023
d4cdab4
Initial test setup
mmosca Feb 7, 2023
445b4e8
Move format centi function to a separate ifdef
mmosca Feb 7, 2023
92ec1db
Change ifdef for easier unit testing
mmosca Feb 7, 2023
6665b6a
Tests are running
mmosca Feb 7, 2023
ad219fa
Unit tests to valid issue
mmosca Feb 7, 2023
24bbe6e
Handle special case when only . is left to keep numbers aligned to th…
mmosca Feb 7, 2023
bd3caf6
Add comment
mmosca Feb 7, 2023
595b17b
formatting changes
mmosca Feb 7, 2023
f727232
Move things around for build.
mmosca Feb 7, 2023
14404e0
Cleanup changes and move testable code to a separate file
mmosca Feb 8, 2023
994e0b2
Cleanup includes
mmosca Feb 8, 2023
2113217
Merge pull request #8776 from iNavFlight/mosca-8769-bf43compat-curren…
DzikuVx Feb 8, 2023
7dcf095
Simplify and fix altitude processing for BF43COMPAT
DzikuVx Feb 8, 2023
4f7dc8e
Fix casting
DzikuVx Feb 8, 2023
92b237e
Merge pull request #8779 from iNavFlight/dzikuvx-simplified-altitude-…
DzikuVx Feb 8, 2023
c352dcf
Update cms.c
breadoven Feb 12, 2023
507f61d
Update Programming Framework.md
MrD-RC Feb 13, 2023
eba9413
Merge pull request #8797 from iNavFlight/MrD_Extended-PF-docs
MrD-RC Feb 13, 2023
1754be6
Merge pull request #8793 from breadoven/abo_cms_eeprom_save_fix
breadoven Feb 13, 2023
aadf5ec
Update Temperature sensors - add picture to docs
WizzX-FPV Feb 15, 2023
2cad65a
Make CLI string input uppercase
MrD-RC Feb 16, 2023
df2dd92
Merge pull request #8804 from iNavFlight/MrD_Force-string-input-for-p…
MrD-RC Feb 18, 2023
2941f7b
OSD updated leveltrim
tiriad Feb 19, 2023
e2810cc
Add files via upload
WizzX-FPV Feb 19, 2023
2fd91cc
Delete 218416736-b30f364f-aaeb-426e-b211-ea7ef1f3c20e.png
WizzX-FPV Feb 19, 2023
877d3bb
Update Temperature sensors.md
WizzX-FPV Feb 19, 2023
2fa94c5
Update Temperature sensors.md
WizzX-FPV Feb 19, 2023
5f0d902
add icm42688p support in MATEKF405SE target
MATEKSYS Feb 21, 2023
e64fd86
Merge pull request #8811 from WizzX-FPV/master
DzikuVx Feb 21, 2023
6200bb8
Update navigation_multicopter.c
breadoven Feb 21, 2023
2dc400c
Add AUTOLEVEL message and updated pitch trim
tiriad Feb 21, 2023
fc978a9
Merge pull request #8813 from breadoven/abo_landing_detection_failsaf…
DzikuVx Feb 22, 2023
feb65f1
Merge pull request #8812 from MATEKSYS/MATEKF405SE_42688
DzikuVx Feb 22, 2023
ef03605
Bugfix
Scavanger Feb 22, 2023
db9911a
Merge pull request #8821 from Scavanger/ContinuousServoAutotrim-Fix-I…
DzikuVx Feb 23, 2023
aa999a6
Improved wind estimator - stale reading state
MrD-RC Feb 27, 2023
f47851b
Merge pull request #8832 from iNavFlight/MrD_Fix-wind-estimator-units…
MrD-RC Feb 27, 2023
78b2fad
AXISFLYINGF7PRO target
nmaggioni Feb 27, 2023
eaf4f6b
Merge pull request #8831 from nmaggioni/nm_axisflying_f7pro
DzikuVx Mar 1, 2023
33223a6
Merge pull request #8815 from tiriad/Updated-level-trim-OSD-field-and…
DzikuVx Mar 1, 2023
f71f2c3
Add MSP_BATTERY_STATE
mmosca Mar 2, 2023
f3c8bd0
Merge pull request #8846 from iNavFlight/mmosca-8840-o3-battery-volta…
DzikuVx Mar 3, 2023
5c5bf3b
not even INAV should dereference NULL pointers
stronnag Mar 6, 2023
bd28071
Merge pull request #8862 from iNavFlight/handle_no_osd_in_status
DzikuVx Mar 7, 2023
7294618
Update rc_controls.c
breadoven Mar 7, 2023
2887847
Merge pull request #8870 from breadoven/abo_disable_stick_commands_ac…
DzikuVx Mar 10, 2023
084101a
Merge pull request #8570 from YI-BOYANG/master
DzikuVx Mar 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 38 additions & 36 deletions docs/Programming Framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ IPF can be edited using INAV Configurator user interface, or via CLI
| 10 | NAND | `false` if `Operand A` and `Operand B` are both `true`|
| 11 | NOR | `true` if `Operand A` and `Operand B` are both `false` |
| 12 | NOT | The boolean opposite to `Operand A` |
| 13 | STICKY | `Operand A` is activation operator, `Operand B` is deactivation operator. After activation, operator will return `true` until Operand B is evaluated as `true`|
| 13 | STICKY | `Operand A` is the activation operator, `Operand B` is the deactivation operator. After the activation is `true`, the operator will return `true` until Operand B is evaluated as `true`|
| 14 | ADD | Add `Operand A` to `Operand B` and returns the result |
| 15 | SUB | Substract `Operand B` from `Operand A` and returns the result |
| 16 | MUL | Multiply `Operand A` by `Operand B` and returns the result |
| 17 | DIV | Divide `Operand A` by `Operand B` and returns the result |
| 18 | GVAR SET | Store value from `Operand B` into the Global Variable addressed by `Operand B`. Bear in mind, that operand `Global Variable` means: Value stored in Global Variable of an index! To store in GVAR 1 use `Value 1` not `Global Variable 1` |
| 19 | GVAR INC | Increase the GVAR indexed by `Operand A` with value from `Operand B` |
| 20 | GVAR DEC | Decrease the GVAR indexed by `Operand A` with value from `Operand B` |
| 19 | GVAR INC | Increase the GVAR indexed by `Operand A` (use `Value 1` for Global Variable 1) with value from `Operand B` |
| 20 | GVAR DEC | Decrease the GVAR indexed by `Operand A` (use `Value 1` for Global Variable 1) with value from `Operand B` |
| 21 | IO PORT SET | Set I2C IO Expander pin `Operand A` to value of `Operand B`. `Operand A` accepts values `0-7` and `Operand B` accepts `0` and `1` |
| 22 | OVERRIDE_ARMING_SAFETY | Allows to arm on any angle even without GPS fix |
| 22 | OVERRIDE_ARMING_SAFETY | Allows the craft to arm on any angle even without GPS fix. WARNING: This bypasses all safety checks, even that the throttle is low, so use with caution. If you only want to check for certain conditions, such as arm without GPS fix. You will need to add logic conditions to check the throttle is low. |
| 23 | OVERRIDE_THROTTLE_SCALE | Override throttle scale to the value defined by operand. Operand type `0` and value `50` means throttle will be scaled by 50%. |
| 24 | SWAP_ROLL_YAW | basically, when activated, yaw stick will control roll and roll stick will control yaw. Required for tail-sitters VTOL during vertical-horizonral transition when body frame changes |
| 25 | SET_VTX_POWER_LEVEL | Sets VTX power level. Accepted values are `0-3` for SmartAudio and `0-4` for Tramp protocol |
Expand All @@ -73,17 +73,17 @@ IPF can be edited using INAV Configurator user interface, or via CLI
| 37 | MAP_OUTPUT | Scales `Operand A` from [`0` : `1000`] to [`0` : `Operand B`]. Note: input will be constrained and then scaled |
| 38 | RC_CHANNEL_OVERRIDE | Overrides channel set by `Operand A` to value of `Operand B` |
| 39 | SET_HEADING_TARGET | Sets heading-hold target to `Operand A`, in degrees. Value wraps-around. |
| 40 | MOD | Divide `Operand A` by `Operand B` and returns the remainder |
| 40 | MOD | Modulo. Divide `Operand A` by `Operand B` and returns the remainder |
| 41 | LOITER_RADIUS_OVERRIDE | Sets the loiter radius to `Operand A` [`0` : `100000`] in cm. If the value is lower than the loiter radius set in the **Advanced Tuning**, that will be used. |
| 42 | SET_PROFILE | Sets the active config profile (PIDFF/Rates/Filters/etc) to `Operand A`. `Operand A` must be a valid profile number, currently from 1 to 3. If not, the profile will not change |
| 43 | MIN | Finds the lowest value of `Operand A` and `Operand B` |
| 44 | MAX | Finds the highest value of `Operand A` and `Operand B` |
| 45 | FLIGHT_AXIS_ANGLE_OVERRIDE | Sets the target attitude angle for axis. In other words, when active, it enforces Angle mode (Heading Hold for Yaw) on this axis (Angle mode does not have to be active). `Operand A` defines the axis: `0` - Roll, `1` - Pitch, `2` - Yaw. `Operand B` defines the angle in degrees |
| 46 | FLIGHT_AXIS_RATE_OVERRIDE | Sets the target rate (rotation speed) for axis. `Operand A` defines the axis: `0` - Roll, `1` - Pitch, `2` - Yaw. `Operand B` defines the rate in degrees per second |
| 47 | EDGE | `Operand A` is activation operator [`boolean`], `Operand B` _(Optional)_ is the time for the edge to stay active [ms]. After activation, operator will return `true` until the time in Operand B is reached. If a pure momentary edge is wanted. Just leave `Operand B` as the default `Value: 0` setting. |
| 48 | DELAY | This will return `true` when `Operand A` is true, and the delay time in `Operand B` [ms] has been exceeded. |
| 49 | TIMER | `true` for the duration of `Operand A` [ms]. Then `false` for the duration of `Operand B` [ms]. |
| 50 | DELTA | This returns `true` when the value of `Operand A` has changed by the value of `Operand B` or greater. |
| 47 | EDGE | Momentarily true when triggered by `Operand A`. `Operand A` is the activation operator [`boolean`], `Operand B` _(Optional)_ is the time for the edge to stay active [ms]. After activation, operator will return `true` until the time in Operand B is reached. If a pure momentary edge is wanted. Just leave `Operand B` as the default `Value: 0` setting. |
| 48 | DELAY | Delays activation after being triggered. This will return `true` when `Operand A` _is_ true, and the delay time in `Operand B` [ms] has been exceeded. |
| 49 | TIMER | A simple on - off timer. `true` for the duration of `Operand A` [ms]. Then `false` for the duration of `Operand B` [ms]. |
| 50 | DELTA | This returns `true` when the value of `Operand A` has changed by the value of `Operand B` or greater within 100ms. |
| 51 | APPROX_EQUAL | `true` if `Operand B` is within 1% of `Operand A`. |

### Operands
Expand Down Expand Up @@ -143,43 +143,45 @@ IPF can be edited using INAV Configurator user interface, or via CLI

#### FLIGHT_MODE

The flight mode operands return `true` when the mode is active. These are modes that you will see in the **Modes** tab. Note: the `USER*` modes are used by camera switchers, PINIO etc. They are not the Waypoint User Actions. See the [Waypoints](#waypoints) section to access those.

| Operand Value | Name | Notes |
|---------------|-------------------|-------|
| 0 | FAILSAFE | |
| 1 | MANUAL | |
| 2 | RTH | |
| 3 | POSHOLD | |
| 4 | CRUISE | |
| 5 | ALTHOLD | |
| 6 | ANGLE | |
| 7 | HORIZON | |
| 8 | AIR | |
| 9 | USER1 | |
| 10 | USER2 | |
| 11 | COURSE_HOLD | |
| 12 | USER3 | |
| 13 | USER4 | |
| 14 | ACRO | |
| 15 | WAYPOINT_MISSION | |
| 0 | FAILSAFE | `true` when a **Failsafe** state has been triggered. |
| 1 | MANUAL | `true` when you are in the **Manual** flight mode. |
| 2 | RTH | `true` when you are in the **Return to Home** flight mode. |
| 3 | POSHOLD | `true` when you are in the **Position Hold** or **Loiter** flight modes. |
| 4 | CRUISE | `true` when you are in the **Cruise** flight mode. |
| 5 | ALTHOLD | `true` when you the **Altitude Hold** flight mode modifier is active. |
| 6 | ANGLE | `true` when you are in the **Angle** flight mode. |
| 7 | HORIZON | `true` when you are in the **Horizon** flight mode. |
| 8 | AIR | `true` when you the **Airmode** flight mode modifier is active. |
| 9 | USER1 | `true` when the **USER 1** mode is active. |
| 10 | USER2 | `true` when the **USER 21** mode is active. |
| 11 | COURSE_HOLD | `true` when you are in the **Course Hold** flight mode. |
| 12 | USER3 | `true` when the **USER 3** mode is active. |
| 13 | USER4 | `true` when the **USER 4** mode is active. |
| 14 | ACRO | `true` when you are in the **Acro** flight mode. |
| 15 | WAYPOINT_MISSION | `true` when you are in the **WP Mission** flight mode. |

#### WAYPOINTS

| Operand Value | Name | Notes |
|---------------|-------------------------------|-------|
| 0 | Is WP | boolean `0`/`1` |
| 0 | Is WP | Boolean `0`/`1` |
| 1 | Current Waypoint Index | Current waypoint leg. Indexed from `1`. To verify WP is in progress, use `Is WP` |
| 2 | Current Waypoint Action | Action active in current leg. See ACTIVE_WAYPOINT_ACTION table |
| 3 | Next Waypoint Action | Action active in next leg. See ACTIVE_WAYPOINT_ACTION table |
| 2 | Current Waypoint Action | `true` when Action active in current leg. See ACTIVE_WAYPOINT_ACTION table |
| 3 | Next Waypoint Action | `true` when Action active in next leg. See ACTIVE_WAYPOINT_ACTION table |
| 4 | Distance to next Waypoint | Distance to next WP in metres |
| 5 | Distance from Waypoint | Distance from the last WP in metres |
| 6 | User Action 1 | User Action 1 is active on this waypoint leg [boolean `0`/`1`] |
| 7 | User Action 2 | User Action 2 is active on this waypoint leg [boolean `0`/`1`] |
| 8 | User Action 3 | User Action 3 is active on this waypoint leg [boolean `0`/`1`] |
| 9 | User Action 4 | User Action 4 is active on this waypoint leg [boolean `0`/`1`] |
| 10 | Next Waypoint User Action 1 | User Action 1 is active on the next waypoint leg [boolean `0`/`1`] |
| 11 | Next Waypoint User Action 2 | User Action 2 is active on the next waypoint leg [boolean `0`/`1`] |
| 12 | Next Waypoint User Action 3 | User Action 3 is active on the next waypoint leg [boolean `0`/`1`] |
| 13 | Next Waypoint User Action 4 | User Action 4 is active on the next waypoint leg [boolean `0`/`1`] |
| 6 | User Action 1 | `true` when User Action 1 is active on this waypoint leg [boolean `0`/`1`] |
| 7 | User Action 2 | `true` when User Action 2 is active on this waypoint leg [boolean `0`/`1`] |
| 8 | User Action 3 | `true` when User Action 3 is active on this waypoint leg [boolean `0`/`1`] |
| 9 | User Action 4 | `true` when User Action 4 is active on this waypoint leg [boolean `0`/`1`] |
| 10 | Next Waypoint User Action 1 | `true` when User Action 1 is active on the next waypoint leg [boolean `0`/`1`] |
| 11 | Next Waypoint User Action 2 | `true` when User Action 2 is active on the next waypoint leg [boolean `0`/`1`] |
| 12 | Next Waypoint User Action 3 | `true` when User Action 3 is active on the next waypoint leg [boolean `0`/`1`] |
| 13 | Next Waypoint User Action 4 | `true` when User Action 4 is active on the next waypoint leg [boolean `0`/`1`] |


#### ACTIVE_WAYPOINT_ACTION
Expand Down
24 changes: 22 additions & 2 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4384,11 +4384,31 @@ Value below which (negative altitude) to make the OSD relative altitude indicato

### osd_pan_servo_index

Index of the pan servo to adjust osd home heading direction based on camera pan. Note that this feature does not work with continiously rotating servos.
Index of the pan servo, used to adjust osd home heading direction based on camera pan. Note that this feature does not work with continiously rotating servos.

| Default | Min | Max |
| --- | --- | --- |
| 0 | 0 | 10 |
| 0 | 0 | 16 |

---

### osd_pan_servo_indicator_show_degrees

Show the degress of offset from centre on the pan servo OSD display element.

| Default | Min | Max |
| --- | --- | --- |
| OFF | OFF | ON |

---

### osd_pan_servo_offcentre_warning

Degrees either side of the pan servo centre; where it is assumed camera is wanted to be facing forwards, but isn't at 0. If in this range and not 0 for longer than 10 seconds, the pan servo offset OSD element will blink. 0 means the warning is disabled.

| Default | Min | Max |
| --- | --- | --- |
| 10 | 0 | 45 |

---

Expand Down
19 changes: 19 additions & 0 deletions docs/Temperature sensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@ Up to 8 can be connected to the flight controller.
* Supply: 2.7 to 5.5V
* Temperature range: -55 to +125°C

On the purple LM75 (CJMCU-75), address line pins on the bottom of the PCB need to be bridged either to ground or VCC (to define I2C address)

![image](assets/images/CJMCU-75_address.png)

Pin definition:
| A2 | A1 | A0 |Address|INAV add|
|-----|-----|-----|-------|--------|
| GND | GND | GND | 0x48 | 0 |
| GND | GND | VCC | 0x49 | 1 |
| GND | VCC | GND | 0x4A | 2 |
| GND | VCC | VCC | 0x4B | 3 |
| VCC | GND | GND | 0x4C | 4 |
| VCC | GND | VCC | 0x4D | 5 |
| VCC | VCC | GND | 0x4E | 6 |
| VCC | VCC | VCC | 0x4F | 7 |

If more than one sensor is used, each sensor must have different address.


## DS18B20

* Package: TO-92, SO-8, µSOP-8
Expand Down
Binary file added docs/assets/images/CJMCU-75_address.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ main_sources(COMMON_SRC
io/ledstrip.h
io/osd.c
io/osd.h
io/osd_utils.c
io/osd_utils.h
io/osd_canvas.c
io/osd_canvas.h
io/osd_common.c
Expand Down
1 change: 1 addition & 0 deletions src/main/cms/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ long cmsMenuExit(displayPort_t *pDisplay, const void *ptr)
setServoOutputEnabled(true);

if ((exitType == CMS_EXIT_SAVEREBOOT) || (exitType == CMS_POPUP_SAVEREBOOT)) {
processDelayedSave();
displayClearScreen(pDisplay);
displayWrite(pDisplay, 5, 3, "REBOOTING...");

Expand Down
10 changes: 10 additions & 0 deletions src/main/common/string_light.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <limits.h>

#include "string.h"
#include "string_light.h"
#include "typeconversion.h"

Expand Down Expand Up @@ -50,6 +51,15 @@ int sl_toupper(int c)
return sl_islower(c) ? (c) - 'a' + 'A' : c;
}

void sl_toupperptr(char * c)
{
for (unsigned int i = 0; i < strlen(c); i++) {
if (c[i] >= 'a' && c[i] <= 'z') {
c[i] = c[i] - 'a' + 'A';
}
}
}

int sl_strcasecmp(const char * s1, const char * s2)
{
return sl_strncasecmp(s1, s2, INT_MAX);
Expand Down
1 change: 1 addition & 0 deletions src/main/common/string_light.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ int sl_isupper(int c);
int sl_islower(int c);
int sl_tolower(int c);
int sl_toupper(int c);
void sl_toupperptr(char * c);

int sl_strcasecmp(const char * s1, const char * s2);
int sl_strncasecmp(const char * s1, const char * s2, int n);
12 changes: 9 additions & 3 deletions src/main/drivers/osd_symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#pragma once

#ifdef USE_OSD
#if defined(USE_OSD) || defined(OSD_UNIT_TEST)

#define SYM_RSSI 0x01 // 001 Icon RSSI
#define SYM_LQ 0x02 // 002 LQ
Expand All @@ -44,8 +44,8 @@
#define SYM_DBM 0x13 // 019 dBm
#define SYM_SNR 0x14 // 020 SNR

#define SYM_AH_DECORATION_UP 0x15 // 021 Arrow up AHI
#define SYM_AH_DECORATION_DOWN 0x16 // 022 Arrow down AHI
#define SYM_AH_DIRECTION_UP 0x15 // 021 Arrow up AHI
#define SYM_AH_DIRECTION_DOWN 0x16 // 022 Arrow down AHI
#define SYM_DIRECTION 0x17 // 023 to 030, directional little arrows

#define SYM_VOLT 0x1F // 031 VOLTS
Expand Down Expand Up @@ -252,6 +252,12 @@
#define SYM_HUD_ARROWS_D2 0x1B8 // 440 2 arrows down
#define SYM_HUD_ARROWS_D3 0x1B9 // 441 3 arrows down

#define SYM_HUD_CARDINAL 0x1BA // 442-453 Cardinal direction in 30 degree segments

#define SYM_SERVO_PAN_IS_CENTRED 0x1C6 // 454 Pan servo is centred
#define SYM_SERVO_PAN_IS_OFFSET_L 0x1C7 // 455 Pan servo is offset left
#define SYM_SERVO_PAN_IS_OFFSET_R 0x1C8 // 456 Pan servo is offset right

#else

#define TEMP_SENSOR_SYM_COUNT 0
Expand Down
22 changes: 14 additions & 8 deletions src/main/fc/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ static void cliDelay(char* cmdLine) {
cliPrintLine("CLI delay deactivated");
return;
}

ms = fastA2I(cmdLine);
if (ms) {
cliDelayMs = ms;
Expand All @@ -1699,7 +1699,7 @@ static void cliDelay(char* cmdLine) {
} else {
cliShowParseError();
}

}

static void printServo(uint8_t dumpMask, const servoParam_t *servoParam, const servoParam_t *defaultServoParam)
Expand Down Expand Up @@ -2288,7 +2288,7 @@ static void cliFlashInfo(char *cmdline)
UNUSED(cmdline);

const flashGeometry_t *layout = flashGetGeometry();

if (layout->totalSize == 0) {
cliPrintLine("Flash not available");
return;
Expand Down Expand Up @@ -2323,12 +2323,12 @@ static void cliFlashErase(char *cmdline)
UNUSED(cmdline);

const flashGeometry_t *layout = flashGetGeometry();

if (layout->totalSize == 0) {
cliPrintLine("Flash not available");
return;
}

cliPrintLine("Erasing...");
flashfsEraseCompletely();

Expand Down Expand Up @@ -3194,8 +3194,10 @@ static void cliSet(char *cmdline)
if (settingNameIsExactMatch(val, name, cmdline, variableNameLength)) {
const setting_type_e type = SETTING_TYPE(val);
if (type == VAR_STRING) {
// Convert strings to uppercase. Lower case is not supported by the OSD.
sl_toupperptr(eqptr);
// if setting the craftname, remove any quotes around the name. This allows leading spaces in the name
if (strcmp(name, "name") == 0 && eqptr[0] == '"' && eqptr[strlen(eqptr)-1] == '"') {
if ((strcmp(name, "name") == 0 || strcmp(name, "pilot_name") == 0) && (eqptr[0] == '"' && eqptr[strlen(eqptr)-1] == '"')) {
settingSetString(val, eqptr + 1, strlen(eqptr)-2);
} else {
settingSetString(val, eqptr, strlen(eqptr));
Expand Down Expand Up @@ -3414,8 +3416,12 @@ static void cliStatus(char *cmdline)
cliPrint("OSD: ");
#if defined(USE_OSD)
displayPort_t *osdDisplayPort = osdGetDisplayPort();
cliPrintf("%s [%u x %u]", osdDisplayPort->displayPortType, osdDisplayPort->cols, osdDisplayPort->rows);
#else
if (osdDisplayPort != NULL) {
cliPrintf("%s [%u x %u]", osdDisplayPort->displayPortType, osdDisplayPort->cols, osdDisplayPort->rows);
} else {
cliPrint("not enabled");
}
#else
cliPrint("not used");
#endif
cliPrintLinefeed();
Expand Down
Loading