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

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

  • 1685 Replies
  • 848008 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Adding new cameras, applying patches into trunk (with source code prepared)
« Reply #1460 on: 06 / February / 2016, 17:36:47 »
Advertisements
Wow - first submitted patch in almost six months.  That must be something of a record.

Patch to fix OSD keyboard for Powershot N & Powershot N Facebook when CHDK OSD is rotated 180 deg.

(per http://chdk.setepontos.com/index.php?topic=12684.msg126574#msg126574)

Also removed a bit of dead code just because.  As noted elsewhere,  the touchscreen code for the four or five ported cameras needs to be harmonized at some point.

Added in revision 4425.

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)

Patch to enable the RAW exception for "Sports" mode on the SX50hs per Disable raw in Sports Mode on SX50?

Patch works for both 1.4 and the dev trunks.  Tested on 1.00c firmware. 
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Patch to enable the RAW exception for "Sports" mode on the SX50hs per Disable raw in Sports Mode on SX50?

Patch works for both 1.4 and the dev trunks.  Tested on 1.00c firmware.
Added, trunk 4562, stable 4563
Don't forget what the H stands for.

Patch, check for installed toolset
« Reply #1463 on: 15 / May / 2016, 08:55:12 »
Just starting with some development, and it is annoying for me that I need to set the OPT_USE_GCC_EABI, while it can be detected easily.
Yes, I know that it can be put in buildconf.inc, but I like to minimize the number of necessary settings.

Jaap

A hint for language ids?
« Reply #1464 on: 15 / May / 2016, 09:00:55 »
Hello,

The default.lua script does not work correct when the user uses another display language as german or english.
While this is not a show stopper, I would like to modify this script, so all languages are supported. But can someone give me a hint where I can find the language numbers for all other languages?

*

Offline srsa_4c

  • ******
  • 4451
Re: A hint for language ids?
« Reply #1465 on: 15 / May / 2016, 11:18:30 »
The default.lua script does not work correct when the user uses another display language as german or english.
While this is not a show stopper, I would like to modify this script, so all languages are supported. But can someone give me a hint where I can find the language numbers for all other languages?
The script reads property case 196 or 61 (depending on the cam's propset). It then tries to work out the correct offset for the recognized languages.

Problem is:
- we don't know the correct propcase number for some propsets (this propcase is not in the propcasex.h headers)
- I'm not sure we know all details about how Canon has been expanding the list of supported languages

I've been thinking about using a different method. There is a firmware function I named "get_string_by_id". For ID=0, I think it returns the name of the currently active interface language as UTF-8(?) string. Problem is,
- this function is not currently identified for early (VxWorks) cameras
- it's not exposed to scripts
- it has only been tested on a few models


Should this discussion continue, it's better in a separate thread.


About auto-recognizing the toolchain: I'm neutral on this. Let reyalp decide.

*

Offline reyalp

  • ******
  • 14126
Re: A hint for language ids?
« Reply #1466 on: 15 / May / 2016, 14:54:16 »
About auto-recognizing the toolchain: I'm neutral on this. Let reyalp decide.
I don't care much one way or the other about auto-detection, but I think eabi should be the default and should be used for all normal CHDK development now. It's already the default on the autobuild and required for D6, and pre-built toolchains are available for most platforms. We could still use the auto-detect logic.

I'd be tempted to remove elf support either before the 1.5 release or for 1.6.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
CAM_MAX_ISO_OVERRIDE
« Reply #1467 on: 03 / June / 2016, 20:21:40 »
Posting this here before commit, so there's a chance someone will notice if there's something obviously wrong with it.
CAM_MAX_ISO_OVERRIDE, introduced specifically for the sx520/530 port which has problems with high ISO values.
I simply searched for CAM_MIN_ISO_OVERRIDE and added the optional upper limit where the lower limit is enforced.

Patch (with slightly different comments) was originally posted here: https://chdk.setepontos.com/index.php?topic=12418.msg128758#msg128758
Code: [Select]
Index: core/shooting.c
===================================================================
--- core/shooting.c (revision 4635)
+++ core/shooting.c (working copy)
@@ -304,6 +304,11 @@
     // Some cameras will crash if flash used and ISO set lower than this value (most easily tested in AUTO mode)
     if ((iso > 0) && (iso < CAM_MIN_ISO_OVERRIDE)) iso = CAM_MIN_ISO_OVERRIDE;
 #endif
+#ifdef CAM_MAX_ISO_OVERRIDE
+    // Limit max ISO
+    // Some cameras will crash if ISO set higher than this value (dependence on flash is unclear)
+    if (iso > CAM_MAX_ISO_OVERRIDE) iso = CAM_MAX_ISO_OVERRIDE;
+#endif
     return shooting_iso_market_to_real(iso);    // return real value (after limits applied)
 }
 
@@ -416,6 +421,10 @@
             // Limit min (non-zero) ISO
             if ((iso > 0) && (iso < ISO_MARKET_TO_REAL(CAM_MIN_ISO_OVERRIDE))) iso = ISO_MARKET_TO_REAL(CAM_MIN_ISO_OVERRIDE);
 #endif
+#ifdef CAM_MAX_ISO_OVERRIDE
+            // Limit max ISO
+            if (iso > ISO_MARKET_TO_REAL(CAM_MAX_ISO_OVERRIDE)) iso = ISO_MARKET_TO_REAL(CAM_MAX_ISO_OVERRIDE);
+#endif
             shooting_set_sv96(shooting_get_sv96_from_iso(iso), is_now);
         }
     }
Index: include/camera.h
===================================================================
--- include/camera.h (revision 4635)
+++ include/camera.h (working copy)
@@ -207,6 +207,7 @@
     #undef  CAM_DISABLE_RAW_IN_DIGITAL_IS       // For cameras with 'Digital IS' mode that does not work with raw define this   
     #undef  CAM_DISABLE_RAW_IN_SPORTS           // For cameras that corrupt DNG/JPEG in Sports mode
     #undef  CAM_ISO_LIMIT_IN_HQ_BURST           // Defines max 'market' ISO override value for HQ Burst mode (higher values crash camera)
+    #undef  CAM_MAX_ISO_OVERRIDE                // Defines max 'market' (non-zero) ISO override value - higher value may crash
     #undef  CAM_MIN_ISO_OVERRIDE                // Defines min 'market' (non-zero) ISO override value - lower value may crash if flash used [0 = AUTO, so always allowed]
     
     #undef  CAM_HAS_GPS                         // for cameras with GPS reseiver: includes the GPS coordinates in in DNG file
Index: platform/sx520hs/platform_camera.h
===================================================================
--- platform/sx520hs/platform_camera.h (revision 4635)
+++ platform/sx520hs/platform_camera.h (working copy)
@@ -142,7 +142,10 @@
     #define CAM_SD_OVER_IN_AFL              1
     #define CAM_SD_OVER_IN_MF               1
 
+    #define CAM_MIN_ISO_OVERRIDE            100     // https://chdk.setepontos.com/index.php?topic=12314.msg128518#msg128518
+    #define CAM_MAX_ISO_OVERRIDE            3200    // https://chdk.setepontos.com/index.php?topic=12314.msg128683#msg128683
 
+
     #undef DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY  //jeronymo
     #define DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY 1
 //----------------------------------------------------------
Index: platform/sx530hs/platform_camera.h
===================================================================
--- platform/sx530hs/platform_camera.h (revision 4635)
+++ platform/sx530hs/platform_camera.h (working copy)
@@ -142,7 +142,10 @@
     #define CAM_SD_OVER_IN_AFL              1
     #define CAM_SD_OVER_IN_MF               1
 
+    #define CAM_MIN_ISO_OVERRIDE            100     // https://chdk.setepontos.com/index.php?topic=12314.msg128518#msg128518
+    #define CAM_MAX_ISO_OVERRIDE            3200    // https://chdk.setepontos.com/index.php?topic=12314.msg128683#msg128683
 
+
     #undef DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY  //jeronymo
     #define DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY 1
 //----------------------------------------------------------

*

Offline reyalp

  • ******
  • 14126
Re: CAM_MAX_ISO_OVERRIDE
« Reply #1468 on: 04 / June / 2016, 16:37:21 »
Posting this here before commit, so there's a chance someone will notice if there's something obviously wrong with it.
Looks fine to me.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: CAM_MAX_ISO_OVERRIDE
« Reply #1469 on: 04 / June / 2016, 20:27:50 »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal