This source file includes following definitions.
- script_keyid_by_name
- console_set_autoredraw
- action_push_press
- action_push_release
- action_push_click
- action_push_delay
- action_push
- action_wait_for_click
- script_key_is_clicked
- shooting_get_tv
- shooting_set_tv
- shooting_set_tv_rel
- shooting_get_av
- shooting_set_av
- shooting_set_av_rel
- shooting_get_zoom
- shooting_set_zoom
- shooting_set_zoom_rel
- shooting_set_zoom_speed
- shooting_get_focus
- shooting_set_focus
- shooting_get_iso
- shooting_set_iso
- shooting_get_iso_real
- script_console_add_line
- console_set_layout
- script_console_set_autoredraw
- console_redraw
- console_clear
- md_detect_motion
- md_get_cell_diff
- md_get_cell_val
- md_init_motion_detector
- camera_set_nr
- camera_get_nr
- camera_set_raw
- ubasic_camera_get_raw
- shooting_set_prop
- shooting_get_prop
- stat_get_vbatt
- camera_set_led
- camera_get_script_autostart
- camera_set_script_autostart
- get_usb_power
- GetTotalCardSpaceKb
- GetFreeCardSpaceKb
- GetJpgCount
- GetRawCount
- exit_alt
- shooting_set_user_tv_by_id
- shooting_set_user_tv_by_id_rel
- shooting_set_sv96
- shooting_get_av96
- shooting_get_user_av96
- shooting_get_user_av_id
- shooting_set_av96
- shooting_set_av96_direct
- shooting_set_user_av96
- shooting_set_user_av_by_id
- shooting_set_user_av_by_id_rel
- shooting_get_subject_distance
- shooting_get_hyperfocal_distance
- mode_get
- shooting_get_focus_mode
- shooting_get_focus_state
- shooting_get_focus_ok
- shooting_get_iso_market
- shooting_get_bv96
- shooting_get_sv96_real
- shooting_set_iso_real
- shooting_get_iso_mode
- shooting_set_iso_mode
- shooting_set_nd_filter_state
- camera_shutdown_in_a_second
- shooting_get_tv96
- shooting_get_user_tv96
- shooting_get_user_tv_id
- shooting_set_tv96
- shooting_set_tv96_direct
- shooting_set_user_tv96
- get_exposure_counter
- script_key_is_pressed
- shot_histogram_get_range
- script_print_screen_statement
- get_tick_count
- shooting_get_drive_mode
- shot_histogram_isenabled
- get_ccd_temp
- get_optical_temp
- get_battery_temp
- play_sound
- TurnOnBackLight
- TurnOffBackLight
- set_draw_title_line
- get_draw_title_line
- DoAFLock
- UnlockAF
- shot_histogram_set
- levent_set_record
- levent_set_play
- set_capture_mode
- shooting_set_mode_chdk
- shooting_set_mode_canon
- shooting_mode_chdk2canon
- conf_getValue
- conf_setValue
- reboot
- mode_is_video
- swap_partitions
- shooting_update_dof_values
- shooting_sv96_real_to_market
- shooting_sv96_market_to_real
- shooting_set_playrec_mode
- shooting_iso_real_to_market
- shooting_iso_market_to_real
- shooting_is_flash
- shooting_in_progress
- shooting_get_tv96_from_shutter_speed
- shooting_get_sv96_from_iso
- shooting_get_shutter_speed_from_tv96
- shooting_get_resolution
- shooting_get_real_focus_mode
- shooting_get_nd_value_ev96
- shooting_get_nd_current_ev96
- shooting_get_min_av96
- shooting_get_max_av96
- shooting_get_iso_from_sv96
- shooting_get_is_mode
- shooting_get_imager_active
- shooting_get_flash_mode
- shooting_get_ev_correction1
- shooting_get_display_mode
- shooting_get_current_tv96
- shooting_get_current_av96
- shooting_get_current_base_sv96
- shooting_get_current_delta_sv96
- shooting_get_av96_from_aperture
- shooting_get_aperture_from_av96
- shooting_can_focus
- shooting_get_canon_image_format
- shooting_set_canon_image_format
- shooting_get_canon_raw_support
- set_movie_status
- sd_over_modes
- script_set_terminate_key
- script_console_add_error
- lens_get_zoom_point
- is_video_recording
- is_raw_possible
- get_movie_status
- get_localtime
- get_focal_length
- force_usb_state
- kbd_force_analog_av
- enter_alt
- action_top
- action_pop_func
- action_push_func
- action_push_shoot
- DoAELock
- UnlockAE
- DoMFLock
- UnlockMF
- JogDial_CW
- JogDial_CCW
- TurnOnDisplay
- TurnOffDisplay
1 #include <stdio.h>
2 #include <math.h>
3 #include <time.h>
4
5 static int tv=0, av=0, zoom=0, focus=0, iso=0, raw=0, raw_nr=0,autostart=0;
6 int movie_status=0;
7 int shot_histogram_enabled=0;
8 int state_kbd_script_run=1;
9 int zoom_points = 3;
10 #define MODE_REC 0x0100
11 #define AS_SHOOT 1
12 #define CONF_VALUE 2
13 int script_keyid_by_name(const char *s) {
14 return 1;
15 }
16
17 void console_set_autoredraw(int n) {
18 printf("*** console_set_auto_redraw %d ***\n",n);
19 }
20
21 void action_push_press(int k)
22 {
23 printf("*** button press %d ***\n",k);
24 }
25
26 void action_push_release(int k)
27 {
28 printf("*** button release %d ***\n",k);
29 }
30
31 void action_push_click(int k)
32 {
33 printf("*** button click %d ***\n",k);
34 }
35
36 void action_push_delay(int v)
37 {
38 printf("*** sleep %d ***\n",v);
39 }
40
41 void action_push(int id)
42 {
43 if(id == AS_SHOOT)
44 printf("*** shoot ***\n");
45 else
46 printf("*** action_push(%d) ***\n",id);
47 }
48
49 void action_wait_for_click(int t)
50 {
51 printf("*** wait_click %d ***\n", t);
52 }
53
54 int script_key_is_clicked(int k)
55 {
56 printf("*** is_clicked %d ***\n", k);
57 return 1;
58 }
59
60 int shooting_get_tv()
61 {
62 return tv;
63 }
64
65 void shooting_set_tv(int v)
66 {
67 tv = v;
68 printf("*** set tv %d ***\n",v);
69 }
70
71 void shooting_set_tv_rel(int v)
72 {
73 tv += v;
74 printf("*** set tv rel %d ***\n",v);
75 }
76
77 int shooting_get_av()
78 {
79 return av;
80 }
81
82 void shooting_set_av(int v)
83 {
84 av = v;
85 printf("*** set av %d ***\n",v);
86 }
87
88 void shooting_set_av_rel(int v)
89 {
90 av += v;
91 printf("*** set av rel %d ***\n",v);
92 }
93
94 int shooting_get_zoom()
95 {
96 return zoom;
97 }
98
99 void shooting_set_zoom(int v)
100 {
101 zoom = v;
102 printf("*** set zoom %d ***\n",v);
103 }
104
105 void shooting_set_zoom_rel(int v)
106 {
107 zoom += v;
108 printf("*** set zoom rel %d ***\n",v);
109 }
110
111 void shooting_set_zoom_speed(int v)
112 {
113 printf("*** set zoom speed %d ***\n",v);
114 }
115
116 int shooting_get_focus()
117 {
118 return focus;
119 }
120
121 void shooting_set_focus(int v)
122 {
123 focus = v;
124 printf("*** set focus %d ***\n",v);
125 }
126
127 int shooting_get_iso()
128 {
129 return iso;
130 }
131
132 void shooting_set_iso(int v)
133 {
134 iso = v;
135 printf("*** set iso %d ***\n",v);
136 }
137
138 int shooting_get_iso_real()
139 {
140 return iso;
141 }
142
143 void script_console_add_line(const char *str) {
144 printf(">>> %s\n", str);
145 }
146
147 void console_set_layout(int x1, int y1, int x2, int y2) {
148 printf(">>> set console layout to %d %d %d %d\n", x1,y1,x2,y2);
149 }
150
151 void script_console_set_autoredraw(int value) {
152 printf(">>> set console auto_redraw to %d\n", value);
153 }
154
155 void console_redraw() {
156 printf("*** console redraw ***\n");
157 }
158
159 void console_clear() {
160 printf("*** clear console ***\n");
161 }
162 int md_detect_motion(void)
163 {
164 printf("*** md_detect_motion ***\n");
165 return 0;
166 }
167 int md_get_cell_diff(int column, int row)
168 {
169 printf("*** md_get_sell_diff %d %d ***\n", column, row);
170 return 0;
171 }
172 int md_get_cell_val(int column, int row)
173 {
174 printf("*** md_get_sell_abs %d %d ***\n", column, row);
175 return 0;
176 }
177 int md_init_motion_detector()
178 {
179 printf("*** md_init_motion_detector ***\n");
180 return 0;
181 }
182 void camera_set_nr(to)
183 {
184 raw_nr = to;
185 printf("*** set raw nr %d ***\n",raw_nr);
186 };
187
188 int camera_get_nr(to)
189 {
190 printf("*** get raw nr ***\n");
191 return raw_nr;
192 };
193
194 void camera_set_raw(int mode)
195 {
196 raw = mode;
197 printf("*** set raw %d ***\n",raw);
198 }
199
200 int ubasic_camera_get_raw()
201 {
202 return raw;
203 }
204 void shooting_set_prop(int id, int v)
205 {
206 printf("*** set prop %d %d ***\n",id, v);
207 }
208 int shooting_get_prop(int id)
209 {
210 return 0;
211 }
212 long stat_get_vbatt()
213 {
214 return 4085;
215 }
216 void camera_set_led(int led, int state, int bright)
217 {
218 printf("*** set led %d %d %d ***\n",led, state, bright);
219 }
220
221 int camera_get_script_autostart()
222 {
223 return 0;
224 }
225 void camera_set_script_autostart(int state)
226 {
227 autostart = state;
228 printf("*** set autostart %d ***\n",autostart);
229 }
230 int get_usb_power(int edge)
231 {
232 return 0;
233 }
234 int GetTotalCardSpaceKb()
235 {
236 return 0;
237 }
238 int GetFreeCardSpaceKb()
239 {
240 return 0;
241 }
242
243 int GetJpgCount()
244 {
245 printf("*** GetJpgCount ***\n");
246 return 0;
247 }
248
249 int GetRawCount()
250 {
251 printf("*** GetRawCount ***\n");
252 return 0;
253 }
254
255 void exit_alt()
256 {
257 printf("*** exit alt ***\n");
258
259 }
260
261 void shooting_set_user_tv_by_id(int v)
262 {
263 printf("*** shooting_set_user_tv_by_id %d ***\n", v);
264 }
265
266 void shooting_set_user_tv_by_id_rel(int v)
267 {
268 printf("*** shooting_set_user_tv_by_id_rel %d ***\n", v);
269 }
270
271 void shooting_set_sv96(short sv96, short is_now)
272 {
273 printf("*** shooting_set_sv96 %d %d ***\n", sv96, is_now);
274 }
275
276 short shooting_get_av96()
277 {
278 printf("*** shooting_get_av96 ***\n");
279 return 0;
280 }
281
282 short shooting_get_user_av96()
283 {
284 printf("*** shooting_get_user_av96 ***\n");
285 return 0;
286 }
287
288 int shooting_get_user_av_id()
289 {
290 printf("*** shooting_get_user_av_id ***\n");
291 return 0;
292 }
293
294 void shooting_set_av96(short v,short is_now)
295 {
296 printf("*** shooting_set_av96 %d %d ***\n", v, is_now);
297 }
298
299 void shooting_set_av96_direct(short v, short is_now)
300 {
301 printf("*** shooting_set_av96_direct %d %d ***\n", v, is_now);
302 }
303
304 void shooting_set_user_av96(short v)
305 {
306 printf("*** shooting_set_user_av96 %d ***\n", v);
307 }
308
309 void shooting_set_user_av_by_id(int v)
310 {
311 printf("*** shooting_set_user_av_by_id %d ***\n", v);
312 }
313
314 void shooting_set_user_av_by_id_rel(int v)
315 {
316 printf("*** shooting_set_user_av_by_id_rel %d ***\n", v);
317 }
318
319 int shooting_get_subject_distance()
320 {
321 printf("*** shooting_get_subject_distance ***\n");
322 return 1000;
323 }
324
325 int shooting_get_hyperfocal_distance()
326 {
327 printf("*** shooting_get_hyperfocal_distance ***\n");
328 return 1000;
329 }
330
331 int mode_get()
332 {
333 printf("*** mode_get ***\n");
334 return MODE_REC;
335 }
336
337 short shooting_get_focus_mode()
338 {
339 printf("*** shooting_get_focus_mode ***\n");
340 return 0;
341 }
342
343 short shooting_get_focus_state()
344 {
345 printf("*** shooting_get_focus_state ***\n");
346 return 0;
347 }
348
349 short shooting_get_focus_ok()
350 {
351 printf("*** shooting_get_focus_ok ***\n");
352 return 0;
353 }
354
355 short shooting_get_iso_market()
356 {
357 printf("*** shooting_get_iso_market ***\n");
358 return 100;
359 }
360
361 short shooting_get_bv96()
362 {
363 printf("*** shooting_get_bv96 ***\n");
364 return 32;
365 }
366
367 short shooting_get_sv96_real()
368 {
369 printf("*** shooting_get_sv96 ***\n");
370 return 32;
371 }
372
373 void shooting_set_iso_real(short iso, short is_now)
374 {
375 printf("*** shooting_set_iso_real %d %d ***\n", iso, is_now);
376 }
377
378 int shooting_get_iso_mode()
379 {
380 printf("*** shooting_get_iso_mode ***\n");
381 return 0;
382 }
383
384 void shooting_set_iso_mode(int v)
385 {
386 printf("*** shooting_set_iso_mode %d ***\n", v);
387 }
388
389 void shooting_set_nd_filter_state(short v, short is_now)
390 {
391 printf("*** shooting_set_nd_filter_state %d %d ***\n", v, is_now);
392 }
393
394 void camera_shutdown_in_a_second()
395 {
396 printf("*** camera_shutdown_in_a_second ***\n");
397 }
398
399 short shooting_get_tv96()
400 {
401 printf("*** shooting_get_tv96 ***\n");
402 return 0;
403 }
404
405 short shooting_get_user_tv96()
406 {
407 printf("*** shooting_get_user_tv96 ***\n");
408 return 0;
409 }
410
411 int shooting_get_user_tv_id()
412 {
413 printf("*** shooting_get_user_tv_id ***\n");
414 return 0;
415 }
416
417 void shooting_set_tv96(short v, short is_now)
418 {
419 printf("*** shooting_set_tv96 %d %d ***\n", v, is_now);
420 }
421
422 void shooting_set_tv96_direct(short v, short is_now)
423 {
424 printf("*** shooting_set_tv96_direct %d %d ***\n", v, is_now);
425 }
426
427 void shooting_set_user_tv96(short v)
428 {
429 printf("*** shooting_set_user_tv96 %d ***\n", v);
430 }
431
432 int get_exposure_counter(void)
433 {
434 printf("*** get_exposure_counter ***\n");
435 return 123;
436 }
437
438 int script_key_is_pressed( int keyid )
439 {
440 printf("*** script_key_is_pressed %d ***\n", keyid);
441 return 0;
442 }
443
444 int shot_histogram_get_range(int from, int to)
445 {
446 printf("*** shot_histogram_get_range %d,%d ***\n", from,to);
447 return 100;
448 }
449
450 void script_print_screen_statement(int v)
451 {
452 printf("*** script_print_screensatement %d ***\n", v);
453 }
454
455 int get_tick_count(void)
456 {
457 printf("*** get_tick_count ***\n");
458
459 return 10;
460 }
461
462 short shooting_get_drive_mode()
463 {
464 printf("*** shooting_get_drive_mode ***\n");
465
466 return 10;
467 }
468
469 int shot_histogram_isenabled()
470 {
471 printf("*** shot_histogram_isenabled ***\n");
472 return shot_histogram_enabled;
473 }
474
475 int get_ccd_temp()
476 {
477 printf("*** get_ccd_temp ***\n");
478 return 69;
479 }
480 int get_optical_temp()
481 {
482 printf("*** get_optical_temp ***\n");
483 return 69;
484 }
485
486 int get_battery_temp()
487 {
488 printf("*** get_battery_temp ***\n");
489 return 69;
490 }
491
492 void play_sound()
493 {
494 printf("*** play_sound ***\n");
495 }
496
497 void TurnOnBackLight()
498 {
499 printf("*** TurOnBackLight ***\n");
500 }
501
502 void TurnOffBackLight()
503 {
504 printf("*** TurnOffBackLight ***\n");
505 }
506
507 void set_draw_title_line(int m)
508 {
509 printf("*** set CHDK OSD title line ( %d ) ***\n",m);
510 return ;
511 }
512
513 void get_draw_title_line(int m)
514 {
515 printf("*** get CHDK OSD title line state ***\n");
516 return ;
517 }
518
519 void DoAFLock()
520 {
521 printf("*** DoAFLock ***\n");
522 }
523
524 void UnlockAF()
525 {
526 printf("*** UnlockAF ***\n");
527 }
528
529 int shot_histogram_set(int x)
530 {
531 printf("*** shot_histogram_set ***\n");
532 return 1;
533 }
534
535 void levent_set_record()
536 {
537 printf("*** levent_set_record ***\n");
538 }
539
540 void levent_set_play()
541 {
542 printf("*** levent_set_play ***\n");
543 }
544
545 int set_capture_mode(int x)
546 {
547 printf("*** set_capture_mode %d ***\n",x);
548 return 1;
549 }
550
551 int shooting_set_mode_chdk(int x)
552 {
553 printf("*** set_capture_mode_canon %d ***\n",x);
554 return 1;
555 }
556
557 int shooting_set_mode_canon(int x)
558 {
559 printf("*** set_capture_mode_canon %d ***\n",x);
560 return 1;
561 }
562
563 int shooting_mode_chdk2canon(int chdkmode)
564 {
565 printf("*** shooting_mode_chdk2canon %d ***\n",chdkmode);
566 if(chdkmode < 1 || chdkmode > 50)
567 return 0;
568 return 1;
569 }
570
571 int conf_getValue(unsigned short id, int* configVal) {
572 printf("*** get config value %d ***\n",id);
573 *configVal = 1;
574 return CONF_VALUE;
575 }
576
577 int conf_setValue(unsigned short id, int configVal) {
578 printf("*** set config value %d %d***\n",id, configVal);
579 return CONF_VALUE;
580 }
581
582 void reboot(const char *filename)
583 {
584 printf("*** reboot %s ***\n",filename?filename:"NULL");
585 }
586
587 int mode_is_video(int m)
588 {
589 printf("*** mode is video %d ***\n",m);
590 return 0;
591 }
592
593 int swap_partitions(int new)
594 {
595 printf("*** swap_partitions %d ***\n",new);
596 return 1;
597 }
598
599 void shooting_update_dof_values()
600 {
601 printf("*** shooting_update_dof_values ***\n");
602 }
603
604 short shooting_sv96_real_to_market(short isor)
605 {
606 printf("*** shooting_sv96_real_to_market %d ***\n",isor);
607 return isor;
608 }
609
610 short shooting_sv96_market_to_real(short sv96)
611 {
612 printf("*** shooting_sv96_market_to_real %d ***\n",sv96);
613 return sv96;
614 }
615
616 void shooting_set_playrec_mode(int mode)
617 {
618 printf("*** shooting_set_playrec_mode %d ***\n",mode);
619 }
620
621 short shooting_iso_real_to_market(short isor)
622 {
623 printf("*** shooting_iso_real_to_market %d ***\n",isor);
624 return isor;
625 }
626
627 short shooting_iso_market_to_real(short isom)
628 {
629 printf("*** shooting_iso_market_to_real %d ***\n",isom);
630 return isom;
631 }
632
633 int shooting_is_flash()
634 {
635 printf("*** shooting_is_flash ***\n");
636 return 0;
637 }
638
639 int shooting_in_progress()
640 {
641 printf("*** shooting_in_progress ***\n");
642 return 0;
643 }
644
645 static const double inv_log_2 = 1.44269504088906;
646 #define SHOOTING_TV96_INVALID -10000
647
648 short shooting_get_tv96_from_shutter_speed(float t)
649 {
650 printf("*** shooting_get_tv96_from_shutter_speed %f ***\n",t);
651 if (t > 0)
652 {
653 t = ((96.0 * -log(t)) * inv_log_2);
654 if (t < 0)
655 return (short)(t - 0.5);
656 return (short)(t + 0.5);
657 }
658 return SHOOTING_TV96_INVALID;
659 }
660
661 short shooting_get_sv96_from_iso(short iso)
662 {
663 printf("*** shooting_get_sv96_from_iso %d ***\n",iso);
664
665 if (iso > 0)
666 return (short)( log((double)(iso)*32.0/100.0)*96.0*(inv_log_2)+0.5 );
667 return 0;
668 }
669
670 float shooting_get_shutter_speed_from_tv96(short tv96)
671 {
672 printf("*** shooting_get_shutter_speed_from_tv96 %d ***\n",tv96);
673 return pow(2,((float)(-tv96))/96.0);
674 }
675
676 short shooting_get_resolution()
677 {
678 printf("*** shooting_get_resolution ***\n");
679 return 0;
680 }
681
682 short shooting_get_real_focus_mode()
683 {
684 printf("*** shooting_get_real_focus_mode ***\n");
685 return 0;
686 }
687
688 short shooting_get_nd_value_ev96()
689 {
690 printf("*** shooting_get_nd_value_ev96 ***\n");
691 return 0;
692 }
693
694 short shooting_get_nd_current_ev96()
695 {
696 printf("*** shooting_get_nd_current_ev96 ***\n");
697 return 0;
698 }
699
700 short shooting_get_min_av96()
701 {
702 printf("*** shooting_get_min_av96 ***\n");
703 return -1;
704 }
705
706 short shooting_get_max_av96()
707 {
708 printf("*** shooting_get_max_av96 ***\n");
709 return -1;
710 }
711
712 short shooting_get_iso_from_sv96(short sv96)
713 {
714 printf("*** shooting_get_shutter_speed_from_tv96 %d ***\n",sv96);
715
716 return (short)( (double)pow(2, (((double)sv96)/96.0))*100.0/32.0 + 0.5 );
717 }
718
719 short shooting_get_is_mode()
720 {
721 printf("*** shooting_get_is_mode ***\n");
722 return 0;
723 }
724
725 int shooting_get_imager_active() {
726 printf("*** shooting_get_imager_active ***\n");
727 return 0;
728 }
729
730 short shooting_get_flash_mode()
731 {
732 printf("*** shooting_get_flash_mode ***\n");
733 return 0;
734 }
735
736 short shooting_get_ev_correction1()
737 {
738 printf("*** shooting_get_ev_correction1 ***\n");
739 return 0;
740 }
741
742 short shooting_get_display_mode()
743 {
744 printf("*** shooting_get_display_mode ***\n");
745 return 0;
746 }
747
748 #define SHOOTING_TV96_INVALID -10000
749
750 long shooting_get_current_tv96()
751 {
752 printf("*** shooting_get_current_tv96 ***\n");
753 return SHOOTING_TV96_INVALID;
754 }
755
756 long shooting_get_current_av96()
757 {
758 printf("*** shooting_get_current_av96 ***\n");
759 return 0;
760 }
761
762 long shooting_get_current_base_sv96()
763 {
764 printf("*** shooting_get_current_base_sv96 ***\n");
765 return 0;
766 }
767
768 long shooting_get_current_delta_sv96()
769 {
770 printf("*** shooting_get_current_delta_sv96 ***\n");
771 return 0;
772 }
773
774 short shooting_get_av96_from_aperture(int aperture)
775 {
776 printf("*** shooting_get_av96_from_aperture %d ***\n", aperture);
777 return (int)((log((double)aperture/1000.0) * 192 * inv_log_2) + 0.5);
778 }
779
780 int shooting_get_aperture_from_av96(short av96)
781 {
782 printf("*** shooting_get_aperture_from_av96 %d ***\n", av96);
783 if (av96)
784 return (short)((pow(2, ((double)av96)/192.0))*1000.0 + 0.5);
785 return -1;
786 }
787
788 short shooting_can_focus()
789 {
790 printf("*** shooting_can_focus ***\n");
791 return 0;
792 }
793
794 int shooting_get_canon_image_format()
795 {
796 printf("*** shooting_get_canon_image_format ***\n");
797 return 0;
798 }
799
800 int shooting_set_canon_image_format(int fmt)
801 {
802 printf("*** shooting_set_canon_image_format %d ***\n",fmt);
803 return 0;
804 }
805
806
807 int shooting_get_canon_raw_support()
808 {
809 printf("*** shooting_get_canon_raw_support ***\n");
810 return 0;
811 }
812
813 void set_movie_status(int status)
814 {
815 printf("*** set_movie_status %d ***\n", status);
816 }
817
818 int sd_over_modes()
819 {
820 printf("*** sd_over_modes ***\n");
821 return 0;
822 }
823
824 void script_set_terminate_key(int key, const char *keyname)
825 {
826 printf("*** script_set_terminate_key %d %s ***\n", key, keyname);
827 }
828
829 void script_console_add_error(long str_id)
830 {
831 printf("*** script_console_add_error %ld ***\n", str_id);
832 }
833
834 long lens_get_zoom_point()
835 {
836 printf("*** lens_get_zoom_point ***\n");
837 return 0;
838 }
839
840 int is_video_recording()
841 {
842 printf("*** is_video_recording ***\n");
843 return 0;
844 }
845
846 int is_raw_possible()
847 {
848 printf("*** is_raw_possible ***\n");
849 return 0;
850 }
851
852 int get_movie_status()
853 {
854 printf("*** get_movie_status ***\n");
855 return 0;
856 }
857
858 struct tm *get_localtime()
859 {
860 printf("*** get_localtime ***\n");
861 time_t t = time(NULL);
862 return localtime(&t);
863 }
864
865 int get_focal_length(int zp)
866 {
867 printf("*** get_focal_length %d ***\n", zp);
868 return 0;
869 }
870
871 int force_usb_state(int state)
872 {
873 printf("*** force_usb_state %d ***\n", state);
874 return 0;
875 }
876
877 int kbd_force_analog_av(int state)
878 {
879 printf("*** force_analog_av %d ***\n", state);
880 return 0;
881 }
882
883
884 void enter_alt(int script_mode)
885 {
886 printf("*** enter_alt %d ***\n", script_mode);
887 }
888
889 long action_top(int n)
890 {
891 printf("*** action_top %d ***\n", n);
892 return 0;
893 }
894
895 long action_pop_func(int nParam)
896 {
897 printf("*** action_pop_func %d ***\n", nParam);
898 return 0;
899 }
900
901 typedef int (*action_func)(void);
902
903 void action_push_func(action_func f)
904 {
905 printf("*** action_push_func %ld ***\n", (long)f);
906 }
907
908 void action_push_shoot(int retry)
909 {
910 printf("*** action_push_shoot %d ***\n", retry);
911 }
912
913 void DoAELock()
914 {
915 printf("*** DoAELock ***\n");
916 }
917
918 void UnlockAE()
919 {
920 printf("*** UnlockAE ***\n");
921 }
922
923 int DoMFLock()
924 {
925 printf("*** DoMFLock ***\n");
926 return 0;
927 }
928
929 int UnlockMF()
930 {
931 printf("*** UnlockMF ***\n");
932 return 0;
933 }
934
935 void JogDial_CW()
936 {
937 printf("*** JogDial_CW ***\n");
938 }
939
940 void JogDial_CCW()
941 {
942 printf("*** JogDial_CW ***\n");
943 }
944
945 void TurnOnDisplay()
946 {
947 printf("*** TurnOnDisplay ***\n");
948 }
949
950 void TurnOffDisplay()
951 {
952 printf("*** TurnOffDisplay ***\n");
953 }