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

More code cosmetic #1029

Merged
merged 11 commits into from
Sep 25, 2024
Merged

More code cosmetic #1029

merged 11 commits into from
Sep 25, 2024

Commits on Sep 24, 2024

  1. remove 7 unnecessary #include "ptp-pack.c" statements

    Move the byte-order-swapping helpers from ptp-pack.c to ptp.h as well as 2
    ptp_free_deviceinfo variants and remove all but one ptp-pack.c inclusions.
    
    This speeds up compile time and removes lots of compiler warning
    repetitions if one shows up in ptp-pack.c.
    axxel committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c58c042 View commit details
    Browse the repository at this point in the history
  2. ptp_pack.c: harmonize PTP_EC_CANON_EOS_PropValueChanged indentation

    Layout this one case block just like the other ones. This is basically a
    whitespace only change.
    axxel committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    e72eb93 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a8730a View commit details
    Browse the repository at this point in the history
  4. ptp2: remove unused PTPCanon_Property members size and data

    PTPDeviceProperty data of EOS cameras is not polled but rather pro-actively
    sent by the camera via a PropValueChanged event. The unpack function used
    to interpret the data and unpack it into the PTPDevicePropDesc struct
    but also copied the raw event data block into an extra member (data, size)
    of the special special PTPCanon_Property struct. This data is then never
    looked at again.
    
    This patch removes those data members and is a first step to completely
    eliminate the special PTPCanon_Property struct.
    axxel committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    9849f18 View commit details
    Browse the repository at this point in the history
  5. ptp2: rename ptp_unpack_... functions for Canon events

    Make the names more consistent and expressive.
    axxel committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    0d3674e View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. ptp2: remove PTPCanon_Propery::proptype member

    The proptype (a.k.a. device property code) is already stored in
    dpd.DevicePropertyCode member. This patch introduces the
    ptp_find_eos_devicepropdesc() function for the commonly repeated for-loop
    looking for the DevicePropDesc* in the cache.
    
    This now allows to completely replace PTPCanon_Property with
    PTPDevicePropDesc and then drop the canon_props array altogether and use
    the generic one.
    axxel committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    327d118 View commit details
    Browse the repository at this point in the history
  2. ptp2: remove unused PTPDeviceProperty::value member

    The current value of the device property is only stored in the
    desc.CurrentValue field.
    axxel committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    b472d80 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6db2bd8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0d1cf16 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9dc7f30 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    400da79 View commit details
    Browse the repository at this point in the history