Problem with the source - General Discussion and Assistance - CHDK Forum supplierdeeply

Problem with the source

  • 2 Replies
  • 2128 Views
*

Offline RaduP

  • *****
  • 926
Problem with the source
« on: 20 / September / 2009, 21:43:03 »
Advertisements
In trying to port the SD980, I came upon this beautiful code:
/core/kbd.c
Code: [Select]
#ifndef SYNCHABLE_REMOTE_NOT_ENABLED
//stuff

Now, inside that ifndef code we have:
Code: [Select]
for(i=0;i<ZSTEP_TABLE_SIZE;i++){
ZSTEP_TABLE_SIZE is not defined anywhere in chdk (I searched in all the files in the zip archive).

Now, I wouldn't have a problem with that, but I think it is bad practice to do that.
Why not instead use: #ifdef SYNCHABLE_REMOTE_ENABLED ?

BTW, I didn't find SYNCHABLE_REMOTE_NOT_ENABLED anywhere in the code except in /core/kbd.c


*

Offline reyalp

  • ******
  • 14113
Re: Problem with the source
« Reply #1 on: 20 / September / 2009, 23:00:50 »
In trying to port the SD980, I came upon this beautiful code:
/core/kbd.c
Code: [Select]
#ifndef SYNCHABLE_REMOTE_NOT_ENABLED
//stuff

Now, inside that ifndef code we have:
Code: [Select]
for(i=0;i<ZSTEP_TABLE_SIZE;i++){
ZSTEP_TABLE_SIZE is not defined anywhere in chdk (I searched in all the files in the zip archive).
It's defined in kbd.c, with different values depending on how many zoom steps the camera has.
Don't forget what the H stands for.

*

Offline RaduP

  • *****
  • 926
Re: Problem with the source
« Reply #2 on: 20 / September / 2009, 23:31:59 »
Oh, ok, right, I found it.
Nevertheless, shouldn't that be in /include/camera.h ?

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal