diydrones / APM_Log_File_Analyzer

A program to analyse the log files produced by the ArduCopter firmware for an APM flight controller.
11 stars 9 forks source link

USB Connected #21

Closed bionicbone closed 10 years ago

bionicbone commented 10 years ago

No progress has been made with this and developers do not seem concerned.

Comment out this warning, but leave the USB connected in the analysis.

In some logs we see this changing value during flights, each time I have seen this it has been in RTL mode, I think as I abort the RTL by mode change.

Log FileName: C:\Program Files (x86)\Mission Planner\logs\2014-09-13 12-54-51.log image

Kev

bionicbone commented 10 years ago

It looks like my information of what the bits in this flag were incorrect.

the true value are here, I need to recode this part

//Documentation of GLobals: static union { struct { uint8_t home_is_set : 1; // 0 uint8_t simple_mode : 2; // 1,2 // This is the state of simple mode : 0 = disabled ; 1 = SIMPLE ; 2 = SUPERSIMPLE

    uint8_t pre_arm_rc_check    : 1; // 3   // true if rc input pre-arm checks have been completed successfully
    uint8_t pre_arm_check       : 1; // 4   // true if all pre-arm checks (rc, accel calibration, gps lock) have been performed
    uint8_t auto_armed          : 1; // 5   // stops auto missions from beginning until throttle is raised
    uint8_t logging_started     : 1; // 6   // true if dataflash logging has started

    uint8_t do_flip             : 1; // 7   // Used to enable flip code
    uint8_t takeoff_complete    : 1; // 8
    uint8_t land_complete       : 1; // 9   // true if we have detected a landing

    uint8_t new_radio_frame     : 1; // 10      // Set true if we have new PWM data to act on from the Radio
    uint8_t CH7_flag            : 2; // 11,12   // ch7 aux switch : 0 is low or false, 1 is center or true, 2 is high
    uint8_t CH8_flag            : 2; // 13,14   // ch8 aux switch : 0 is low or false, 1 is center or true, 2 is high
    uint8_t usb_connected       : 1; // 15      // true if APM is powered from USB connection
    uint8_t yaw_stopped         : 1; // 16      // Used to manage the Yaw hold capabilities

    uint8_t disable_stab_rate_limit : 1; // 17  // disables limits rate request from the stability controller

    uint8_t rc_receiver_present : 1; // 18  // true if we have an rc receiver present (i.e. if we've ever received an update
};
uint32_t value;

} ap;

bionicbone commented 10 years ago

Completed code change for analysis of V3.1.? and V3.2.?

During testing I noticed that Ch7 keeps changing as RTL is activated, I think by pilot, however placement in the analysis is confusing and not easy to understand this is what activated the RTL.

Need to understand exactly my switching, is CH7 High for RTL or Low?

Test File Log FileName: C:\Program Files (x86)\Mission Planner\logs\2014-09-13 12-54-51.log

Do not push "Fix-USB-Issue" code until sure.

Is there any way I can look at Parameters to show what the Channel is assigned to do?

Also, Channel 7 up to a 3 position switch and check we detect all states,

Kev

bionicbone commented 10 years ago

On my logs Channel 7 is set to RTL. Should be Low during normal flight and High to activate RTL. Channel 8 is just assigned to a side slider and not set to do anything. normally it should be centered but may get caught during flights.

Still need to review my logs for when I activate RTL using Channel 7 to ensure the reporting in the Analysis window is clear the the user activated RTL using the Switch.

bionicbone commented 10 years ago

Full sorted now.

Tested only on firmware v3.1, should support v3.2

Tests show that USB is now detected correctly. Tests show that Channel 7 & 8 are being detected correctly in their correct position (Low, Center, High) - BitWise Coding Bug Removed!

Push request and Close Call