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

DFReader.py: emit enumeration value name when verbose-dumping #955

Merged

Conversation

peterbarker
Copy link
Contributor

@shancock884

    Rsn: 2 GCS_COMMAND 
2024-06-30 03:16:09.587: MODE
    TimeUS: 4987197968 µs
    Mode: 6 
    ModeNum: 6 
    Rsn: 2 GCS_COMMAND 

(we don't emit the mode enumerations into the ArduPilot metadata yet)

dump --verbose ARM 
MAV> 2024-06-30 03:17:41.162: ARM
    TimeUS: 5078772628 µs
    ArmState: 0 
    ArmChecks: 0 
      ! ARMING_CHECK_ALL
      ! ARMING_CHECK_BARO
      ! ARMING_CHECK_COMPASS
      ! ARMING_CHECK_GPS
      ! ARMING_CHECK_INS
      ! ARMING_CHECK_PARAMETERS
      ! ARMING_CHECK_RC
      ! ARMING_CHECK_VOLTAGE
      ! ARMING_CHECK_BATTERY
      ! ARMING_CHECK_AIRSPEED
      ! ARMING_CHECK_LOGGING
      ! ARMING_CHECK_SWITCH
      ! ARMING_CHECK_GPS_CONFIG
      ! ARMING_CHECK_SYSTEM
      ! ARMING_CHECK_MISSION
      ! ARMING_CHECK_RANGEFINDER
      ! ARMING_CHECK_CAMERA
      ! ARMING_CHECK_AUX_AUTH
      ! ARMING_CHECK_VISION
      ! ARMING_CHECK_FFT
      ! ARMING_CHECK_OSD
    Forced: 0 
    Method: 13 LANDED 

Copy link
Contributor

@shancock884 shancock884 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took it for a spin and looks good... 1 teeny suggestion...

DFReader.py Outdated
enum_entry_name = entry.get('name')
break

f.write(f" {enum_entry_name}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f.write(f" {enum_entry_name}")
f.write(f" ({enum_entry_name})")

Maybe brackets around the enum entry name for consistency with what is done for tlogs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I was going backwards and forwards on this, so I'll make the change.

@peterbarker peterbarker force-pushed the pr/dfreader-dump-enum-entry-name branch from fba84fc to b287f4f Compare July 3, 2024 08:01
@peterbarker peterbarker merged commit d496685 into ArduPilot:master Jul 3, 2024
12 checks passed
@peterbarker
Copy link
Contributor Author

Merged this, thanks @shancock884

@peterbarker peterbarker deleted the pr/dfreader-dump-enum-entry-name branch October 1, 2024 10:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants