EmuFlight icon indicating copy to clipboard operation
EmuFlight copied to clipboard

[Safety] auto cell count profiles / motor spin during grounded failsafe

Open nerdCopter opened this issue 3 years ago • 1 comments

Safety concern

  • needs validation
  • reported by user @justwobe

Describe the bug

  • Plugging different lipo cell-count without arming may make auto-profile fail and other potential issues including failsafe or motor spin while active failsafe.
  • motors spun with active failsafe on ground when attempting to unplug lipo causing finger cuts.

To Reproduce

  • plug 4S. do not arm. plug 5S. problems occur. (only happens if not arming differing cell-count)

diff

# 

# diff all

# version
# EmuFlight / TRANSTECF7 (S7X2) 0.3.2 Oct  7 2020 / 19:21:51 (e0270d5fd) MSP API: 1.49

board_name 
manufacturer_id 
mcu_id 001d002b3338510432343933
signature 

# reset configuration to default settings
defaults nosave

# name
name justtwobe_s2

# resources
resource PWM 3 NONE
resource CAMERA_CONTROL 1 B08

# mixer

# servo

# servo mix


# feature
feature -SOFTSERIAL
feature TELEMETRY

# beeper
beeper -GYRO_CALIBRATED
beeper -RX_LOST
beeper -RX_LOST_LANDING
beeper -DISARMING
beeper -ARMING
beeper -ARMING_GPS_FIX
beeper -BAT_CRIT_LOW
beeper -BAT_LOW
beeper -GPS_STATUS
beeper -RX_SET
beeper -ACC_CALIBRATION
beeper -ACC_CALIBRATION_FAIL
beeper -READY_BEEP
beeper -DISARM_REPEAT
beeper -ARMED
beeper -SYSTEM_INIT
beeper -ON_USB
beeper -BLACKBOX_ERASE
beeper -CRASH FLIP
beeper -CAM_CONNECTION_OPEN
beeper -CAM_CONNECTION_CLOSED
beeper -RC_SMOOTHING_INIT_FAIL

# beacon
beacon RX_LOST

# map

# serial
serial 0 64 115200 57600 0 115200
serial 3 16384 115200 57600 0 115200
serial 4 2048 115200 57600 0 115200

# led

# color

# mode_color

# aux
aux 0 0 0 1300 1700 0 0
aux 1 35 1 1300 1700 0 0

# adjrange

# rxrange

# vtx

# rxfail
rxfail 4 s 1025
rxfail 5 s 1025
rxfail 6 h
rxfail 7 h
rxfail 8 h
rxfail 9 h

# master
set imuf_roll_q = 4000
set imuf_pitch_q = 4000
set imuf_yaw_q = 4000
set imuf_sharpness = 3000
set acc_calibration = 8,22,-4255
set min_check = 1020
set max_check = 1990
set serialrx_provider = CRSF
set min_throttle = 1020
set vbat_max_cell_voltage = 44
set ibata_scale = 85
set beeper_dshot_beacon_tone = 3
set yaw_motors_reversed = ON
set osd_warn_arming_disable = OFF
set osd_warn_batt_not_full = OFF
set osd_warn_batt_warning = ON
set osd_warn_batt_critical = OFF
set osd_warn_visual_beeper = OFF
set osd_warn_crash_flip = OFF
set osd_warn_esc_fail = OFF
set osd_warn_core_temp = OFF
set osd_warn_rc_smoothing = OFF
set osd_warn_dji = OFF
set osd_rssi_alarm = 30
set osd_vbat_pos = 2509
set osd_rssi_pos = 2499
set osd_tim_2_pos = 2541
set osd_craft_name_pos = 2096
set osd_warnings_pos = 2443
set osd_stat_max_spd = OFF
set osd_stat_min_batt = OFF
set osd_stat_endbatt = ON
set osd_stat_battery = ON
set osd_stat_min_rssi = OFF
set osd_stat_max_curr = OFF
set osd_stat_used_mah = OFF
set osd_stat_bbox = OFF
set osd_stat_bb_no = OFF
set vtx_band = 1
set vtx_power = 2
set vtx_freq = 5865
set camera_control_ref_voltage = 313

# profile
profile 0

set throttle_boost = 3
set auto_profile_cell_count = 4

# profile
profile 1

set throttle_boost = 3
set motor_output_limit = 84
set auto_profile_cell_count = 5

# profile
profile 2

set throttle_boost = 3
set auto_profile_cell_count = -1

# restore original profile selection
profile 0

# rateprofile
rateprofile 0

set roll_rc_rate = 145
set pitch_rc_rate = 135
set yaw_rc_rate = 140
set roll_expo = 30
set pitch_expo = 30
set yaw_expo = 30
set roll_srate = 53
set pitch_srate = 45
set yaw_srate = 65

# rateprofile
rateprofile 1

set roll_rc_rate = 145
set pitch_rc_rate = 135
set yaw_rc_rate = 140
set roll_expo = 32
set pitch_expo = 32
set yaw_expo = 32
set roll_srate = 53
set pitch_srate = 45
set yaw_srate = 65

# rateprofile
rateprofile 2

set roll_rc_rate = 145
set pitch_rc_rate = 140
set yaw_rc_rate = 135
set roll_expo = 35
set pitch_expo = 35
set yaw_expo = 35
set roll_srate = 50
set pitch_srate = 35
set yaw_srate = 65

# restore original rateprofile selection
rateprofile 0

# 

nerdCopter avatar Feb 04 '21 16:02 nerdCopter

not able to reproduce with 0.3.3 on different fc's, don't have a transtec F7 running emu.. but sometimes the voltage readout is very slow on some FC's (betaflight and EmuFlight) after final initializing beep, sometimes voltage is still going up and takes a few seconds to reach correct value. if user arms to fast, total cell count could be way off (lower as it has to be) and autoprofile could be wrong. although it does not solve arming during failsave, it's a point to point out to @justwobe and verify that he had some time between initializing and arming.

Dutchcommando avatar Feb 04 '21 22:02 Dutchcommando