Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

timeout for fcu.connect() never happens when no FCU is hooked up #58

Closed
catkira opened this issue Feb 26, 2024 · 2 comments
Closed

timeout for fcu.connect() never happens when no FCU is hooked up #58

catkira opened this issue Feb 26, 2024 · 2 comments

Comments

@catkira
Copy link

catkira commented Feb 26, 2024

I have set my timeout to 1.0, but the connect() function gets stuck indefinately if no FCS is hooked up.
If I enable output for the connect() routine, it stops after these lines

#Status:
 Cycle time: <unset> us
 I2C errors: <unset>
 Sensors:
    Accelerometer: OFF
    Barometer: OFF
    Magnetometer: OFF
    GPS: OFF
    Sonar: OFF
 Active Boxes (by ID):
#Ident:
 MultiWii Version: <unset>
 MSP Version: <unset>
 Type: UNDEFINED
 Capabilities:
    Bind:   OFF
    DynBal: OFF
    Flap:   OFF

so it probably gets stuck somewhere in this code

    // get boxes
    initBoxes();

    // determine channel mapping
    if(getFwVariant() == msp::FirmwareVariant::MWII) {
        // default mapping
        for(uint8_t i(0); i < msp::msg::MAX_MAPPABLE_RX_INPUTS; ++i) {
            channel_map_[i] = i;
        }
    }
    else {
        // get channel mapping from MSP_RX_MAP
        msp::msg::RxMap rx_map(fw_variant_);
        client_.sendMessage(rx_map, timeout);
        if(print_info) std::cout << rx_map;
        channel_map_ = rx_map.map;
    }
@christianrauch
Copy link
Owner

Can you provide a reproducible example that shows the hanging? I tried this with an USB-Serial-Adapter (067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P) but cannot reproduce a hang.

However, I encountered a different error when looking up the flight controller variant. This has been addressed in #61. Does this PR fix your issue too?

@catkira
Copy link
Author

catkira commented Feb 26, 2024

I will try a bit tomorrow. I am using a verilog uart (UARTLITE) from Xilinx on a ZYNQ fpga.

@catkira catkira closed this as completed Mar 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants