memory viewer enhancement - continuous update - CHDK Releases - CHDK Forum  

memory viewer enhancement - continuous update

  • 4 Replies
  • 6269 Views
*

Offline Bg~

  • *
  • 27
memory viewer enhancement - continuous update
« on: 03 / July / 2008, 16:55:43 »
Advertisements
I noticed after using DataGhost's build that the built in memory viewer does not update unless you press a button. Since I've been trying to observe the live preview image index switching for the motion detection stuff, I modified the built in CHDK memory viewer to continuously update. This is the patch if anyone is interested:

Code: [Select]
Index: gui_debug.c
===================================================================
--- gui_debug.c (revision 431)
+++ gui_debug.c (working copy)
@@ -74,9 +74,9 @@
             draw_txt_string(2, 11, "DOUBLE :", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE));
             draw_txt_string(2, 12, "STRING :", MAKE_COLOR(SCREEN_COLOR, COLOR_WHITE));
 
-            debug_to_draw = 2;
+            debug_to_draw = 0;
             break;
-        case 2:
+        default:
             sprintf(buf, "0x%08X", addr);
             draw_txt_string(10, 0, buf, MAKE_COLOR(COLOR_BLACK, COLOR_WHITE));
             sprintf(buf, "0x%08X", step);
@@ -86,9 +86,6 @@
 
             debug_to_draw = 0;
             break;
-        default:
-            debug_to_draw = 0;
-            break;
     }
 }
 
@@ -101,11 +98,9 @@
         break;
     case KEY_LEFT:
         addr-=step;
-        debug_to_draw = 2;
         break;
     case KEY_RIGHT:
         addr+=step;
-        debug_to_draw = 2;
         break;
     case KEY_DISPLAY:
         switch (step) {
@@ -113,7 +108,6 @@
             case 0x10000000: step = 0x00000004; break;
             default: step<<=4; break;
         }
-        debug_to_draw = 2;
         break;
     }
 }

If you don't want to bother with the patch, just change

Code: [Select]
debug_to_draw = 0;
to

Code: [Select]
debug_to_draw = 2;
in case 2 of the switch statement in the gui_debug_draw() function in gui_debug.c



*

Offline cyril42e

  • ***
  • 111
  • SD1000/Ixus70 1.02a
    • CR-TEKnologies
Re: memory viewer enhancement - continuous update
« Reply #1 on: 04 / July / 2008, 16:45:50 »
I like it. I don't think there is any drawback to constantly update the display, maybe it should be considered to change the default behavior into that.

Another improvement to do concerning the memory viewer: save the currently displayed address when exiting the memory viewer, and display the same address the next time it starts. It's very annoying when you have to exit the memory viewer to change some setting.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: memory viewer enhancement - continuous update
« Reply #2 on: 04 / July / 2008, 16:59:41 »
i see a lot of good things coming where that came from. keep up the good work you two, seems to me you got way more skills than i do, please use it frequently :D

*

Offline Bg~

  • *
  • 27
Re: memory viewer enhancement - continuous update
« Reply #3 on: 05 / July / 2008, 20:49:14 »
Ok, I added saving the last used address in the memory viewer. It only saves when you exit <ALT> mode before turning off the camera (I think anyway). I'll need to learn more about the conf system details, I guess. I also added the use of the zoom key to change the increment in both directions, and the UP key now turns on and off the auto refresh option.

Patch attached.


*

Offline cyril42e

  • ***
  • 111
  • SD1000/Ixus70 1.02a
    • CR-TEKnologies
Re: memory viewer enhancement - continuous update
« Reply #4 on: 06 / July / 2008, 12:19:14 »
Great! Thanks Bg~!

i see a lot of good things coming where that came from. keep up the good work you two, seems to me you got way more skills than i do, please use it frequently :D
Phyrephox is very smart, he's buttering us up to make us work! :D

 

Related Topics