my CHDK space bar indicator is off, what could create this? - General Help and Assistance on using CHDK stable releases - CHDK Forum

my CHDK space bar indicator is off, what could create this?

  • 4 Replies
  • 220 Views
*

Offline Mlapse

  • ***
  • 220
  • A480 A490 S95 M10
my CHDK space bar indicator is off, what could create this?
« on: 15 / November / 2019, 01:54:49 »
Advertisements
While trying to test some ideas I noticed again how the space bar indicator is a strange thing. Are my cams bad in math?
after a few days of shooting it usually turn red as if the card is full.
as far as I can tell it does not influence the shooting or storing of images on the sd card.
however I still think it is better if it wasn't doing that.
the red bar will clear up to white after a reboot or just some more days of shooting.
I was wondering what could make this happen?

in the example you see the red bar with 44G space left on a 64G card.


« Last Edit: 15 / November / 2019, 02:28:59 by Mlapse »
frustration is a key ingredient in progress

*

Offline srsa_4c

  • ******
  • 4031
Re: my CHDK space bar indicator is off, what could create this?
« Reply #1 on: 15 / November / 2019, 11:22:40 »
I was wondering what could make this happen?
An integer overflow, somewhere around 42GB.
Code: [Select]
Index: core/gui_space.c
===================================================================
--- core/gui_space.c (revision 5292)
+++ core/gui_space.c (working copy)
@@ -11,7 +11,8 @@
 //-------------------------------------------------------------------
 
 unsigned long get_space_perc() {
-    return GetFreeCardSpaceKb()*100/GetTotalCardSpaceKb();
+    // accuracy reduced to support cards up to 2TB
+    return (GetFreeCardSpaceKb()>>6)*100/(GetTotalCardSpaceKb()>>6);
 }
edit:
patch updated to avoid a second division
« Last Edit: 15 / November / 2019, 13:15:39 by srsa_4c »

*

Offline Mlapse

  • ***
  • 220
  • A480 A490 S95 M10
Re: my CHDK space bar indicator is off, what could create this?
« Reply #2 on: 15 / November / 2019, 12:00:14 »
An integer overflow, somewhere around 42GB.

thanks srsa_4c very insightful, alas, nothing i can do about that ;)

Closer to 40G I'd say, then it goes back to white.
« Last Edit: 15 / November / 2019, 12:03:26 by Mlapse »
frustration is a key ingredient in progress

*

Offline philmoz

  • *****
  • 3129
    • Photos
Re: my CHDK space bar indicator is off, what could create this?
« Reply #3 on: 15 / November / 2019, 16:10:06 »
An integer overflow, somewhere around 42GB.

thanks srsa_4c very insightful, alas, nothing i can do about that ;)



What happens if you set the Filespace, Warning Unit to MB instead of Percent (CHDK Settings / OSD Settings)?


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 Mlapse

  • ***
  • 220
  • A480 A490 S95 M10
Re: my CHDK space bar indicator is off, what could create this?
« Reply #4 on: 15 / November / 2019, 17:00:43 »
patch updated to avoid a second division

great, i'll download and test that next week, I'm now working with revision 5172 with a 10 second start delay for the large sd cards i'm using.
frustration is a key ingredient in progress

 

Related Topics