Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8770149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:30:24+00:00 2026-06-13T17:30:24+00:00

I am working with a PTP ( ISO 15740 ) library (manipulating camera settings

  • 0

I am working with a PTP (ISO 15740) library (manipulating camera settings via USB host) for the Arduino. It uses this constant, which appears to be some kind of hashtable array. The problem is I don’t know what it’s called, so I am not sure how to search for it online, and since I am not a seasoned C++ programmer I don’t know how to use it. How does this work?

const ValueTitle<VT_SHSPEED, VT_SHSPEED_TEXT_LEN> ShutterSpeedTitles[] PROGMEM =
{
{0x0c,  {'B','u','l','b',0} },
{0x10,  {' ','3','0','"',0} },
{0x13,  {' ','2','5','"',0} },
{0x14,  {' ','2','0','"',0} },
{0x15,  {' ','2','0','"',0} },
{0x18,  {' ','1','5','"',0} },
{0x1B,  {' ','1','3','"',0} },
{0x1C,  {' ','1','0','"',0} },
{0x1D,  {' ','1','0','"',0} },
{0x20,  {' ',' ','8','"',0} },
{0x23,  {' ',' ','6','"',0} },
{0x24,  {' ',' ','6','"',0} },
{0x25,  {' ',' ','5','"',0} },
{0x28,  {' ',' ','4','"',0} },
{0x2B,  {' ','3','"','2',0} },
{0x2C,  {' ',' ','3','"',0} },
{0x2D,  {' ','2','"','5',0} },
{0x30,  {' ',' ','2','"',0} },
{0x33,  {' ','1','"','6',0} },
{0x34,  {' ','1','"','5',0} },
{0x35,  {' ','1','"','3',0} },
{0x38,  {' ',' ','1','"',0} },
{0x3B,  {' ','0','"','8',0} },
{0x3C,  {' ','0','"','7',0} },
{0x3D,  {' ','0','"','6',0} },
{0x40,  {' ','0','"','5',0} },
{0x43,  {' ','0','"','4',0} },
{0x44,  {' ','0','"','3',0} },
{0x45,  {' ','0','"','3',0} },
{0x48,  {' ',' ',' ','4',0} },
{0x4B,  {' ',' ',' ','5',0} },
{0x4C,  {' ',' ',' ','6',0} },
{0x4D,  {' ',' ',' ','6',0} },
{0x50,  {' ',' ',' ','8',0} },
{0x53,  {' ',' ','1','0',0} },
{0x54,  {' ',' ','1','0',0} },
{0x55,  {' ',' ','1','3',0} },
{0x58,  {' ',' ','1','5',0} },
{0x5B,  {' ',' ','2','0',0} },
{0x5C,  {' ',' ','2','0',0} },
{0x5D,  {' ',' ','2','5',0} },
{0x60,  {' ',' ','3','0',0} },
{0x63,  {' ',' ','4','0',0} },
{0x64,  {' ',' ','4','5',0} },
{0x65,  {' ',' ','5','0',0} },
{0x68,  {' ',' ','6','0',0} },
{0x6B,  {' ',' ','8','0',0} },
{0x6C,  {' ',' ','9','0',0} },
{0x6D,  {' ','1','0','0',0} },
{0x70,  {' ','1','2','5',0} },
{0x73,  {' ','1','6','0',0} },
{0x74,  {' ','1','8','0',0} },
{0x75,  {' ','2','0','0',0} },
{0x78,  {' ','2','5','0',0} },
{0x7B,  {' ','3','2','0',0} },
{0x7C,  {' ','3','5','0',0} },
{0x7D,  {' ','4','0','0',0} },
{0x80,  {' ','5','0','0',0} },
{0x83,  {' ','6','4','0',0} },
{0x84,  {' ','7','5','0',0} },
{0x85,  {' ','8','0','0',0} },
{0x88,  {'1','0','0','0',0} },
{0x8B,  {'1','2','5','0',0} },
{0x8C,  {'1','5','0','0',0} },
{0x8D,  {'1','6','0','0',0} },
{0x90,  {'2','0','0','0',0} },
{0x93,  {'2','5','0','0',0} },
{0x94,  {'3','0','0','0',0} },
{0x95,  {'3','2','0','0',0} },
{0x98,  {'4','0','0','0',0} },
{0x9B,  {'5','0','0','0',0} },
{0x9C,  {'6','0','0','0',0} },
{0x9D,  {'6','4','0','0',0} },
{0xA0,  {'8','0','0','0',0} }
};

Essentially what I am looking for in the end is this. The hex values represent a shutter speed on the camera. The data to the right of the hex humber is the value of the shutter speed if it were visible on the camera display in single character terms. (I guess this could be called a matrix?). I want to plug in my device, and set an exposure on the camera. We’ll say a one second exposure which is represented by the hex value “0x38”. This is a starting point reference.

I want to take five pictures. One of them is “0x38” while the two of the other four are the two exposures before this one, and the other two are the two exposures after this one. So I want to put all five hex values in an array in order so it’d find “0x38” and then search two below, and then find one below, and then the reference, then one above and then two above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:30:25+00:00Added an answer on June 13, 2026 at 5:30 pm

    It is an array initializer:

    Example:

    int  val[] = {1, 2, 3, 4}; // initializes an array of ints.
    

    If you have struct the same syntax works.

    struct X
    {
        int x;
        int y;
    };
    
    X   valX[] = { {1,2}, {3,4}, {5,6}}; // initializes an array of X
                                         // first X is {1,2}
                                         // second X is {3,4}
                                         // etc
    

    In your case the structure is a:

    ValueTitle<VT_SHSPEED, VT_SHSPEED_TEXT_LEN>
    

    But the concept is the same;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with H2 I get this error when I try to write a row
Working with cakePHP this is my situation: I have Users and Order s. Order
Working with Json, how can I NSlog only the title in this code: NSDictionary
Working in Scala-IDE, I have a Java library, in which one of the methods
Working with WCF how it should modify this DataContract or code: <DataContract()> Public Class
Working on an existing webapp (PHP/MySQL) I came to this point: I have 2
Working on a project, I have this issue where my array slicetable returns undefined
Working with Sharepoint 2010, I have a class that inherits SPPersistedObject with various settings:
WORKING: This is my working rich:listShuttle when sourceValue and target value are List of
Working in FlashBuilder, I build a mobile AS3 application that uses a Loader to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.