changelog of trunk including comments / devtalk - page 23 - General Discussion and Assistance - CHDK Forum

changelog of trunk including comments / devtalk

  • 299 Replies
  • 242772 Views
*

Offline reyalp

  • ******
  • 14125
Re: changelog of trunk including comments / devtalk
« Reply #220 on: 21 / December / 2014, 18:59:58 »
Advertisements
The script doesn't run on a plain 1,4 rev.3838 setup with lua calls disabled.
The script crashes the camera when 1,4 rev.3831 updated to 3838 with DISKBOOT.bin and PS.FI2 ... as i wrote before
Did you update the files in CHDK/MODULES ?
Don't forget what the H stands for.

Re: changelog of trunk including comments / devtalk
« Reply #221 on: 21 / December / 2014, 19:13:06 »
The script doesn't run on a plain 1,4 rev.3838 setup with lua calls disabled.
The script crashes the camera when 1,4 rev.3831 updated to 3838 with DISKBOOT.bin and PS.FI2 ... as i wrote before
Did you update the files in CHDK/MODULES ?
In the first case (sd formatted - 1,4 rev.3838 installed) i think new modules were "embedded" in the zip file.
In the second case i stay with modules from rev 3831. Just update the bin and PS.FI2

With the last test the sd was formatted and a plain 1,3 rev.3837 was installed
« Last Edit: 21 / December / 2014, 19:15:45 by fabri22 »

*

Online philmoz

  • *****
  • 3450
    • Photos
Re: changelog of trunk including comments / devtalk
« Reply #222 on: 21 / December / 2014, 19:16:19 »
I think you need to be more specific about "crashes".  Does the camera actually hang up / reset?  Or does the script simply not work?
The script doesn't run on a plain 1,4 rev.3838 setup with lua calls disabled.
The script crashes the camera when 1,4 rev.3831 updated to 3838 with DISKBOOT.bin and PS.FI2 ... as i wrote before

The modules from 3831 are not compatible with the core code from 3838 - make sure to update everything when you update version to ensure there are no compatibility issues.

(I really need to sort out the versioning and checking for module/core code.)

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: changelog of trunk including comments / devtalk
« Reply #223 on: 27 / July / 2015, 00:04:43 »
While working on something else, I noticed that the setmode.lua test failed consistently on cameras where it previously passed. It turns out this happened when get_mode was changed to use cached information from camera_info instead of calling camera functions directly. The camera_info updates in spytask, so it can take kbd_task iterations before script sees the mode change.

In trunk r4195, I added a call to mode_get after the mode switch. The test now passes on all my cams. I could have just updated the test to sleep for a while or query the propcase directly, but the old behavior of the mode change being immediately visible seems more convenient.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: changelog of trunk including comments / devtalk
« Reply #224 on: 02 / August / 2015, 21:00:07 »
From srsa_4c suggestion in the ixus160 thread http://chdk.setepontos.com/index.php?topic=12321.msg123743#msg123743

In trunk 4200, I made raw not save if GetRawCount is < 1. I added a 0.25 raw size margin to GetRawCount to allow for uncertainty in the jpeg calculation, dng header etc.

This may cause previously working ports to break if GetFreeCardSpaceKb (_GetDrive_FreeClusters, GetDrive_ClusterSize) or GetJpgCount have major problems. Since these were previously just informational, it's possible problems have gone unnoticed.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: changelog of trunk including comments / devtalk
« Reply #225 on: 03 / August / 2015, 13:37:51 »
I'd have the following suggestion for  GetRawCount()
Code: [Select]
unsigned int GetRawCount(void)
{
    unsigned free_kb = GetFreeCardSpaceKb();
    unsigned raw_kb =  camera_sensor.raw_size/1024;
    unsigned jpgcount = GetJpgCount();
    unsigned avg_jpg_kb = (jpgcount>0)? free_kb/jpgcount : 0;

    // 0.25 raw margin
    unsigned margin_kb = raw_kb/4;
    if(free_kb <= raw_kb + margin_kb) {
        return 0;
    }
    free_kb -= margin_kb;
    return free_kb/(raw_kb+avg_jpg_kb);
}
That would avoid a possible division by zero. I need this to keep the DIGIC6 code in sync.

I'm not sure about the following conditional in the r4200 version: if (free_kb <= margin_kb) , so I "fixed" that too.

*

Offline reyalp

  • ******
  • 14125
Re: changelog of trunk including comments / devtalk
« Reply #226 on: 08 / August / 2015, 17:10:21 »
I'd have the following suggestion for  GetRawCount()
Code: [Select]
unsigned int GetRawCount(void)
{
    unsigned free_kb = GetFreeCardSpaceKb();
    unsigned raw_kb =  camera_sensor.raw_size/1024;
    unsigned jpgcount = GetJpgCount();
    unsigned avg_jpg_kb = (jpgcount>0)? free_kb/jpgcount : 0;

    // 0.25 raw margin
    unsigned margin_kb = raw_kb/4;
    if(free_kb <= raw_kb + margin_kb) {
        return 0;
    }
    free_kb -= margin_kb;
    return free_kb/(raw_kb+avg_jpg_kb);
}
That would avoid a possible division by zero. I need this to keep the DIGIC6 code in sync.
Good catch. Updated in 4211
Quote
I'm not sure about the following conditional in the r4200 version: if (free_kb <= margin_kb) , so I "fixed" that too.
That was OK I think. The check was to keep subtraction from wrapping, as long as it was more than that, the end result should have been zero. Yours is clearer though.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: changelog of trunk including comments / devtalk
« Reply #227 on: 08 / August / 2015, 17:35:01 »
In trunk 4210, I added a script function get_raw_support, which  returns true if the current capture mode has valid raw data according to the CHDK defines.  I updated the setmode.lua test to report this value.

This can be used with rawop to know in advance if raw framebuffer functions will work, but isn't part of rawop because it's useful in other situations.

I'm not in love with the name but I couldn't come up with a better one, so alternative suggestions are welcome (for a limited time, I'm not going to repeat the remote timing debacle)

Notes:
* A fair number of ports probably don't set the DISABLE_RAW_IN_* defines correctly.
* Currently, dedicated video modes will return true, even though capturing stills in these modes is not possible on many cameras. This is because CHDK doesn't know which cameras can shoot still in video. One thing I've wanted to do for a long time is attach flags to modes (can shoot stills, can start video, uses USER propcases etc) but that's a project for another day.
* This does not check raw settings (enable, exceptions) to see if raw will actually be saved, the purpose is only to check if valid date will be available.
* It might be better to be able to pass the mode number instead of using the current one, but the existing C code isn't set up to do that.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: changelog of trunk including comments / devtalk
« Reply #228 on: 08 / August / 2015, 21:03:04 »
I back-ported the raw / free disk stuff to 1.3 in r4214.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: changelog of trunk including comments / devtalk
« Reply #229 on: 09 / August / 2015, 16:43:27 »
alternative suggestions are welcome (for a limited time, I'm not going to repeat the remote timing debacle)
is_raw_available ?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal