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

PINIO Behavior in 4.5 #13613

Open
ot0tot opened this issue Apr 30, 2024 · 2 comments
Open

PINIO Behavior in 4.5 #13613

ot0tot opened this issue Apr 30, 2024 · 2 comments
Labels
Inactive Automatically detected and labeled, will be closed after another week of inactivity. Template: Bug Set by auto_close_issue.

Comments

@ot0tot
Copy link
Contributor

ot0tot commented Apr 30, 2024

Describe the bug

Has the PINIO behavior changed in 4.5? It seems some targets with PINIO switched VTX power are not working now without additional configuration, where they were working in 4.4 with the same config.
Example: betaflight/config#412

Is the PINIO not active if a box is not defined in the config?

In the above example, PINIO2 is used to toggle the VTX power. In 4.4, without additional configuration, the PINIO settings have PINIO2 config set to 1 (Output-Push-Pull), and PINIO2 box set to 255 (BOXID_NONE). Thus you would expect the default value to be PINIO2 high, which should mean the VTX power is always on.
This seems to work in 4.4, but not in 4.5.

To Reproduce

Flash BF 4.5.0 to a FC that uses PINIO, eg for VTX power control.

Expected behavior

Without specific PINIO configuration set, the PINIO_CONFIG and PINIO_BOX parameters should apply. e.g all PINIO pins should be set to high in the default case:

set pinio_config = 1,1,1,1
set pinio_box = 255,255,255,255

Support ID

defaults nosave


# version
# Betaflight / STM32H743 (SH74) 4.5.0 Apr 30 2024 / 10:25:06 (c155f5830) MSP API: 1.46
# config rev: 2ceeadc

# start the command batch
batch start

# reset configuration to default settings
defaults nosave

board_name MAMBAH743_2022B
manufacturer_id DIAT
mcu_id 002f00493133510234393330
signature 

# feature
feature TELEMETRY
feature OSD

# serial
serial 0 64 115200 57600 0 115200
serial 2 131073 115200 57600 0 115200
serial 3 1 115200 57600 0 115200

# beacon
beacon RX_LOST
beacon RX_SET

# aux
aux 0 0 0 1800 2100 0 0
aux 1 1 1 1300 1700 0 0
aux 2 13 2 1800 2100 0 0
aux 3 35 1 1800 2100 0 0
aux 4 40 0 900 2100 0 0

# master
set gyro_lpf1_static_hz = 0
set gyro_lpf2_static_hz = 1000
set dyn_notch_count = 1
set dyn_notch_q = 500
set gyro_lpf1_dyn_min_hz = 0
set gyro_lpf1_dyn_max_hz = 1000
set acc_calibration = -6,-5,43,1
set min_check = 1010
set max_check = 1990
set rc_smoothing_auto_factor = 120
set dshot_bidir = ON
set motor_output_reordering = 3,2,1,0,4,5,6,7
set align_board_yaw = 180
set yaw_motors_reversed = ON
set small_angle = 180
set simplified_gyro_filter_multiplier = 200
set report_cell_voltage = ON
set osd_vbat_pos = 2573
set osd_rssi_pos = 3618
set osd_altitude_pos = 2655
set osd_warnings_pos = 14931
set osd_avg_cell_voltage_pos = 2605
set osd_core_temp_pos = 2637
set pinio_box = 0,40,255,255
set rpm_filter_q = 750

profile 0

# profile 0
set dterm_lpf1_dyn_min_hz = 82
set dterm_lpf1_dyn_max_hz = 165
set dterm_lpf1_static_hz = 165
set dterm_lpf2_static_hz = 165
set feedforward_averaging = 2_POINT
set feedforward_smooth_factor = 65
set dyn_idle_min_rpm = 30
set simplified_dterm_filter_multiplier = 110

profile 1

profile 2

profile 3

# restore original profile selection
profile 0

rateprofile 0

# rateprofile 0
set rates_type = BETAFLIGHT
set roll_rc_rate = 127
set pitch_rc_rate = 127
set yaw_rc_rate = 100
set roll_expo = 40
set pitch_expo = 40
set roll_srate = 72
set pitch_srate = 72
set yaw_srate = 75

rateprofile 1

rateprofile 2

rateprofile 3

# restore original rateprofile selection
rateprofile 0

# save configuration

Flight controller

MAMBAH743_2022B

Other components

No response

How are the different components wired up (including port information)

No response

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

Discord troubleshooting thread: https://discord.com/channels/868013470023548938/1234851582181638296

@ot0tot ot0tot added the Template: Bug Set by auto_close_issue. label Apr 30, 2024
@haslinghuis
Copy link
Member

Think this is handled in

#ifndef PINIO1_BOX
#define PINIO1_BOX PERMANENT_ID_NONE
#endif
#ifndef PINIO2_BOX
#define PINIO2_BOX PERMANENT_ID_NONE
#endif
#ifndef PINIO3_BOX
#define PINIO3_BOX PERMANENT_ID_NONE
#endif
#ifndef PINIO4_BOX
#define PINIO4_BOX PERMANENT_ID_NONE
#endif

#define PERMANENT_ID_NONE 255

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@github-actions github-actions bot added the Inactive Automatically detected and labeled, will be closed after another week of inactivity. label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inactive Automatically detected and labeled, will be closed after another week of inactivity. Template: Bug Set by auto_close_issue.
Projects
None yet
Development

No branches or pull requests

2 participants