Copy OSD settings from one camera to another? How? - General Help and Assistance on using CHDK stable releases - CHDK Forum

Copy OSD settings from one camera to another? How?

  • 18 Replies
  • 8925 Views
Copy OSD settings from one camera to another? How?
« on: 25 / May / 2018, 01:26:43 »
Advertisements
Hello, I have set up the on screen display settings and menu settings on one camera. I would like to just copy those to another camera rather than do a whole new set up. Which file/folders should I copy?

Another related issue. After installing CHDK on another camera, I copied all the files/ folders of CHDK from one camera to another so I did not have to set up / install all the scripts again.  When using the camera I noticed that the battery % was always reading 0% even though it was fully charged battery. When I unlocked the tab from the SD card, the battery showed full. So, I figured it had to do with the CHDK settings. I noticed that under CHDK settings -OSD settings - battery, that the battery max voltage and min voltage were 8400MV and 7300MV. However this camera uses only a 3.7V battery. So, I figured when I copied files from the other camera that uses a 7.4V battery, these numbers for battery MAX-Min got copied. Is my diagnosis correct? Should I change those numbers to 4300 and 3600? Is there a guidance on how much these numbers should be for a 3.7volt battery camera (however this camera also uses 4.3volt AC adapter through a dummy battery adapter). This perhaps makes it even more important as to which filesshould or should not be copied from one camera to another. Thanks for the guidance.

*

Offline reyalp

  • ******
  • 14125
Re: Copy OSD settings from one camera to another? How?
« Reply #1 on: 25 / May / 2018, 16:31:25 »
Hello, I have set up the on screen display settings and menu settings on one camera. I would like to just copy those to another camera rather than do a whole new set up. Which file/folders should I copy?
Settings are in the .CFG files in the CHDK directory. Most of the OSD related ones should be in OSD__4.CFG, but exactly what qualifies as OSD isn't clearly defined. The battery voltage settings you mentioned are OSD settings.

You get an idea which settings are in which file by looking at the cnf_* files in CHDK/LUALIB/GEN
Note these files do not contain any configuration settings, they just map ID numbers to friendlier names for use in scripts.

If you want to move a subset of settings between cameras, you can do that using the get_config_value and set_config_value script functions: http://chdk.wikia.com/wiki/Script_commands#get_config_value
There have been some scripts for things like this posted in the forum.

Quote
Should I change those numbers to 4300 and 3600?
You should set them to whatever you want, they only define the "full" and "empty" voltages for the UI. Normally, you'd set max to roughly the voltage you get from a battery fresh off the charger, and the low is set to just above where the camera shuts down. These may vary a bit depending on battery and camera even where the battery is the same type.
You can get the default CHDK values by resetting settings to default, but this will reset all your settings. You can also find them in the source code for your particular port in platform/<camera>/main.c https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
battery related OSD config
« Reply #2 on: 26 / May / 2018, 09:05:49 »
Since battery voltages are pretty much camera specific, should not we reset them when loading a different camera's config? Like this:
Code: [Select]
Index: core/conf.c
===================================================================
--- core/conf.c (revision 5014)
+++ core/conf.c (working copy)
@@ -83,6 +83,10 @@
         conf.platformid = PLATFORMID;
         conf.flash_video_override = 0;
 
+        // battery voltages are camera dependent
+        conf.batt_volts_max = get_vbatt_max();
+        conf.batt_volts_min = get_vbatt_min();
+
         // video related entries are interpreted differently on D6 cameras
         conf.video_mode = 0;
         conf.video_quality = VIDEO_DEFAULT_QUALITY;

*

Offline reyalp

  • ******
  • 14125
Re: battery related OSD config
« Reply #3 on: 26 / May / 2018, 14:35:32 »
Since battery voltages are pretty much camera specific, should not we reset them when loading a different camera's config? Like this:
Yeah, that seems like a good idea to me.
Don't forget what the H stands for.

Re: Copy OSD settings from one camera to another? How?
« Reply #4 on: 26 / May / 2018, 18:42:11 »
Thank you for the info. Please help me understand the battery voltage issues. I understand that (without CHDK) the camera needs certain voltage and amps to operate. Below those voltage or amps, the camera will shut down. I don't think all cameras have high voltage or reverse voltage protection. I know because I screwed one camera by inputting external 7.3V instead of 4.7V (confusion between 2 cameras and not checking the needed voltage immediately before inputting).

What is the role of setting max - min voltage values in CHDK. Do these values override the cameras settings and actually shut the camera off if voltage goes above the CHDK max or below the min settings (before it blows the fuse or burns the motherboard)?

Re: Copy OSD settings from one camera to another? How?
« Reply #5 on: 26 / May / 2018, 21:03:03 »
What is the role of setting max - min voltage values in CHDK.
AFAIK, the min & max values are only used when you request that CHDK displays the battery status in % rather than volts.  It uses to those values to convert the voltage reading from the camera's battery into a value between 0% (min) and 100% (max).
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14125
Re: Copy OSD settings from one camera to another? How?
« Reply #6 on: 26 / May / 2018, 23:38:29 »
I checked in srsa_4c's change above. One thing I noticed while testing is that the platform ID is stored as a value in the main CFG, so if you copy only the OSD cfg file, nothing gets reset. Logically, the platform ID should be metadata of the cfg format rather than a value, but I haven't looked at what it would take to do that.

What is the role of setting max - min voltage values in CHDK.
AFAIK, the min & max values are only used when you request that CHDK displays the battery status in % rather than volts.
Yes, the CHDK settings are strictly for the CHDK OSD for the % and battery icon. incorrect, see below
« Last Edit: 27 / May / 2018, 15:47:44 by reyalp »
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Copy OSD settings from one camera to another? How?
« Reply #7 on: 27 / May / 2018, 15:38:54 »
Yes, the CHDK settings are strictly for the CHDK OSD for the % and battery icon.
On cams where the onboard GPS is supported by CHDK, other decisions are also made based on the battery min/max voltage.

One thing I noticed while testing is that the platform ID is stored as a value in the main CFG, so if you copy only the OSD cfg file, nothing gets reset.
Good catch. This scenario was probably not considered when the config was split into parts.
Quote
Logically, the platform ID should be metadata of the cfg format rather than a value, but I haven't looked at what it would take to do that.
The other (but not necessarily better) way would be adding a platform ID to all config fragments.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Copy OSD settings from one camera to another? How?
« Reply #8 on: 27 / May / 2018, 20:56:56 »
Quote
Logically, the platform ID should be metadata of the cfg format rather than a value, but I haven't looked at what it would take to do that.
The other (but not necessarily better) way would be adding a platform ID to all config fragments.
Or move any values that are dependant on platformid into conf_info.
Would require a version update (but all solutions probably would), and possibly a mapping to convert old files.


Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14125
Re: Copy OSD settings from one camera to another? How?
« Reply #9 on: 27 / May / 2018, 22:04:56 »
Would require a version update (but all solutions probably would), and possibly a mapping to convert old files.
Hmm, if we just added it as a value like srsa_4c suggested, it would be backward compatible. Just osd_platformid, gps_platformid etc. A little ugly, but should be straightforward.

We would also need file specific sections in clear_values. Quick patch attached for osd. Seems to work.

I'm not sure if gps and usermenu need any? What happens if a user menu has items that don't exist on the current platform?

Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal