Adding new cameras, applying patches into trunk (with source code prepared) - page 153 - General Discussion and Assistance - CHDK Forum supplierdeeply

Adding new cameras, applying patches into trunk (with source code prepared)

  • 1611 Replies
  • 436228 Views
Advertisements
I recommend rejecting this patch, as IMHO the current code is working - although perhaps not doing what dmitrys want.
Changing behaviour that could have unexpected side effects is not a good idea, no matter how innocuous it might seem.
See - https://chdk.setepontos.com/index.php?topic=13091.msg133556#msg133556

Please take the time to read other people's posts before replying.
See - https://chdk.setepontos.com/index.php?topic=13179.msg133545#msg133545
Author of CHIMP, Canon Hack Installation and Management Platform

Patch to localize the remaining module names (not included in the previous patch due to false perception of the existence of "system modules").
  • Added strings:
    • "RAW Operations"
    • "Shot Histogram"
    • "Hex Number Editor"
    • "Text Box"
  • Replaced "dll" names with existing menu strings.
  • Included Russian translation.

Attached are two separate patches - one without the russian.lng changes and a separate one with those isolated.

As for the File Browser localization patch, I suggest that I submit it along with the revamped File Browser changes.
Author of CHIMP, Canon Hack Installation and Management Platform

Patch to fix the partition type being incorrectly reported by get_partitionInfo() as discussed.

I fixed the partition size as well. I'll post an updated patch as soon as we settle on backwards compatibility.

Patch with a backward-compatible implementation attached.
« Last Edit: 27 / June / 2017, 18:41:29 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline philmoz

  • *****
  • 3124
    • Photos
Patch with a backward-compatible implementation attached.


For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


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)


For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


Phil.

That's partially correct. That value has nothing to do with partition info (it doesn't even return the size of a partition). Anyway, this should "fix" that.
« Last Edit: 27 / June / 2017, 18:41:55 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline philmoz

  • *****
  • 3124
    • Photos
Patch to localize the remaining module names (not included in the previous patch due to false perception of the existence of "system modules").
  • Added strings:
    • "RAW Operations"
    • "Shot Histogram"
    • "Hex Number Editor"
    • "Text Box"
  • Replaced "dll" names with existing menu strings.
  • Included Russian translation.

Attached are two separate patches - one without the russian.lng changes and a separate one with those isolated.

As for the File Browser localization patch, I suggest that I submit it along with the revamped File Browser changes.


AFAIK, the ModuleName field, for modules with a type of 'MTYPE_EXTENSION', is not used in the core CHDK code.
In this case, moving these strings to the language file(s) serves no purpose, and just wastes memory.


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)

*

Offline philmoz

  • *****
  • 3124
    • Photos
For a dual partition card, this appears to change the 'size' value returned by luaCB_get_partitionInfo from the size of the large partition where photos will be saved, to the size of the small (bootable) partition.


Phil.

That's partially correct. That value has nothing to do with partition info (it doesn't even return the size of a partition). Anyway, this should "fix" that.


The return value from GetTotalCardSpaceKb is the size of the photos partition in kilobytes - how is that not the size of the partition?


Patch is in unicode (again).


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)

AFAIK, the ModuleName field, for modules with a type of 'MTYPE_EXTENSION', is not used in the core CHDK code.
In this case, moving these strings to the language file(s) serves no purpose, and just wastes memory.


Phil.

Purpose.

As for memory use, do these couple of dozens extra bytes really matter? If I may remind you, the entire main menu is kept in memory for reasons that are still beyond me.
Author of CHIMP, Canon Hack Installation and Management Platform


The return value from GetTotalCardSpaceKb is the size of the photos partition in kilobytes - how is that not the size of the partition?

Actually, it's the size of the file system, which is different from partition size. See screenshots attached.

Quote
Patch is in unicode (again).

Damn git diff. Reuploaded both.

P.S. Does the BOM actually prevent patch from succeeding?
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline philmoz

  • *****
  • 3124
    • Photos
AFAIK, the ModuleName field, for modules with a type of 'MTYPE_EXTENSION', is not used in the core CHDK code.
In this case, moving these strings to the language file(s) serves no purpose, and just wastes memory.


Phil.

Purpose.


No purpose for CHDK.


Quote
As for memory use, do these couple of dozens extra bytes really matter?


Yes.


Quote
If I may remind you, the entire main menu is kept in memory for reasons that are still beyond me.


Simplicity, speed, ensuring the menu is always displayed (not affected by bad installation, missing files, file system corruption, ...).


If I may remind you, you are dealing with people who have thousands of hours of experience with CHDK.
Be polite or risk getting banned.


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)

 

Related Topics