inav-configurator icon indicating copy to clipboard operation
inav-configurator copied to clipboard

Mission control WP missions files not saving 7.1 RC1

Open breadoven opened this issue 11 months ago • 1 comments

It's not possible to save a WP mission file in Configurator 7.1 RC1 if FW Auto landing is set up for a Landing WP. Fails in mission_control.js:

let approachIdx = 0;
for (let i = SAFEHOMES.getMaxSafehomeCount(); i < FW_APPROACH.getMaxFwApproachCount(); i++){
    let approach = FW_APPROACH.get()[i];
    if (approach.getLandHeading1() != 0 || approach.getLandHeading2() != 0) {
        var item = { $: {
            'index': approachIdx,
            'no': approach.getNumber(),
            'approach-alt': approach.getApproachAltAsl(),
            'land-alt': approach.getLandAltAsl(),
            'approach-direction': approach.getApproachDirection() == 0 ? 'left' : 'right',
            'landheading1': approach.getLandHeading1(),
            'landheading2': approach.getLandHeading2(),
            'sealevel-ref': approach.getIsSeaLevelRef() ? 'true' : 'false'
        }};
        data.fw_approach.push(item);    **FAILS HERE**

script.js:46680 Uncaught TypeError: Cannot read properties of undefined (reading 'push') at saveMissionFile (script.js:46680:34) at script.js:46358:17 at HTMLInputElement. (script.js:6672:13)

breadoven avatar Mar 02 '24 21:03 breadoven

Fixed: #1984

Scavanger avatar Mar 05 '24 20:03 Scavanger