Index: /trunk/platform/ixus95_sd1200/main.c
===================================================================
--- /trunk/platform/ixus95_sd1200/main.c	(revision 952)
+++ /trunk/platform/ixus95_sd1200/main.c	(revision 953)
@@ -67,10 +67,7 @@
 #define MODESCNT (sizeof(modemap)/sizeof(modemap[0]))
 
-//SD780 is [f/3.2 is 6mm] [f/3.5 7mm] [f/4.5 11mm] [f/5   15mm] [f/5.8 18mm]
-//SD780 is 5.9-17.9mm f/3.2-5.8 (35mm film equivalent: 33-100mm)
-//SD780 is CF_EFL = (33/6)*10000=55000 or (100/18)*10000=55555.
-static const int fl_tbl[] = {6000, 7000, 11000, 15000, 18000};
+static const int fl_tbl[] = {6200,7230,8295,9681,11614,14303,18600};
 #define NUM_FL (sizeof(fl_tbl)/sizeof(fl_tbl[0]))
-#define CF_EFL 55278 // split the difference
+#define CF_EFL 56452
 
 const int zoom_points = NUM_FL;
Index: /trunk/platform/ixus95_sd1200/lib.c
===================================================================
--- /trunk/platform/ixus95_sd1200/lib.c	(revision 952)
+++ /trunk/platform/ixus95_sd1200/lib.c	(revision 953)
@@ -30,18 +30,15 @@
 }
 
-// based on SX10, values found by experiment
-void ubasic_set_led(int led, int state, int bright) {
-    return; /* doesn't seem to work */
- static char led_table[]={0, // green
-                          1, // orange, right
-                          2, // yellow, left
-                          3, // power
-                          // 4,5,6,7,
-                          8, // blue
-                          9 // af
-                          };
- if((unsigned)led < sizeof(led_table))
-  _LEDDrive(led_table[led], state<=1 ? !state : state);
-// _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state);
+
+// from  Microfunguy in
+// http://chdk.setepontos.com/index.php/topic,4324.msg55475.html#msg55475
+void ubasic_set_led(int led, int state, int bright)
+{
+   int leds[] = {0x134,0x138,0x134,0x130,0x134,0x3030,0x3030};  //  green=4 | (yellow) | (not used) | orange | (not used) | af beam | timer
+   volatile long *p=(void*)0xc0220000 + leds[(led-4)%sizeof(leds)];
+   if (state)
+      p[0]=0x46;
+   else
+      p[0]=0x44;
 }
 
