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

Visual beeper not flashing in OSD during ACC Trim in BF 4.3 #11438

Closed
Martivip opened this issue Feb 27, 2022 · 34 comments · Fixed by #11538
Closed

Visual beeper not flashing in OSD during ACC Trim in BF 4.3 #11438

Martivip opened this issue Feb 27, 2022 · 34 comments · Fixed by #11538
Labels
BUG Bugs are excluded from automatically being marked as stale
Milestone

Comments

@Martivip
Copy link

Martivip commented Feb 27, 2022

Describe the bug

BF has possibility to Trim ACC via OSD stick commands, this has been broken somewhere during the BF 4.3 implementation.
Right now with BF4.3 RC3 and STM32F745 (KakuteF7) target when I try to trim
ACC Pitch or Roll this change is not effective and is not saved in FC, configurator displays "zero" values on both axis
Zrzut ekranu 2022-02-27 o 10 54 36
Also the Visual Beeper and Beep sound during the applying changes is not always present and with Timing AAC Forward is not present at all.
With target BETAFPVF4SX1280 (ELRS SPI receiver on board) due to changes in this PR #11380 the Trim Commands via OSD are effective due to huge @SteveCEvans contribution (setting are stored at Throttle Low now). But but it needs few improvements, user need to have control of how many increments he doing for pitch or roll trims, I have enabled visual beeper ***** and I don't see this visual beeper in my OSD during the changes, it should blink once per 1 step on pitch or roll increments and should blink on 1s (or maybe 0,5s) intervals this allow the user to have control during the changes.
Generally as I've mention this functionality has been present in BF 4.2.9 and has been lost during the BF 4.3 Implementation

To Reproduce

Try to adjust, Trim ACC via OSD stick commands

Expected behavior

ACC trim commands should work as it has been implemented in BF 4.2.9

Flight controller configuration

F745 Target

# 

# diff all

# version
# Betaflight / STM32F745 (S745) 4.3.0 Feb  1 2022 / 20:14:27 (3267f0417) MSP API: 1.44
# config: manufacturer_id: HBRO, board_name: KAKUTEF7, version: cc8e118f, date: 2020-03-04T02:37:20Z

# start the command batch
batch start

# reset configuration to default settings
defaults nosave

board_name KAKUTEF7
manufacturer_id HBRO
mcu_id 003700263538510a38333932
signature 

# resources
resource MOTOR 5 NONE
resource CAMERA_CONTROL 1 B03
resource PINIO 1 C09

# timer
timer B03 AF1
# pin B03: TIM2 CH2 (AF1)

# dma
dma SPI_MISO 1 1
# SPI_MISO 1: DMA2 Stream 2 Channel 3
dma SPI_RX 1 1
# SPI_RX 1: DMA2 Stream 2 Channel 3
dma pin B03 0
# pin B03: DMA1 Stream 6 Channel 3

# feature
feature -RX_PARALLEL_PWM
feature RX_SERIAL
feature GPS
feature TELEMETRY
feature LED_STRIP
feature ESC_SENSOR

# serial
serial 0 2048 115200 57600 0 115200
serial 1 2 115200 115200 0 115200
serial 5 64 115200 57600 0 115200
serial 6 1024 115200 57600 0 115200

# led
led 0 4,11::COW:2
led 1 5,11::COW:2
led 2 6,11::COW:10
led 3 7,11::COW:10
led 4 8,11::COW:10

# aux
aux 0 0 0 2050 2100 0 0
aux 1 1 2 1475 1525 0 0
aux 2 46 3 1175 1650 0 0
aux 3 13 3 1900 2000 0 0
aux 4 13 3 1675 1750 0 0
aux 5 13 3 1425 1525 0 0
aux 6 13 3 1200 1275 0 0
aux 7 15 3 2025 2075 0 0
aux 8 15 3 1900 1950 0 0
aux 9 15 3 1775 1825 0 0
aux 10 15 3 1650 1700 0 0
aux 11 15 3 1525 1575 0 0
aux 12 15 3 1425 1475 0 0
aux 13 15 3 1300 1350 0 0
aux 14 15 3 1175 1225 0 0
aux 15 35 2 2050 2100 0 0
aux 16 40 3 1650 1875 0 0
aux 17 40 3 1175 1400 0 0

# adjrange
adjrange 0 0 1 900 2100 12 1 0 0

# vtxtable
vtxtable bands 6
vtxtable channels 8
vtxtable band 1 BOSCAM_A A FACTORY 5865 5845 5825 5805 5785 5765 5745 5725
vtxtable band 2 BOSCAM_B B FACTORY 5733 5752 5771 5790 5809 5828 5847 5866
vtxtable band 3 BOSCAM_E E FACTORY 5705 5685 5665    0 5885 5905    0    0
vtxtable band 4 FATSHARK I FACTORY 5740 5760 5780 5800 5820 5840 5860 5880
vtxtable band 5 RACEBAND R FACTORY 5658 5695 5732 5769 5806 5843 5880 5917
vtxtable band 6 IMD6C    X CUSTOM  5658 5695 5760 5800 5880 5917    0    0
vtxtable powerlevels 4
vtxtable powervalues 0 1 2 3
vtxtable powerlabels 25 200 500 800

# rxfail
rxfail 3 h

# master
set dyn_notch_count = 1
set dyn_notch_q = 500
set acc_calibration = -56,-8,55,1
set align_mag = CW90FLIP
set mag_align_pitch = 1800
set mag_align_yaw = 900
set baro_hardware = AUTO
set fpv_mix_degrees = 25
set serialrx_provider = GHST
set dshot_bidir = ON
set motor_pwm_protocol = DSHOT600
set failsafe_delay = 3
set failsafe_procedure = GPS-RESCUE
set bat_capacity = 1300
set vbat_warning_cell_voltage = 340
set ibata_scale = 148
set small_angle = 180
set gps_provider = UBLOX
set gps_sbas_mode = EGNOS
set gps_ublox_use_galileo = ON
set gps_set_home_point_once = ON
set gps_rescue_sanity_checks = RESCUE_SANITY_FS_ONLY
set gps_rescue_min_dth = 80
set gps_rescue_allow_arming_without_fix = ON
set osd_warn_batt_not_full = OFF
set osd_warn_link_quality = ON
set osd_warn_rssi_dbm = ON
set osd_rssi_alarm = 30
set osd_link_quality_alarm = 30
set osd_rssi_dbm_alarm = -96
set osd_cap_alarm = 1150
set osd_alt_alarm = 120
set osd_tim1 = 0
set osd_tim2 = 1
set osd_vbat_pos = 2168
set osd_link_quality_pos = 2233
set osd_rssi_dbm_pos = 2265
set osd_tim_2_pos = 2519
set osd_flymode_pos = 2497
set osd_anti_gravity_pos = 2145
set osd_throttle_pos = 2113
set osd_vtx_channel_pos = 2101
set osd_current_pos = 2093
set osd_mah_drawn_pos = 2200
set osd_gps_speed_pos = 2305
set osd_gps_sats_pos = 2088
set osd_home_dir_pos = 2126
set osd_home_dist_pos = 2128
set osd_flight_dist_pos = 2120
set osd_altitude_pos = 2273
set osd_avg_cell_voltage_pos = 2136
set osd_battery_usage_pos = 2504
set osd_disarmed_pos = 2474
set osd_flip_arrow_pos = 2502
set osd_rate_profile_name_pos = 2081
set osd_stat_endbatt = ON
set osd_stat_min_rssi = OFF
set osd_stat_bbox = OFF
set osd_stat_bb_no = OFF
set osd_stat_min_link_quality = ON
set osd_stat_flight_dist = ON
set osd_stat_min_rssi_dbm = ON
set vtx_band = 5
set vtx_channel = 1
set vtx_power = 1
set vtx_freq = 5658
set vcd_video_system = PAL
set camera_control_internal_resistance = 570
set pinio_box = 40,41,42,43
set gyro_1_align_yaw = 2700

profile 0

# profile 0
set level_limit = 60

profile 1

profile 2

# restore original profile selection
profile 0

rateprofile 0

# rateprofile 0
set thr_mid = 30
set roll_rc_rate = 1
set pitch_rc_rate = 1
set yaw_rc_rate = 1
set roll_expo = 54
set pitch_expo = 54
set yaw_expo = 54
set roll_srate = 100
set pitch_srate = 100
set tpa_breakpoint = 1750

rateprofile 1

rateprofile 2

rateprofile 3

rateprofile 4

rateprofile 5

# restore original rateprofile selection
rateprofile 0

# save configuration
save
# 
# 

# resource show all
Currently active IO resource assignments:
(reboot to update)
--------------------
A00: FREE
A01: FREE
A02: LED 1
A03: FREE
A04: SDCARD_CS
A05: SPI_SCK 1
A06: SPI_MISO 1
A07: SPI_MOSI 1
A08: FREE
A09: SERIAL_TX 1
A10: FREE
A11: USB
A12: USB
A13: SWD
A14: SWD
A15: FREE
B00: MOTOR 1
B01: MOTOR 2
B02: FREE
B03: CAMERA_CONTROL
B04: FREE
B05: FREE
B06: I2C_SCL 1
B07: I2C_SDA 1
B08: FREE
B09: FREE
B10: FREE
B11: FREE
B12: OSD_CS
B13: SPI_SCK 2
B14: SPI_MISO 2
B15: SPI_MOSI 2
C00: FREE
C01: FREE
C02: ADC_CURR
C03: ADC_BATT
C04: FREE
C05: FREE
C06: SERIAL_TX 6
C07: FREE
C08: FREE
C09: PINIO 1
C10: FREE
C11: FREE
C12: FREE
C13: FREE
C14: FREE
C15: FREE
D00: FREE
D01: FREE
D02: FREE
D03: FREE
D04: FREE
D05: SERIAL_TX 2
D06: SERIAL_RX 2
D07: FREE
D08: SDCARD_DETECT
D09: FREE
D10: FREE
D11: FREE
D12: LED_STRIP
D13: FREE
D14: FREE
D15: BEEPER
E00: FREE
E01: GYRO_EXTI
E02: SPI_SCK 4
E03: FREE
E04: GYRO_CS 1
E05: SPI_MISO 4
E06: SPI_MOSI 4
E07: SERIAL_RX 7
E08: FREE
E09: MOTOR 3
E10: FREE
E11: MOTOR 4
E12: FREE
E13: FREE
E14: FREE
E15: FREE
F00: FREE
F01: FREE
F02: FREE
F03: FREE
F04: FREE
F05: FREE
F06: FREE
F07: FREE
F08: FREE
F09: FREE
F10: FREE
F11: FREE
F12: FREE
F13: FREE
F14: FREE
F15: FREE

Currently active Timers:
-----------------------
TIM1: FREE
TIM2:
    CH2 : CAMERA_CONTROL
TIM3: FREE
TIM4:
    CH1 : LED_STRIP
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM8:
    CH2 : DSHOT_BITBANG 2
    CH4 : DSHOT_BITBANG 5
TIM9: FREE
TIM10: FREE
TIM11: FREE
TIM12: FREE
TIM13: FREE
TIM14: FREE

Currently active DMA:
--------------------
DMA1 Stream 0: LED_STRIP
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: SPI_MISO 2
DMA1 Stream 4: SPI_MOSI 2
DMA1 Stream 5: FREE
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: SPI_MISO 4
DMA2 Stream 1: SPI_MOSI 4
DMA2 Stream 2: SPI_MISO 1
DMA2 Stream 3: DSHOT_BITBANG 2
DMA2 Stream 4: ADC
DMA2 Stream 5: SPI_MOSI 1
DMA2 Stream 6: FREE
DMA2 Stream 7: DSHOT_BITBANG 5

# 

BETAFPVF4SX1280 target

# 

# diff all

# version
# Betaflight / BETAFPVF4SX1280 (BHER) 4.3.0 Feb 26 2022 / 21:33:50 (83ad8ab) MSP API: 1.44

# start the command batch
batch start

# reset configuration to default settings
defaults nosave

board_name BETAFPVF4SX1280
manufacturer_id BEFH
mcu_id 002a00393036510a36383539
signature 

# name: Meteor65-ELRS

# feature
feature -SOFTSERIAL
feature -LED_STRIP
feature -ANTI_GRAVITY

# serial
serial 0 2048 115200 57600 0 115200

# aux
aux 0 0 0 1950 2050 0 0
aux 1 1 1 1425 1575 0 0
aux 2 2 1 1925 2075 0 0
aux 3 35 2 1850 2100 0 0

# vtxtable
vtxtable bands 5
vtxtable channels 8
vtxtable band 1 BOSCAM_A A FACTORY 5865 5845 5825 5805 5785 5765 5745 5725
vtxtable band 2 BOSCAM_B B FACTORY 5733 5752 5771 5790 5809 5828 5847 5866
vtxtable band 3 BOSCAM_E E FACTORY 5705 5685 5665 5645 5885 5905 5925 5945
vtxtable band 4 FATSHARK F FACTORY 5740 5760 5780 5800 5820 5840 5860 5880
vtxtable band 5 RACEBAND R FACTORY 5658 5695 5732 5769 5806 5843 5880 5917
vtxtable powerlevels 4
vtxtable powervalues 0 1 2 3
vtxtable powerlabels 25 100 200 350

# master
set gyro_lpf1_static_hz = 0
set gyro_lpf2_static_hz = 1000
set dyn_notch_count = 2
set dyn_notch_q = 450
set dyn_notch_min_hz = 100
set gyro_lpf1_dyn_min_hz = 0
set acc_trim_pitch = 22
set acc_trim_roll = -20
set acc_calibration = -10,-99,-110,1
set max_check = 2000
set rc_smoothing_auto_factor = 25
set rc_smoothing_auto_factor_throttle = 25
set dshot_idle_value = 600
set dshot_bidir = ON
set motor_pwm_protocol = DSHOT300
set motor_poles = 12
set bat_capacity = 300
set vbat_max_cell_voltage = 440
set vbat_min_cell_voltage = 300
set vbat_warning_cell_voltage = 333
set current_meter = NONE
set ibata_scale = 179
set small_angle = 180
set simplified_gyro_filter_multiplier = 200
set osd_warn_batt_not_full = OFF
set osd_warn_core_temp = OFF
set osd_warn_rc_smoothing = OFF
set osd_warn_launch_control = OFF
set osd_warn_no_gps_rescue = OFF
set osd_warn_gps_rescue_disabled = OFF
set osd_warn_link_quality = ON
set osd_warn_rssi_dbm = ON
set osd_link_quality_alarm = 30
set osd_rssi_dbm_alarm = -100
set osd_cap_alarm = 300
set osd_tim1 = 0
set osd_tim2 = 1
set osd_vbat_pos = 2401
set osd_rssi_pos = 193
set osd_link_quality_pos = 2263
set osd_link_tx_power_pos = 396
set osd_rssi_dbm_pos = 2232
set osd_tim_1_pos = 386
set osd_tim_2_pos = 2455
set osd_remaining_time_estimate_pos = 33
set osd_flymode_pos = 2442
set osd_throttle_pos = 2433
set osd_vtx_channel_pos = 2101
set osd_current_pos = 43
set osd_craft_name_pos = 393
set osd_home_dist_pos = 98
set osd_flight_dist_pos = 130
set osd_warnings_pos = 2409
set osd_avg_cell_voltage_pos = 289
set osd_disarmed_pos = 2347
set osd_esc_tmp_pos = 163
set osd_esc_rpm_pos = 150
set osd_flip_arrow_pos = 2438
set osd_core_temp_pos = 2448
set osd_stat_max_spd = OFF
set osd_stat_endbatt = ON
set osd_stat_min_rssi = OFF
set osd_stat_bbox = OFF
set osd_stat_bb_no = OFF
set osd_stat_total_time = ON
set osd_stat_min_rssi_dbm = ON
set vtx_band = 5
set vtx_channel = 1
set vtx_power = 1
set vtx_low_power_disarm = ON
set vtx_freq = 5658
set vcd_video_system = NTSC
set expresslrs_uid = 179,193,51,58,47,191
set expresslrs_rate_index = 1
set expresslrs_switch_mode = WIDE
set name = Meteor65-ELRS

profile 0

# profile 0
set dterm_lpf1_dyn_min_hz = 150
set dterm_lpf1_dyn_max_hz = 300
set dterm_lpf1_static_hz = 150
set dterm_lpf2_static_hz = 300
set vbat_sag_compensation = 100
set anti_gravity_gain = 4500
set iterm_relax_cutoff = 20
set p_pitch = 71
set i_pitch = 63
set d_pitch = 67
set f_pitch = 249
set p_roll = 68
set i_roll = 60
set d_roll = 62
set f_roll = 239
set p_yaw = 68
set i_yaw = 60
set f_yaw = 239
set level_limit = 65
set d_min_roll = 62
set d_min_pitch = 67
set d_max_advance = 0
set feedforward_averaging = 2_POINT
set feedforward_smooth_factor = 40
set feedforward_jitter_factor = 5
set feedforward_boost = 18
set feedforward_max_rate_limit = 95
set simplified_master_multiplier = 105
set simplified_i_gain = 50
set simplified_d_gain = 200
set simplified_pi_gain = 145
set simplified_dmax_gain = 0
set simplified_feedforward_gain = 190
set simplified_pitch_d_gain = 95
set simplified_dterm_filter_multiplier = 200

profile 1

profile 2

# profile 2
set dterm_lpf1_dyn_min_hz = 105
set dterm_lpf1_dyn_max_hz = 210
set dterm_lpf1_static_hz = 105
set dterm_lpf2_static_hz = 210
set p_pitch = 51
set i_pitch = 99
set d_pitch = 42
set f_pitch = 105
set p_roll = 46
set i_roll = 94
set d_roll = 39
set f_roll = 99
set p_yaw = 50
set i_yaw = 99
set f_yaw = 99
set d_min_roll = 25
set d_min_pitch = 28
set simplified_pids_mode = OFF
set simplified_dterm_filter_multiplier = 140

# restore original profile selection
profile 0

rateprofile 0

# rateprofile 0
set roll_rc_rate = 10
set pitch_rc_rate = 10
set yaw_rc_rate = 10
set roll_expo = 54
set pitch_expo = 54
set yaw_expo = 54
set roll_srate = 80
set pitch_srate = 80
set yaw_srate = 70
set tpa_breakpoint = 1250

rateprofile 1

rateprofile 2

rateprofile 3

rateprofile 4

rateprofile 5

# restore original rateprofile selection
rateprofile 0

# save configuration
save
# 
# 

# resource show all
Currently active IO resource assignments:
(reboot to update)
--------------------
A00: MOTOR 2
A01: ADC_BATT
A02: FREE
A03: FREE
A04: GYRO_CS 1
A05: SPI_SCK 1
A06: SPI_MISO 1
A07: SPI_MOSI 1
A08: FREE
A09: SERIAL_TX 1
A10: FREE
A11: USB
A12: USB
A13: RX_SPI_EXPRESSLRS_BUSY
A14: BEEPER
A15: RX_SPI_CS
B00: FREE
B01: FREE
B02: RX_SPI_BIND
B03: SPI_SCK 3
B04: SPI_MISO 3
B05: SPI_MOSI 3
B06: GYRO_EXTI
B07: MOTOR 4
B08: MOTOR 1
B09: RX_SPI_EXPRESSLRS_RESET
B10: MOTOR 3
B11: FREE
B12: OSD_CS
B13: SPI_SCK 2
B14: SPI_MISO 2
B15: SPI_MOSI 2
C00: FREE
C01: FREE
C02: FREE
C03: FREE
C04: FREE
C05: FREE
C06: FREE
C07: FREE
C08: FREE
C09: FREE
C10: FREE
C11: FREE
C12: FREE
C13: RX_SPI_EXTI
C14: LED 1
C15: LED
D02: FREE

Currently active Timers:
-----------------------
TIM1:
    CH1 : DSHOT_BITBANG 2
    CH2 : DSHOT_BITBANG 1
TIM2: FREE
TIM3: FREE
TIM4: FREE
TIM5: FREE
TIM6: FREE
TIM7: FREE
TIM9: FREE
TIM10: FREE
TIM11: FREE

Currently active DMA:
--------------------
DMA1 Stream 0: SPI_MISO 3
DMA1 Stream 1: FREE
DMA1 Stream 2: FREE
DMA1 Stream 3: SPI_MISO 2
DMA1 Stream 4: SPI_MOSI 2
DMA1 Stream 5: SPI_MOSI 3
DMA1 Stream 6: FREE
DMA1 Stream 7: FREE
DMA2 Stream 0: ADC 1
DMA2 Stream 1: DSHOT_BITBANG 2
DMA2 Stream 2: DSHOT_BITBANG 1
DMA2 Stream 3: FREE
DMA2 Stream 4: FREE
DMA2 Stream 5: FREE
DMA2 Stream 6: FREE
DMA2 Stream 7: FREE

# 

Flight controller

HolyBro KakuteF7 v1.5

Other components

No response

How are the different components wired up

No response

Add any other context about the problem that you think might be relevant here

No response

@SteveCEvans
Copy link
Member

The issue with the missing beeps was caused by there being a beep associated with each write to FLASH. As we only write once throttle is lowered, that was lost. Beeps have been resurrected for each trim adjustment. There is thus a slight change in beep behaviour because there will now be a beep per adjustment, and a further beep when the setting are written to FLASH, so an extra beep at the end. I believe this to be reasonable.

Fixed in #11380

@Martivip
Copy link
Author

Hi @SteveCEvans, no it don't work I've tested today with the latest Development Master build no.2648.
I have two setups, one based on Ghost RC Link with STM32F745 (KakuteF7) target and one with ELRS RC Link together with BETAFPVF4SX1280 (ELRS SPI receiver on board) tagret.

For both setups my test observations are the same:

  • after applying ACC trim roll, pitch adjustments via OSD stick command those adjustments are not stored in EEPROM of the FC, BF configurator shows zero values after applying them via OSD.
  • for Trim ACC Forwards command there is no beep sound and there is no visual beeper indication as well

@Martivip
Copy link
Author

Martivip commented Mar 20, 2022

Hi @SteveCEvans ok after installation BF build no. 2653
I have two setups, one based on Ghost RC Link with STM32F745 (KakuteF7) target and one with ELRS RC Link together with BETAFPVF4SX1280 (ELRS SPI receiver on board) tagret.

  • for ELRS Setup ACC trim rol and ich adjustments made via OSD are saved in FC is OK minor issue is that not always visual beeper is persented in OSD during adjustments
  • For Ghost Setup, roll and pitch adjustments are not saved in FC at throttle low so definitely something has been broken during the implementation of "save at throttle low" (but the way this save at throttle low has been implemented only to SPI ELRS FC or for FC without SPI ELRS receiver as well ?) and also there is no visual beeper presentation during the ACC trim forward.

@haslinghuis haslinghuis added BUG Bugs are excluded from automatically being marked as stale and removed Template: Bug Set by auto_close_issue. labels Mar 20, 2022
@haslinghuis haslinghuis added this to Bug Tracker in Finalizing Firmware 4.3 Release via automation Mar 20, 2022
@haslinghuis haslinghuis added this to the 4.3 milestone Mar 20, 2022
@Martivip
Copy link
Author

Martivip commented Apr 3, 2022

@SteveCEvans after installation BF build no. 2662 sill I facing the same issues :

I have two setups, one based on Ghost RC Link with STM32F745 (KakuteF7) target and one with ELRS RC Link together with BETAFPVF4SX1280 (ELRS SPI receiver on board) tagret.

for ELRS Setup ACC trim rol and ich adjustments made via OSD are saved in FC is OK minor issue is that not always visual beeper is persented in OSD during adjustments
For Ghost Setup, roll and pitch adjustments are not saved in FC at throttle low so definitely something has been broken during the implementation of "save at throttle low" (but the way this save at throttle low has been implemented only to SPI ELRS FC or for FC without SPI ELRS receiver as well ?) and also there is no visual beeper presentation during the ACC trim forward.

@Martivip
Copy link
Author

Martivip commented Apr 9, 2022

for the BF 4.3 RC4 the same status as above

@haslinghuis
Copy link
Member

haslinghuis commented Apr 11, 2022

Please test #11509

Problems reported after:
image

@klutvott123
Copy link
Member

I just tested with crossfire and ghost and it works. I don't have a beeper or OSD so I can't comment on that.
@Martivip ACC trim stick commands only works in angle or horizon mode. Is your ghost setup in one of these modes?

@Martivip
Copy link
Author

@haslinghuis yes I confirm Acc calibration and trims works, the only issue is that Visual Beeper is not properly displayed in OSD, most of the time is not displayed at all :)

@haslinghuis
Copy link
Member

haslinghuis commented Apr 14, 2022

This PR da0a42a was solving the visual beeper in 4.3: #11359

For further investigation, the code is a little confusing as visual_beeper is also used for ledstrip.
So we are looking at osd_warn_visual_beeper not ledstrip_visual_beeper.

Not sure about the PR using isBeeperOn

@ctzsnooze
Copy link
Member

I tested on an F722 and found that with stick-banging I can change the acc trim, the LED flashes, but the 'visual beeper' does not 'flash' in the OSD at the same time.

@ctzsnooze ctzsnooze changed the title ACC Trim via OSD has been broken somewhere during the implementation of the BF 4.3 Visual beeper not flashing in OSD with ACC Trim in BF 4.3 Apr 15, 2022
@ctzsnooze ctzsnooze changed the title Visual beeper not flashing in OSD with ACC Trim in BF 4.3 Visual beeper not flashing in OSD during ACC Trim in BF 4.3 Apr 15, 2022
@klutvott123
Copy link
Member

The issue could be that showVisualBeeper is both set and reset before it's rendered.

betaflight/src/main/osd/osd.c

Lines 1207 to 1209 in 21c8d67

case OSD_STATE_CHECK:
showVisualBeeper = isBeeperOn();

@klutvott123
Copy link
Member

At the slow rate the OSD task is running at there's no guarantee that we will catch the case where isBeeperOn() == true.
It would probably work if the beeper code set the visual beeper too. then reset it once rendered.

@klutvott123
Copy link
Member

@Martivip Could you try this, please?
betaflight_4.3.0_STM32F745_norevision (2).zip

@Martivip
Copy link
Author

@Martivip Could you try this, please?
betaflight_4.3.0_STM32F745_norevision (2).zip

@klutvott123 no still no visual beeper in OSD

@Martivip
Copy link
Author

Martivip commented Apr 17, 2022

@Martivip Could you try this, please?
betaflight_4.3.0_STM32F745_norevision (2).zip

@klutvott123 no still no visual beeper in OSD

@klutvott123 precisely speaking sometimes it has been rendered but really rarely, most of the time not at all

@klutvott123
Copy link
Member

klutvott123 commented Apr 17, 2022

@Martivip Thanks for testing. We'll have to look into this. It's a bit hard to test as I don't have fpv equipment so I can't actually see the OSD

@klutvott123
Copy link
Member

All right, I think this should work. It uses a latching approach. This lets the beeper set showVisualBeeper and it is only reset once the "****" has been drawn and the beeper is off.
betaflight_4.3.0_STM32F745_norevision (3).zip

@Martivip Could you try it, pelase?

@Martivip
Copy link
Author

Martivip commented Apr 17, 2022

All right, I think this should work. It uses a latching approach. This lets the beeper set showVisualBeeper and it is only reset once the "****" has been drawn and the beeper is off. betaflight_4.3.0_STM32F745_norevision (3).zip

@Martivip Could you try it, pelase?

@klutvott123 Hi Ok it works, but sometimes when I applying ie. one step of ACC trim (direction it doesn't matter), instead of one blink "****" it blinks randomly couple of times two or three. It looks like visual beeper is rendered randomly twice on time to time.

@klutvott123
Copy link
Member

Is this after bringing throttle back to zero?

@Martivip
Copy link
Author

No just after Acc trim command before throttle low

@Martivip
Copy link
Author

Martivip commented Apr 17, 2022

when I applying Acc trim command (only one step) sometimes Visual beeper is randomly rendered twice and yes I know that throttle low will trigger visual beeper once again :)

@Martivip
Copy link
Author

In general this one extra visual beeper render can mislead the operator that he made an increment by two steps instead of one. We need to keep in mind that visual beeper is mostly used without real beeper and that's why the visual beeper should be rendered only once per one increment step :)

@klutvott123
Copy link
Member

klutvott123 commented Apr 17, 2022

@Martivip I agree, the extra beep is not desired behaviour. I made some changes that hopefully will work
betaflight_4.3.0_STM32F745_norevision (5).zip

Thanks for helping testing this. Much appreciated. I really need to get some equipment so I can test this kind of stuff myself

Edit: Sorry, I uploaded the wrong binary. Updated with the correct one.

@Martivip
Copy link
Author

Martivip commented Apr 18, 2022

@Martivip I agree, the extra beep is not desired behaviour. I made some changes that hopefully will work betaflight_4.3.0_STM32F745_norevision (5).zip

Thanks for helping testing this. Much appreciated. I really need to get some equipment so I can test this kind of stuff myself

Edit: Sorry, I uploaded the wrong binary. Updated with the correct one.

@klutvott123 Hi ok it works as it should right now, perfect !

one more thing, not related to this bug but maybe you can make a quick look, I'm noticed that one Acc Trim increment (one beep real or visual beeper) is 2 value increments from the configurator perspective
Zrzut ekranu 2022-04-18 o 10 10 29
i think that via one ACC trim increment should be done by 1 value from configurator perspective, one beep one increment from configurator perspective, what do you think ?

@klutvott123
Copy link
Member

PR to fix this is up #11538

@Martivip Looks like the steps of two is hardcoded. Changes would have to be made to firmware and configurator. We'll have to investigate why it's like this before doing anything. Because this is not a bug, changing it would have to wait until BF 4.4. But I agree, it seems a little strange.

switch (rcSticks) {
case THR_HI + YAW_CE + PIT_HI + ROL_CE:
accelerometerTrimsDelta.values.pitch = 2;
shouldApplyRollAndPitchTrimDelta = true;
break;
case THR_HI + YAW_CE + PIT_LO + ROL_CE:
accelerometerTrimsDelta.values.pitch = -2;
shouldApplyRollAndPitchTrimDelta = true;
break;
case THR_HI + YAW_CE + PIT_CE + ROL_HI:
accelerometerTrimsDelta.values.roll = 2;
shouldApplyRollAndPitchTrimDelta = true;
break;
case THR_HI + YAW_CE + PIT_CE + ROL_LO:
accelerometerTrimsDelta.values.roll = -2;
shouldApplyRollAndPitchTrimDelta = true;
break;
}

@Martivip
Copy link
Author

@klutvott123 Thank you very much for taking your time for this visual beeper issue :)
And I agree those hard coded increments should be reviewed, definitely to put in BF future releasses backlog.

Finalizing Firmware 4.3 Release automation moved this from Bug Tracker to Finished (Merged) Apr 18, 2022
@Martivip
Copy link
Author

PR to fix this is up #11538

@Martivip Looks like the steps of two is hardcoded. Changes would have to be made to firmware and configurator. We'll have to investigate why it's like this before doing anything. Because this is not a bug, changing it would have to wait until BF 4.4. But I agree, it seems a little strange.

switch (rcSticks) {
case THR_HI + YAW_CE + PIT_HI + ROL_CE:
accelerometerTrimsDelta.values.pitch = 2;
shouldApplyRollAndPitchTrimDelta = true;
break;
case THR_HI + YAW_CE + PIT_LO + ROL_CE:
accelerometerTrimsDelta.values.pitch = -2;
shouldApplyRollAndPitchTrimDelta = true;
break;
case THR_HI + YAW_CE + PIT_CE + ROL_HI:
accelerometerTrimsDelta.values.roll = 2;
shouldApplyRollAndPitchTrimDelta = true;
break;
case THR_HI + YAW_CE + PIT_CE + ROL_LO:
accelerometerTrimsDelta.values.roll = -2;
shouldApplyRollAndPitchTrimDelta = true;
break;
}

@klutvott123 are you sure that steps of two are also hardcoded in configurator ? I'm asking because in configurator we are able to perform increments by one step not two

@klutvott123
Copy link
Member

Just checked and your right. It's just when doing the adjustment with stick commands

@Martivip
Copy link
Author

Just checked and your right. It's just when doing the adjustment with stick commands

@klutvott123 so I'm not pushing :) if you find some spare time then maybe you will be able to create quick PR for that

@klutvott123
Copy link
Member

I can do it, but it will still be for 4.4 🙂

@haslinghuis haslinghuis reopened this Apr 18, 2022
Finalizing Firmware 4.3 Release automation moved this from Finished (Merged) to Bug Tracker Apr 18, 2022
@haslinghuis
Copy link
Member

Issue will be closed automatically upon merging the fixing PR.

@Martivip
Copy link
Author

Martivip commented Apr 19, 2022

I can do it, but it will still be for 4.4 🙂

please do, but I don't understand why it must wait for 4.4 😑, this is not a new feature this is discrepancy removal between firmware and configurator 😄 that has been found.

Finalizing Firmware 4.3 Release automation moved this from Bug Tracker to Finished (Merged) Apr 20, 2022
@haslinghuis
Copy link
Member

haslinghuis commented Apr 20, 2022

@Martivip please open a new issue report for the remaining issue so we can assign it as the original issue is now closed it won't get much attention.

@Martivip
Copy link
Author

@Martivip please open a new issue report for the remaining issue so we can assign it as the original issue is now closed it won't get much attention.

@haslinghuis Done, Thank You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Bugs are excluded from automatically being marked as stale
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants